-
Notifications
You must be signed in to change notification settings - Fork 141
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
Added acs1st and variable functions #152
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @acnromanmtz! Left a couple comments inline.
@@ -398,6 +430,16 @@ def _switch_endpoints(self, year): | |||
|
|||
dataset = 'acs5/subject' | |||
|
|||
class ACS1StClient(ACSClient): # added | |||
default_year = 2019 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add the supported years to this class?
For example:
class ACS1DpClient(ACS1Client):
dataset = 'acs1/profile'
years = (2022, 2021, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012)
...
@@ -116,14 +116,46 @@ def tables(self, year=None): | |||
|
|||
# Pass it out | |||
return resp.json()['groups'] | |||
|
|||
def variables(self, year=None) -> list: # added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea here. We do plan on taking on a more general project of fetching API metadata from the
Census Data API Discovery Tool. Would you mind separating this out into another PR?
added a class for acs1st based off of acs5st
added function to fetch acs variables based off of the definitions url
added function to partially match variables fetched to make it easier for users to find the table values they are looking for based on the label and group
open to any edits by maintainers