Repository navigation
Drew the region map over a basemap shipped with the page instead of CARTO's - #307
Merged
Merged
Conversation
The region map's basemap came from CARTO, so every visit sent the visitor's address to CARTO, and since CARTO began requiring an API key the map had fallen back to a plain background. It is now drawn over Natural Earth's land and country borders at 1:110m (public domain, via the world-atlas package), bundled with the page and colored to the theme. The style names no URL, so drawing the map asks nothing of anyone and has nothing to fail to load. CARTO's place names go with it, as labels would need font files. Two things the data needed: a background layer named "water" would have put the choropleth under the land (Plotly draws it just above such a layer), and Natural Earth's outlines cross the antimeridian, which MapLibre draws as lines across the whole map, so they are unwound and Antarctica's is closed along the pole. The CARTO key wiring, its fallback and its redraw-on-failure go too, and the credits name Natural Earth in place of CARTO and OpenStreetMap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DQrzw4SjDXZ3UDtpvtyije
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DQrzw4SjDXZ3UDtpvtyije
…tra-r9gpps-drop-carto Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DQrzw4SjDXZ3UDtpvtyije
|
Preview removed because the pull request was closed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #307 +/- ##
==========================================
+ Coverage 98.35% 98.48% +0.13%
==========================================
Files 4 4
Lines 1638 1649 +11
Branches 439 440 +1
==========================================
+ Hits 1611 1624 +13
+ Partials 27 25 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Natural Earth's land, bundled with the page, only ever comes as MultiPolygons, so the branch for a plain Polygon could not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DQrzw4SjDXZ3UDtpvtyije
CodyCBakerPhD
marked this pull request as ready for review
November 13, 2026 05:20
…tra-r9gpps-drop-carto Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DQrzw4SjDXZ3UDtpvtyije
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.
Why
The region map's basemap came from CARTO. Every visit sent the visitor's IP address, browser, the site's address and the map tiles viewed to CARTO. Since CARTO began requiring an API key, the map had been falling back to a plain background (#300, #303). This drops CARTO entirely.
Change
world-atlaspackage (ISC), bundled into the page by Vite (about 100 KB).world_basemap_style(theme)builds a three-layer MapLibre style: a sea background, a land fill and a border line, in colors added to each theme (mapWater,mapLand,mapBorder).water(choroplethmap.getBelow). A background namedwaterput every region under the land, so the background is namedsea.__CARTO_API_KEY__,CARTO_API_KEYinrefresh-pages.yml/preview.yml, and the README section). If you created theCARTO_API_KEYActions variable, it can be deleted.page-mocks.js.Verification
mainwith Marked the over-time plot's y-axis when it is a log scale #305. The pitfall test fails with either fix reverted.Note
Together with #306 (self-hosted font), the page then contacts only GitHub (the site and its data) and, for the points map only, Plotly's CDN.
Generated by Claude Code