Add fixture with sample analysis results #962
Open
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.
Overview
This edits the setup script (technically the
update
script, which does most of the setup) to download and import a fixture containing a few neighborhoods and analysis results. Specifically neighborhoods and results for:These particular ones were chosen mostly-arbitrarily by me, with a goal of keeping them smallish but not all tiny, with some in the US and some not. (And Mackinac Island made the cut because it's the #1 low-stress connectivity champion, owing to the fact that cars are banned from the island.)
I also added one neighborhood, Montpelier, VT, for which I didn't import the analysis results. Because it seems like it might be useful to have a neighborhood with no current analysis ready to go so we can run an analysis and not have to check if what we're seeing afterwards is the result of that or an earlier one.
To load the fixture, run
./scripts/update --load-data
. I made it optional because it really only needs to be done on initial setup, and it will waste time to import it again on subsequent updates (I also put theimport_crash_data
step in the same conditional block, for the same reason).Resolves #959
Demo
Notes
I assembled the data by copying it from production, i.e.:
s3://production-pfb-storage-us-east-1/neighborhood_boundaries/root/
s3://production-pfb-storage-us-east-1/results/
.zip
fileThen I exported the fixture and uploaded it to S3:
Testing Instructions
docker compose down -v
(this is necessary because you need your organization_id to match what the fixture expects)./scripts/update --load-data
to rebuild your instance and import the data./scripts/server
and go to http://localhost:9301/#/. You should see the imported results in the "Leading Cities/Towns" panel on the landing page, and on the list if you click "All places"Checklist