-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: master
Are you sure you want to change the base?
Datateam datafreshness #339
Conversation
…gnating user and pass
… error in civis import311 datetime values
…o a PR--hope this is how it works!
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.
@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' |
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.
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)) |
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.
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?
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,