Search for ZIP codes located within a given state

search_state(state_abb)

Arguments

state_abb

Two-digit code representing a U.S. state

Value

tibble of all ZIP codes for each state code defined in state_abb

Examples

search_state('NJ')
#> 732 ZIP codes found for state: "NJ"
#> # A tibble: 732 x 24 #> zipcode zipcode_type major_city post_office_city common_city_list county #> <chr> <chr> <chr> <chr> <list<raw>> <chr> #> 1 07001 Standard Avenel Avenel, NJ [18] Middl~ #> 2 07002 Standard Bayonne Bayonne, NJ [19] Hudso~ #> 3 07003 Standard Bloomfield Bloomfield, NJ [22] Essex~ #> 4 07004 Standard Fairfield Fairfield, NJ [21] Essex~ #> 5 07005 Standard Boonton Boonton, NJ [36] Morri~ #> 6 07006 Standard Caldwell Caldwell, NJ [39] Essex~ #> 7 07007 PO Box Caldwell NA [30] Essex~ #> 8 07008 Standard Carteret Carteret, NJ [20] Middl~ #> 9 07009 Standard Cedar Gro~ Cedar Grove, NJ [23] Essex~ #> 10 07010 Standard Cliffside~ Cliffside Park,~ [32] Berge~ #> # ... with 722 more rows, and 18 more variables: state <chr>, lat <dbl>, #> # lng <dbl>, timezone <chr>, radius_in_miles <dbl>, #> # area_code_list <list<raw>>, 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>
search_state(c('NJ','NY','CT'))
#> 3378 ZIP codes found for states: "NJ", "NY", "CT"
#> # A tibble: 3,378 x 24 #> zipcode zipcode_type major_city post_office_city common_city_list county #> <chr> <chr> <chr> <chr> <list<raw>> <chr> #> 1 06001 Standard Avon Avon, CT [16] Hartf~ #> 2 06002 Standard Bloomfield Bloomfield, CT [22] Hartf~ #> 3 06006 Unique Windsor NA [19] Hartf~ #> 4 06010 Standard Bristol Bristol, CT [19] Hartf~ #> 5 06011 PO Box Bristol NA [19] Hartf~ #> 6 06013 Standard Burlington Burlington, CT [36] Hartf~ #> 7 06016 Standard Broad Bro~ Broad Brook, CT [46] Hartf~ #> 8 06018 Standard Canaan Canaan, CT [18] Litch~ #> 9 06019 Standard Canton Canton, CT [34] Hartf~ #> 10 06020 Standard Canton Ce~ Canton Center, ~ [25] Hartf~ #> # ... with 3,368 more rows, and 18 more variables: state <chr>, lat <dbl>, #> # lng <dbl>, timezone <chr>, radius_in_miles <dbl>, #> # area_code_list <list<raw>>, 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>