R/zip_lookups.r
reverse_zipcode.Rd
Given a ZIP code, returns columns of metadata about that ZIP code
reverse_zipcode(zip_code)
A 5-digit U.S. ZIP code or chracter vector with multiple ZIP codes
A tibble containing data for the ZIP code(s)
reverse_zipcode("90210")
#> # 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 90210 Standard Beverl… Beverl… <raw 25 B> Los A… CA 34.1 -118. Pacific
#> # … 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, …
reverse_zipcode("08731")
#> # 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 08731 Standard Forked… Forked… <raw 24 B> Ocean… NJ 39.9 -74.3 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, …
reverse_zipcode(c("08734", "08731"))
#> # A tibble: 2 × 24
#> zipcode zipcode_…¹ major…² post_…³ common_c…⁴ county state lat lng timez…⁵
#> <chr> <chr> <chr> <chr> <blob> <chr> <chr> <dbl> <dbl> <chr>
#> 1 08731 Standard Forked… Forked… <raw 24 B> Ocean… NJ 39.9 -74.3 Eastern
#> 2 08734 Standard Lanoka… Lanoka… <raw 25 B> Ocean… NJ 39.9 -74.2 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, …
reverse_zipcode("07762")$county
#> [1] "Monmouth County"
reverse_zipcode("07762")$state
#> [1] "NJ"