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

Datateam datafreshness #339

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

Conversation

prestinomills
Copy link
Contributor

I tried to add the data freshness report (by creating a new branch because I wasn't sure whether I'd be able to use/update the datafreshness branch)...Hunter had mentioned making a pull request to revisit the snags found in the data freshness script.

Best,

Copy link
Contributor

@ian-r-rose ian-r-rose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prestinomills I see there are some KYC scripts in here, is that intended?


lahub_user = os.environ["LAHUB_ACC_USERNAME"]
lahub_pass = os.environ["LAHUB_ACC_PASSWORD"]
socrata_token = 'LJ60SFL7ZqoC4IWosLhEmJV2a'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth also putting this in an environment variable, if it should be considered sensitive.


def prep_permit_data(file,token,user,pas):
client = Socrata("data.lacity.org", token, username=user, password=pas)
df = pd.DataFrame(client.get('n9nq-vewq', limit=10000000))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we guaranteed that by limiting to ten million rows, we get all requests from the last six months? If we do get back ten million rows, might it crash the instance we are running?

It may be worth executing a SoQL query to get a more targeted subset, rather than reading them all into memory. Unless you already tried that?

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