Search ZIP codes for a given city within a state
search_city(city_name, state_abb)
Name of major city to search
Two-digit code for a U.S. state
tibble of all ZIP code data found for given city
search_city("Spring Lake", "NJ")
#> # A tibble: 1 × 24
#> zipcode zipcode_…¹ major…² post_…³ common_c…⁴ county state lat lng timez…⁵
#> <chr> <chr> <chr> <chr> <blob> <chr> <chr> <dbl> <dbl> <chr>
#> 1 07762 Standard Spring… Spring… <raw 23 B> Monmo… NJ 40.2 -74.0 Eastern
#> # … with 14 more variables: radius_in_miles <dbl>, area_code_list <blob>,
#> # population <int>, population_density <dbl>, land_area_in_sqmi <dbl>,
#> # water_area_in_sqmi <dbl>, housing_units <int>,
#> # occupied_housing_units <int>, median_home_value <int>,
#> # median_household_income <int>, bounds_west <dbl>, bounds_east <dbl>,
#> # bounds_north <dbl>, bounds_south <dbl>, and abbreviated variable names
#> # ¹zipcode_type, ²major_city, ³post_office_city, ⁴common_city_list, …
search_city("Chappaqua", "NY")
#> # A tibble: 1 × 24
#> zipcode zipcode_…¹ major…² post_…³ common_c…⁴ county state lat lng timez…⁵
#> <chr> <chr> <chr> <chr> <blob> <chr> <chr> <dbl> <dbl> <chr>
#> 1 10514 Standard Chappa… Chappa… <raw 21 B> Westc… NY 41.2 -73.8 Eastern
#> # … with 14 more variables: radius_in_miles <dbl>, area_code_list <blob>,
#> # population <int>, population_density <dbl>, land_area_in_sqmi <dbl>,
#> # water_area_in_sqmi <dbl>, housing_units <int>,
#> # occupied_housing_units <int>, median_home_value <int>,
#> # median_household_income <int>, bounds_west <dbl>, bounds_east <dbl>,
#> # bounds_north <dbl>, bounds_south <dbl>, and abbreviated variable names
#> # ¹zipcode_type, ²major_city, ³post_office_city, ⁴common_city_list, …