R/zip_lookups.r
search_cd.Rd
Get all ZIP codes that fall within a given congressional district
search_cd(state_fips_code, congressional_district)
A two-digit U.S. FIPS code for a state
A two digit number specifying a congressional district in a given
tibble of all congressional districts found for given ZIP code, including state code
search_cd("34", "03")
#> # A tibble: 63 × 3
#> ZIP state_fips congressional_district
#> <chr> <chr> <chr>
#> 1 07731 34 03
#> 2 08004 34 03
#> 3 08005 34 03
#> 4 08010 34 03
#> 5 08011 34 03
#> 6 08015 34 03
#> 7 08016 34 03
#> 8 08019 34 03
#> 9 08022 34 03
#> 10 08036 34 03
#> # … with 53 more rows
search_cd("36", "05")
#> # A tibble: 39 × 3
#> ZIP state_fips congressional_district
#> <chr> <chr> <chr>
#> 1 11001 36 05
#> 2 11003 36 05
#> 3 11010 36 05
#> 4 11022 36 05
#> 5 11096 36 05
#> 6 11352 36 05
#> 7 11366 36 05
#> 8 11405 36 05
#> 9 11411 36 05
#> 10 11412 36 05
#> # … with 29 more rows