Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_acs for 2022 at the congressional district tries to use wrong layer #573

Closed
jtrosalez opened this issue Jun 10, 2024 · 2 comments
Closed

Comments

@jtrosalez
Copy link

This statement is bring up an error.

CensusCongress22 <- get_acs (geography = "congressional district", variables = "B01001_001", state = "CA", geometry = TRUE, year=2022, survey="acs1")

I get the following error message:
Cannot open layer cb_2022_us_cd116_500k

It looks like it is try to open the layer as the 116th Congressional District, but the layer for this statement should be for the 118th Congressional District. Not sure if this is a problem with tidycensus or with the Census API?

@cristian-vargas-robles
Copy link

Can you include your session info? I'm running tidycensus version 1.6.3 on R version 4.4.0 and when I run your sample code, I get back the expected output (118th Congressional Districts for California) with no errors.

@walkerke
Copy link
Owner

@jtrosalez you likely have an old version of the tigris package installed which was released prior to the 118th Congress shapefiles. I got your error on one of my machines that had the old version installed; I updated with install.packages("tigris") to v2.1 and the code now runs.

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

No branches or pull requests

3 participants