summaryrefslogtreecommitdiff
path: root/assets/js/map
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-17 12:36:00 -0500
committerChristian Cleberg <[email protected]>2026-04-17 12:36:00 -0500
commit9b6de370a0b6cb95f46c29f5e1827f9c418ef6cf (patch)
tree6fb0eb8da7900075a46b916237aa1748881e9d4c /assets/js/map
parent0d18b7d6256a2c9685c2a5ea90412a6079ea07bd (diff)
downloadworld-incarceration-9b6de370a0b6cb95f46c29f5e1827f9c418ef6cf.tar.gz
world-incarceration-9b6de370a0b6cb95f46c29f5e1827f9c418ef6cf.tar.bz2
world-incarceration-9b6de370a0b6cb95f46c29f5e1827f9c418ef6cf.zip
phase 1: scaffold D3/TopoJSON migration structure
- Extract country prison data to assets/data/countries.js (ES module) - Add ISO numeric→alpha-3 lookup table for TopoJSON ID bridging - Download world-atlas countries-110m.json (TopoJSON, 108KB) - Create stub ES modules for map, charts, and UI layers - Replace ZingChart/jQuery script tags with single ES module entry point - Preserve original app.js as _app.js.bak for Phase 2+ reference
Diffstat (limited to 'assets/js/map')
-rw-r--r--assets/js/map/choropleth.js4
-rw-r--r--assets/js/map/tooltip.js3
-rw-r--r--assets/js/map/zoom.js3
3 files changed, 10 insertions, 0 deletions
diff --git a/assets/js/map/choropleth.js b/assets/js/map/choropleth.js
new file mode 100644
index 0000000..e7d5d3d
--- /dev/null
+++ b/assets/js/map/choropleth.js
@@ -0,0 +1,4 @@
+// Phase 2: choropleth map rendering, gradient coloring
+export function initMap(container, countries, isoLookup) {}
+export function applyGradient(metricKey) {}
+export function setClickHandler(fn) {}
diff --git a/assets/js/map/tooltip.js b/assets/js/map/tooltip.js
new file mode 100644
index 0000000..c8f112a
--- /dev/null
+++ b/assets/js/map/tooltip.js
@@ -0,0 +1,3 @@
+// Phase 3: hover tooltip
+export function initTooltip() {}
+export function attachTooltip(selection, getContent) {}
diff --git a/assets/js/map/zoom.js b/assets/js/map/zoom.js
new file mode 100644
index 0000000..aec278b
--- /dev/null
+++ b/assets/js/map/zoom.js
@@ -0,0 +1,3 @@
+// Phase 3: zoom and pan behavior
+export function initZoom(svg, mapGroup) {}
+export function resetZoom(svg, zoomBehavior) {}