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

Weekly earnings? #21

Closed
emmajuliej opened this issue Dec 2, 2022 · 2 comments
Closed

Weekly earnings? #21

emmajuliej opened this issue Dec 2, 2022 · 2 comments
Assignees

Comments

@emmajuliej
Copy link

Hello Matt, thank you this package is really helpful.
I was wondering if you would be able to help with something. I was trying to use this package to download the weekly earnings data (variable name "PRERNWA") , but I get following error: Error: Census API request failed [400]: Bad Request
However, I am able to download other variables such as type of person, age, sex, education attainment, etc. I was wondering how I could download weekly warnings with your package? Thank you for your help!
-Emma

@matt-saenz matt-saenz self-assigned this Dec 5, 2022
@matt-saenz
Copy link
Owner

Hi Emma, sure thing! Glad you are finding the package helpful. And hmm okay, based on what you are describing this sounds like the sort of thing that comes down to the year of data you are requesting/the name of the variable in that year. According to these footnotes for the basic monthly CPS (footnote 16 in particular):

  1. March 2021 - The following variables had their prefixes changed from 'PE' or 'PR' to 'PT' in order to reflect that they are top-coded: PTIO1OCD, PTIO2OCD, PTERNHLY, PTERNWA, PTERN2, & PTERNH1C.

So that explains the change from prernwa to pternwa. But then there is also the fact that, at least in the context of the Census API, that change seems to be reflected in years prior to 2021 as well. (Just checked that for 2020 using MDAT.) Which differs from what you'd expect based on the data dictionary for the 2020 basic monthly CPS data files. So based on that I think changing prernwa to pternwa in your request should resolve the error.

@matt-saenz
Copy link
Owner

@emmajuliej Hey Emma, did the above response end up resolving the issue?

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

2 participants