Closed aniruhil closed 3 years ago
Hi, I've checked this out and it looks like the Census Bureau changed the predicate named "time" to "YEAR" with this update. Extremely frustrating! This of course breaks old code. If you change time
to YEAR
in your call it should work now.
If you'd like to alert the Census developers please email cedsci.feedback@census.gov. Unfortunately this is an issue on their end, the R package is working as intended.
@hrecht will do, and thanks for the swift debugging. Happy holidays!
In case anyone comes wandering, this works for multiple years ....
getCensus(
name = "timeseries/poverty/saipe",
vars = c("NAME", "SAEPOVRT0_17_PT", "SAEPOVRTALL_PT"),
region = "county:*",
regionin = "state:39",
YEAR = "2006:2019"
)
but this no longer works ...
getCensus(
name = "timeseries/poverty/saipe",
vars = c("NAME", "SAEPOVRT0_17_PT", "SAEPOVRTALL_PT"),
region = "county:*",
regionin = "state:39",
YEAR = "from 2006 to 2019"
)
Interestingly enough the switch from time
to YEAR
has not plagued SAHIE data pulls.
Thanks again for a very, very useful package, @hrecht
Thank you for flagging this @aniruhil, very frustrating! I haven't gotten any notices of these changes from the Census Bureau. Have you been in touch with them already at all? I'll make sure to update the SAHIE examples.
Yes, three months ago I filed a breaking change report and Logan Powell was aware of a report being having been filed.
Thank you! Ugh. I've raised it in the Census slack channel as well.
Good morning, just wanted to let you know that SAIPE School Districts and SAIPE State and County will be released later today with the added variable. There is no release for SAHIE right now.
@barne415 what does this mean? What added variable? Do you work for the Census Bureau?
If so, if this is your warning of a breaking change, this is not the appropriate venue. A vague comment on a closed unrelated github issue to one user is not sufficient. Please postpone any breaking changes and send a detailed email with instructions to all users and post an announcement on the API website. This is unacceptable. cc @loganpowell
If I am misunderstanding your message please do elaborate.
Hi @hrecht, this is not a breaking change, but a correction. Apologies for responding on your page. I will address this further in Slack.
@barne415 are we adding a new variable to time
or is the new variable we're talking about the YEAR
or something else entirely?
@loganpowell 'time' is being added to the SAIPE API. Once this is done, users will be able to access both 'time' and 'YEAR.' But it's only happening right now for SAIPE. No release for SAHIE at the moment to fix the breaking change.
Ah, good to know. Thanks @barne415
Describe the bug Since the 2019 data are out I tried to access the 2019 SAIPE estimates.
To Reproduce `library(censusapi)
saipe <- getCensus( name = "timeseries/poverty/saipe", vars = c("NAME", "SAEPOVRT0_17_PT", "SAEPOVRTALL_PT"), region = "state:*", time = 2019) `
Expected behavior 2019 data should have rolled in. Instead the following error is thrown ...
[1] "https://api.census.gov/data/timeseries/poverty/saipe?key=blahblahblahf&get=NAME%2CSAEPOVRT0_17_PT%2CSAEPOVRTALL_PT&for=state%3A%2A&time=2019" Error in apiCheck(req) : The Census Bureau returned the following error message: error: unknown predicate variable: 'time' Your API call was: https://api.census.gov/data/timeseries/poverty/saipe?key=blahblahblah&get=NAME%2CSAEPOVRT0_17_PT%2CSAEPOVRTALL_PT&for=state%3A%2A&time=2019
R session information:
Additional context Here is my
sessionInfo()
, in case it helps