Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

counties_sf is out of date #22

Open
ghost opened this issue Mar 19, 2020 · 2 comments
Open

counties_sf is out of date #22

ghost opened this issue Mar 19, 2020 · 2 comments
Assignees

Comments

@ghost
Copy link

ghost commented Mar 19, 2020

The list of counties returned by counties_sf is now out-of-date.

counties_sf() %>%
  filter((name == "Bedford" & state == "Virginia") | (name == "Petersburg" & state == "Alaska"))
# Simple feature collection with 3 features and 8 fields
# geometry type:  MULTIPOLYGON
# dimension:      XY
# bbox:           xmin: -107.3392 ymin: 24.88892 xmax: -79.1833 ymax: 37.617
# epsg (SRID):    4326
# proj4string:    +proj=longlat +datum=WGS84 +no_defs
#    fips state_fips county_fips       name   lsad census_area    state
# 1 51019         51         019    Bedford County     753.021 Virginia
# 2 51515         51         515    Bedford   city       6.878 Virginia
# 3 02195         02         195 Petersburg     CA    3281.982   Alaska
#   iso_3166_2                       geometry
# 1         VA MULTIPOLYGON (((-79.62613 3...
# 2         VA MULTIPOLYGON (((-79.5436 37...
# 3         AK MULTIPOLYGON (((-107.1118 2...

See this note, Petersburg, AK needs to have its lsad updated, but Bedford, VA needs to be merged.

Unfortunately the fixes would make this incompatible with the last decennial census, so I'm not sure what the best move is. I guess a year argument to the function call would be the safest, but would require a lot of engineering effort.

@hrbrmstr hrbrmstr self-assigned this Mar 19, 2020
@hrbrmstr
Copy link
Owner

this is super helpful! #ty!

I'll figure out a way to work in the year argument but perhaps will shunt in a hacky "current" function just to make sure it's aligned correctly with the real world.

@csarapas
Copy link

In addition to the changes noted by eamoncaddigan, two counties have been renamed and given new FIPS codes since the 2010 census (both in 2015).

# previously:   fips 46113     Shannon County, SD
# now:          fips 46102     Ogala Lakota County, SD
#
# previously:   fips 02270     Wade Hampton Census Area, AK
# now:          fips 02158     Kusilvak Census Area, AK

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants