How do I map fields to each other?¶
To map a more specific set of fields (such as city names) to a more general set of fields (such as region names), use the case
statement.
map cities to regions¶
Use the case
function to map fields.
make_col region:case(city="Alhambra", "California",
city="Anaheim", "California",
city="Burbank", "California",
city="Carlsbad", "California",
city="Cerritos", "California",
city="Culver City", "California",
city="Eureka", "California",
city="Fresno", "California",
city="Inglewood", "California",
city="Merced", "California",
city="Mount Shasta", "California",
city="Oakland", "California",
city="Pacific Palisades", "California",
city="Redding", "California",
city="Riverside", "California",
city="Sacramento", "California",
city="San Clemente", "California",
city="San Diego", "California",
city="San Jose", "California",
city="Santa Monica", "California",
city="Sherman Oaks", "California",
city="Vacaville", "California",
city="Vallejo", "California",
city="West Covina", "California",
true, city)