Add tags to community CSVs, add new script to generate tags, and update existing scripts to reflect tag support #125
+4,130
−3,978
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.
This PR:
tag_point_locations.py
script that reads in existing point location CSV files fromvector_data/point
and determines how they should be tagged. It writes the freshly-tagged CSVs out to a.gitignore
'ed subdirectory,utilities/tagged_csvs
.add_point_location.py
script.create_updated_ncr_shapefiles.py
and into the newtag_point_locations.py
script. Now, only communities within Alaska, British Columbia, and Yukon that fall within the IEM polygon are tagged with thencr
tag, and only communities tagged withncr
will be selectable from NCR. So, this solves the same problem in a different but more flexible way. I've also renamedcreate_updated_ncr_shapefiles.py
tocreate_shapefiles.py
since the shapefiles created by this script are used for all of our webapps.These changes affect only point locations currently, but in the future we may want to consider tagging polygons also. Something to consider another time / in another PR.
To test, run the
tag_point_locations.py
script and confirm that the CSV outputs in theutilities/tagged_csvs
subdirectory match the ones invector_data/point
, and spot check the rows of each CSV file to make sure the chosen tags make sense. Also, try running the modifiedcreate_shapefiles.py
script and spot check the shapefile outputs for sanity.