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