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")
#> # A tibble: 732 × 24
#>    zipcode zipcode…¹ major…² post_…³ common_c…⁴ county state   lat   lng timez…⁵
#>    <chr>   <chr>     <chr>   <chr>       <blob> <chr>  <chr> <dbl> <dbl> <chr>  
#>  1 07001   Standard  Avenel  Avenel… <raw 18 B> Middl… NJ     40.6 -74.3 Eastern
#>  2 07002   Standard  Bayonne Bayonn… <raw 19 B> Hudso… NJ     40.7 -74.1 Eastern
#>  3 07003   Standard  Bloomf… Bloomf… <raw 22 B> Essex… NJ     40.8 -74.2 Eastern
#>  4 07004   Standard  Fairfi… Fairfi… <raw 21 B> Essex… NJ     40.9 -74.3 Eastern
#>  5 07005   Standard  Boonton Boonto… <raw 36 B> Morri… NJ     40.9 -74.4 Eastern
#>  6 07006   Standard  Caldwe… Caldwe… <raw 39 B> Essex… NJ     40.8 -74.3 Eastern
#>  7 07007   PO Box    Caldwe… NA      <raw 30 B> Essex… NJ     NA    NA   NA     
#>  8 07008   Standard  Carter… Carter… <raw 20 B> Middl… NJ     40.6 -74.2 Eastern
#>  9 07009   Standard  Cedar … Cedar … <raw 23 B> Essex… NJ     40.9 -74.2 Eastern
#> 10 07010   Standard  Cliffs… Cliffs… <raw 32 B> Berge… NJ     40.8 -74.0 Eastern
#> # … with 722 more rows, 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_state(c("NJ", "NY", "CT"))
#> # A tibble: 3,378 × 24
#>    zipcode zipcode…¹ major…² post_…³ common_c…⁴ county state   lat   lng timez…⁵
#>    <chr>   <chr>     <chr>   <chr>       <blob> <chr>  <chr> <dbl> <dbl> <chr>  
#>  1 06001   Standard  Avon    Avon, … <raw 16 B> Hartf… CT     41.8 -72.9 Eastern
#>  2 06002   Standard  Bloomf… Bloomf… <raw 22 B> Hartf… CT     41.8 -72.7 Eastern
#>  3 06006   Unique    Windsor NA      <raw 19 B> Hartf… CT     NA    NA   NA     
#>  4 06010   Standard  Bristol Bristo… <raw 19 B> Hartf… CT     41.7 -72.9 Eastern
#>  5 06011   PO Box    Bristol NA      <raw 19 B> Hartf… CT     NA    NA   NA     
#>  6 06013   Standard  Burlin… Burlin… <raw 36 B> Hartf… CT     41.8 -73.0 Eastern
#>  7 06016   Standard  Broad … Broad … <raw 46 B> Hartf… CT     41.9 -72.6 Eastern
#>  8 06018   Standard  Canaan  Canaan… <raw 18 B> Litch… CT     42.0 -73.3 Eastern
#>  9 06019   Standard  Canton  Canton… <raw 34 B> Hartf… CT     41.9 -72.9 Eastern
#> 10 06020   Standard  Canton… Canton… <raw 25 B> Hartf… CT     41.8 -72.9 Eastern
#> # … with 3,368 more rows, 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, …