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

Added acs1st and variable functions #152

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

acnromanmtz
Copy link

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

Copy link

@antidipyramid antidipyramid left a 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

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
Copy link

@antidipyramid antidipyramid Jan 9, 2025

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?

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

Successfully merging this pull request may close these issues.

2 participants