From 621796d8cec47f60fcc75f5498ff3765cd15f158 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Fri, 12 Jun 2026 13:19:50 -0500 Subject: [PATCH] feat(stats): add world map markers --- .../stats/app/src/routes/[lab]/[model].tsx | 43 ++++++++++++++++++- packages/stats/app/src/routes/index.css | 20 ++++++++- packages/stats/app/src/routes/index.tsx | 43 ++++++++++++++++++- 3 files changed, 103 insertions(+), 3 deletions(-) diff --git a/packages/stats/app/src/routes/[lab]/[model].tsx b/packages/stats/app/src/routes/[lab]/[model].tsx index 95fbd30c0..75d6e6650 100644 --- a/packages/stats/app/src/routes/[lab]/[model].tsx +++ b/packages/stats/app/src/routes/[lab]/[model].tsx @@ -5,7 +5,7 @@ import { geoEquirectangular, geoPath } from "d3-geo" import { scaleSqrt } from "d3-scale" import countryCodesSource from "i18n-iso-countries/codes.json?raw" import { feature, mesh } from "topojson-client" -import countriesTopologySource from "world-atlas/countries-110m.json?raw" +import countriesTopologySource from "world-atlas/countries-50m.json?raw" import { getStatsModelData, type CountryEntry, @@ -89,6 +89,7 @@ const worldPath = geoPath(worldProjection) const worldCountryPaths = worldCountries.features.map((country) => ({ id: String(country.id ?? "").padStart(3, "0"), path: worldPath(country) ?? "", + marker: geoCountryMarker(country), })) const worldBorderPath = worldPath(mesh(worldTopology, worldCountryGeometries, (a, b) => a !== b)) ?? "" @@ -587,6 +588,7 @@ function GeoWorldMap(props: { return ( + + + {(country) => { + const entry = () => props.countryById.get(country.id) + return ( + + {(marker) => ( + + ) + }} + +