Added acs1st and variable functions#152
Open
acnromanmtz wants to merge 3 commits intodatamade:masterfrom
Open
Conversation
antidipyramid
requested changes
Jan 9, 2025
Contributor
antidipyramid
left a comment
There was a problem hiding this comment.
Thanks for the PR, @acnromanmtz! Left a couple comments inline.
| dataset = 'acs5/subject' | ||
|
|
||
| class ACS1StClient(ACSClient): # added | ||
| default_year = 2019 |
Contributor
There was a problem hiding this comment.
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)
...| # Pass it out | ||
| return resp.json()['groups'] | ||
|
|
||
| def variables(self, year=None) -> list: # added |
Contributor
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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