hrecht / censusapi

R package to retrieve U.S. Census data and metadata via API
https://www.hrecht.com/censusapi/
169 stars 31 forks source link

Quarterly Workforce Indicator categorical parameters #40

Closed hrecht closed 5 years ago

hrecht commented 6 years ago

The QWI API allows a lot of different specifications that are not currently supported in censusapi, though basic calls do work in censusapi.

Supporting complicated calls would be a future priority.

aeonstone commented 6 years ago

Hi @hrecht Just wanted to chime is saying I can definitely understand how this one way messier than the other APIs, but I hope you can tackle it some day. My own use case is wanting to pull down data for certain industries. Maybe just employment counts for industry == XXXX, for example. Maybe that would be a good intermediate step, if I can make a selfish suggestion.

You're awesome and I love this library! Keep up the great work.

hrecht commented 5 years ago

Done in v0.6.0, which adds the ability to use miscellaneous paramaters. It's not on CRAN yet, but can be installed with:

# install.packages("devtools")
devtools::install_github("hrecht/censusapi")

Here's an example:

qwi <- getCensus(name = "timeseries/qwi/sa",
region = "state:02",
vars = c("Emp", "sex"),
year = 2012,
quarter = 1,
agegrp = "A07",
ownercode = "A05",
seasonadj = "U",
industry = 21)