add visualizations for old stats #51#353
Open
a-wyrm wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hey! I've always loved this project and wanted to give a shot at adding a way to visualize older statistics (issue #51). Below are the things that I've changed:
ice_dentention_scraper.py
def extract_facilities_data( filepath: str, source_date: str | None = None ) -> dict | None:This can now extract data from xlsx files from years other than 2026. It also reformats the returned dictionary object to work better with the map rendering.
render_facilities_map.py
create_timeline_dict(timeline_data: dict) -> dict:This builds the dictionary object, which now holds both current and prior ICE data.
map.html
The map page now has a slider and defaults to the current year! When users slide it, the page will automatically render new leaflet.js markers using the dictionary object built in the above functions.
Other changes:
I'm working on collecting the archived data from archive.org, and will make another pull request once I've gotten all of the historic data.