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

Census auto update new map #20575

Merged
merged 2 commits into from Feb 13, 2018
Merged

Census auto update new map #20575

merged 2 commits into from Feb 13, 2018

Conversation

drewsamnick
Copy link
Contributor

We are going to replace the current map on /yourschool with one showing every school in the DB and if we believe they each teach CS. I have created a new fusion table to use for this so that we can keep the old map up and running while the new UI is under development. The new update_census_map script will populate the fusion table nightly based on the census_summaries table. This script is heavily modeled after update_pledge_map.

Per guidance from @wjordan I did not put the table id in Chef and instead put it in deployment.rb
To make it harder for somebody to overwrite the production table from another environment, I only set the value in production.

@drewsamnick
Copy link
Contributor Author

@@ -46,6 +46,7 @@ def load_configuration
'build_apps' => false,
'build_dashboard' => true,
'build_pegasus' => true,
'census_map_table_id' => rack_env == :production ? '1AUZYRjLMI5NiQsDeDBGFsOIFpL_rLGsnxNpSyR13' : nil,
Copy link
Member

Choose a reason for hiding this comment

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

Is there any downside to this being in the repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. You can see the value if you view source on the page.

# After setting up authentication, provide the following CDO.* attributes:
# CDO.hoc_map_account: (JSON of a credential which can edit the FusionTables table)
# CDO.census_map_table_id: (the id of the fusion table)

Copy link
Member

Choose a reason for hiding this comment

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

We can still set these via locals.yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. That is how I'm testing.

@drewsamnick drewsamnick merged commit f87577a into staging Feb 13, 2018
@drewsamnick drewsamnick deleted the census-auto-update-new-map branch February 13, 2018 20:09
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.

None yet

2 participants