Fix correctness bugs across visualization scripts - #3
Merged
Conversation
- map_locations.py: remove duplicate 'Bon Pasteur parish' dict key that silently dropped a marker - activities_type_time.py: derive the quarter axis from the data instead of a hardcoded 2025 endpoint; fail loudly on empty data - timeline.py: remove the unused DraggableTextBox class and related dead code - word_clouds.py: use a stable hash for word colors so regenerated clouds are reproducible; filter French stop words on lemmas as well as surface forms; raise on unsupported languages; drop unused import - requirements.txt: add missing tqdm, remove unused requests, pin major versions for reproducibility - CLAUDE.md: fix sunburst.py -> treemap.py drift and marker color description Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oqW8sUfmMjxjUp6CVu1RK
locations.json is now the canonical dataset for both map_locations.py and points_of_interest.html. The two copies had drifted (accents, naming, one lost marker); the JSON now carries the fuller accented names from the Python script, the same 33 locations, and a new 'type' property (mosque/church/school/university/landmark) for icon styling. map_locations.py loads and groups the GeoJSON by country instead of hardcoding three dicts. points_of_interest.html needs no change: it already derives marker colors from the country property. Also delete UL_locations_map.html and UAC_locations_map.html, outputs of script versions that no longer exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oqW8sUfmMjxjUp6CVu1RK
- Add viz_common.py at the repo root: shared design tokens (fonts, country colors, qualitative palette), load_json helper, the standard folium base map (tile options + fullscreen/minimap/mouse position), a registered 'remoboko' Plotly template and the common write_html config - Refactor all map and chart scripts to use it, removing the copy-pasted tile/plugin blocks and repeated Plotly layout styling - collaborators_country.py: count contributors with groupby().agg() instead of splitting the hover string; bar counts and title total now come from the same source - treemap.py: build the Counter directly, drop unused imports, warn when rows are skipped for missing fields - collaborators_map.py: stop shadowing builtin map, remove popup CSS duplicated between the map root and the iframe popups, cap the title banner width on small screens - Add ruff config (pyproject.toml), extend .gitignore, and add a CI workflow that lints and runs every script headless Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oqW8sUfmMjxjUp6CVu1RK
- Locations map: Font Awesome icons by location type, a search box over all markers (country groups stay toggleable via subgroups), and a fixed legend for country colors and type icons - Collaborators map: circle markers scaled by collaborator count with a size legend, replacing identical pins for 1-8 people - Universities map: logos base64-embedded instead of fetched from raw.githubusercontent.com, so the map is self-contained and immune to branch renames - Gender chart: neutral shared palette instead of blue/red stereotype colors; also export a white-background variant for dark contexts - Activities chart: range slider for zooming, 12 distinct colors so types no longer share a hue - D3 timeline: responsive viewBox, greedy lane assignment that avoids label collisions, hover tooltips with date/category, legend, shared country colors, debug logging removed - timeline.py: label layout (wrap/label/x) now lives per event in data.json instead of hardcoded lists; De Gruyter Sans is used when the gitignored OTFs are present, falling back to DejaVu Sans - CLAUDE.md: document viz_common, the canonical locations.json and CI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oqW8sUfmMjxjUp6CVu1RK
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.
silently dropped a marker
of a hardcoded 2025 endpoint; fail loudly on empty data
dead code
clouds are reproducible; filter French stop words on lemmas as well
as surface forms; raise on unsupported languages; drop unused import
major versions for reproducibility
description
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_016oqW8sUfmMjxjUp6CVu1RK