Comments (3)
Tract data is only available by state, so you'll need to supply a vector of states to the states
parameter. The following code works:
st <- c(datasets::state.abb, "DC")
library(tidycensus)
tables <- c("P0030002","P0030003","P0030004","P0030005","P0030006","P0030007","P0030008")
us_tract_pop_2010<-get_decennial(geography = "tract", variables = tables,
summary_var = "P0030001", state = st)
from tidycensus.
Thanks that works inc a vector of all states . I was trying to work it out from your code
So if i wanted block groups I would need to enter both state and county? I tried just the states or just the county GEOIDs and get the same generic error as before
and does 1990 differ from 2000 2010
viz.
"At the moment, tracts and block groups for 1990 require specifying a county"
from tidycensus.
Correct, block groups are only available from the API by county. I have some logic under the hood in tidycensus to allow for multi-county calls for block groups by state; however multi-state calls would require iterating through every county in each state which I don't have built in. You could conceivably do this with purrr though you might also consider NHGIS (http://www.nhgis.org) if you want bulk block group data for the entire country.
Also: yes, the API makes tract data for 1990 only available by county, like with block groups for later years.
from tidycensus.
Related Issues (20)
- Question: ACS 2018-2022 HOT 2
- 2022 ACS will require 2023 TIGER geometries for congressional districts HOT 3
- Need to update `geography` column for 2018-2022 ACS variables
- get_acs() - Is there a limit of ZCTAs one can pass for the zcta argument given geography="zcta"? HOT 1
- "dp" dataset not working HOT 2
- Clarify replicate weights method for pums data HOT 3
- "HISP" breakdown labels in `get_estimates(geography = "state")` return miscoded HOT 2
- `puma` argument not working with 5-year 2018-2022 ACS PUMS HOT 7
- get_pums and/or Census API issue HOT 4
- Add documentation to load_variables() about datasets
- geography column empty for load_variables() for 2022 ACS 5-year estimate variables HOT 1
- return_vacant and 'VACS' variable not working for get_pums HOT 4
- Failed with error: ‘lazy-load database 'C:/R/win-library/4.0/tidycensus/data/Rdata.rdb' is corrupt’ HOT 2
- rate_sleep() error HOT 2
- `tidycensus::get_acs()` does not have the limitations that `tigris::zctas()` does for specifying `state` for a given `year`
- Pulling from multiple source tables with `get_acs()` causes erroneous NAs HOT 2
- Feature request to make "Margin of Error" optional in get_acs(). HOT 1
- get_decennial gives incorrect values for 2000 aian and aianprofile
- Connecticut data absent in county-level geography request HOT 2
- CBSA and CSA shape files do not exists for 2022 -- Need an error message staying that
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidycensus.