Skip to content

Fix correctness bugs across visualization scripts - #3

Merged
fmadore merged 4 commits into
masterfrom
claude/repo-review-refactor-kxaefn
Jul 16, 2026
Merged

Fix correctness bugs across visualization scripts#3
fmadore merged 4 commits into
masterfrom
claude/repo-review-refactor-kxaefn

Conversation

@fmadore

@fmadore fmadore commented Jul 16, 2026

Copy link
Copy Markdown
Owner
  • 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

claude added 4 commits July 16, 2026 19:22
- 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
@fmadore
fmadore merged commit 7f55faf into master Jul 16, 2026
1 check passed
@fmadore
fmadore deleted the claude/repo-review-refactor-kxaefn branch July 30, 2026 19:17
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.

2 participants