Skip to content

refactor: Clean up files related to UN topojson #7481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ where X.Y.Z is the semver of most recent plotly.js release.
with thanks to @my-tien for the contribution!

### Changed
- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot
- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot [[#7393](https://github.com/plotly/plotly.js/pull/7393)]
- Make 'png' all caps [[#7400](https://github.com/plotly/plotly.js/pull/7400)]

### Fixed
Expand Down
1 change: 1 addition & 0 deletions draftlogs/7481_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Refactor files related to UN topojson [[#7481](https://github.com/plotly/plotly.js/pull/7481)]
9 changes: 4 additions & 5 deletions src/assets/geo_assets.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
'use strict';

// TODO: Remove comments from Antarctica, Oceania during new maps release PR
const topojson = {
africa_110m: require('../../dist/topojson/africa_110m.json'),
// antarctica_110m: require('../../dist/topojson/antarctica_110m.json'),
antarctica_110m: require('../../dist/topojson/antarctica_110m.json'),
asia_110m: require('../../dist/topojson/asia_110m.json'),
europe_110m: require('../../dist/topojson/europe_110m.json'),
'north-america_110m': require('../../dist/topojson/north-america_110m.json'),
// oceania_110m: require('../../dist/topojson/oceania_110m.json'),
oceania_110m: require('../../dist/topojson/oceania_110m.json'),
'south-america_110m': require('../../dist/topojson/south-america_110m.json'),
usa_110m: require('../../dist/topojson/usa_110m.json'),
world_110m: require('../../dist/topojson/world_110m.json'),
africa_50m: require('../../dist/topojson/africa_50m.json'),
// antarctica_50m: require('../../dist/topojson/antarctica_50m.json'),
antarctica_50m: require('../../dist/topojson/antarctica_50m.json'),
asia_50m: require('../../dist/topojson/asia_50m.json'),
europe_50m: require('../../dist/topojson/europe_50m.json'),
'north-america_50m': require('../../dist/topojson/north-america_50m.json'),
// oceania_50m: require('../../dist/topojson/oceania_50m.json'),
oceania_50m: require('../../dist/topojson/oceania_50m.json'),
'south-america_50m': require('../../dist/topojson/south-america_50m.json'),
usa_50m: require('../../dist/topojson/usa_50m.json'),
world_50m: require('../../dist/topojson/world_50m.json'),
Expand Down
12 changes: 5 additions & 7 deletions tasks/cdn_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ for path in `ls $dist/plotly*`; do
done

# copy topojson files over to the sync folder
# NOTE: Temporarily adding the suffix '_un' to avoid overwriting the old topojson
# which some old plots might depend on
for filepath in $dist/topojson/*.json; do
f=${filepath##*/}
f=${f%.*}
cp $filepath "$sync/${f%.*}_un.json"
done
# NOTE: Temporarily syncing topojson to 'un' folder to avoid overwriting the old topojson
# which some old plots might depend on. These can be accessed by setting 'topojsonURL' to
# 'https://cdn.plot.ly/un/' in the Plotly config.
mkdir $sync/un
cp $dist/topojson/* $sync/un

# list folder and files
echo $sync
Expand Down
1 change: 0 additions & 1 deletion topojson/bin/process_geodata.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ async function convertLayersToTopojson({ name, resolution }) {

// Get required polygon features from UN GeoJSON
const inputFilePathUNGeojson = `${inputDir}/${unFilename}.geojson`;
// await mapshaper.runCommands(`${inputFilePathUNGeojson} -filter 'stscod !== undefined' target=1 -clean target=1 -o force ${inputFilePathUNGeojson}`)
const outputFilePathAntarctica50m = `${outputDirGeojson}/${unFilename}_50m/antarctica.geojson`;
const outputFilePathFiji50m = `${outputDirGeojson}/${unFilename}_50m/fiji.geojson`;
const outputFilePathFijiAntimeridian50m = `${outputDirGeojson}/${unFilename}_50m/fiji_antimeridian.geojson`;
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy