From 00c7fd9193dfc9a0c5c262124db2a63094736809 Mon Sep 17 00:00:00 2001 From: Justin Kunimune Date: Tue, 9 Jan 2024 13:16:23 -0500 Subject: [PATCH] new blanker world map template to complete the trifecta. it has rivers, and no political borders. --- README.md | 3 + input/Advanced/Template coastlines.svg | 207 +++++++++++++++++++++++++ input/Advanced/Template provinces.svg | 51 ++++++ src/zupplemental/compose_maps.py | 26 +++- 4 files changed, 285 insertions(+), 2 deletions(-) create mode 100644 input/Advanced/Template coastlines.svg diff --git a/README.md b/README.md index 61ac1bd..f911715 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,9 @@ pip3 install numpy pyshp shapely ~~~~ Note that `compose_maps.py` requires input data from [naturalearthdata.com](http://www.naturalearthdata.com/downloads/), which should be downloaded and placed in `src/zupplemental/shapefiles/`. +You can either put the zip file in there or extract the individual files and put them in; it works either way. +I don't have a complete list of what data files are needed, so I usually just run it and look at the error message to see what it wants me to download. +You can alternatively scroll through `compose_maps.py` to see what files it references (anything that starts with "ne_" is the name of a Natural Earth dataset). ## Wherefore? I'll write a little blurb here later. diff --git a/input/Advanced/Template coastlines.svg b/input/Advanced/Template coastlines.svg new file mode 100644 index 0000000..03096f2 --- /dev/null +++ b/input/Advanced/Template coastlines.svg @@ -0,0 +1,207 @@ + + + Blank world map + + A physical map of the world, including coastlines and rivers. Geographic data is taken from Natural Earth. Equirectangular projection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/input/Advanced/Template provinces.svg b/input/Advanced/Template provinces.svg index a30f9b5..96616d2 100644 --- a/input/Advanced/Template provinces.svg +++ b/input/Advanced/Template provinces.svg @@ -2599,6 +2599,9 @@ + + + @@ -2735,40 +2738,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2801,7 +2850,9 @@ + + diff --git a/src/zupplemental/compose_maps.py b/src/zupplemental/compose_maps.py index c916378..9c02751 100644 --- a/src/zupplemental/compose_maps.py +++ b/src/zupplemental/compose_maps.py @@ -159,6 +159,28 @@ def main(): + label_shapes('ne_50m_admin_0_countries', label_type="polity", secondary_attr="note_adm0") ) + # physical template + write_svg_code_to_file( + "../../input/Advanced/Template coastlines.svg", + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + + plot_shapes('ne_110m_land', trim_antarctica=True, mark_antarctica=True) + + ' \n' + ' \n' + + plot_shapes('ne_110m_rivers_lake_centerlines') + + ' \n' + ' \n' + + plot_shapes('ne_110m_lakes') + + ' \n' + ' \n' + ' \n' + ) + # political template (countries) write_svg_code_to_file( "../../input/Advanced/Template countries.svg", @@ -180,7 +202,7 @@ def main(): add_title=True, mode="circle") + ' \n' ' \n' - + plot_shapes('ne_110m_lakes', max_rank=4) + + + plot_shapes('ne_110m_lakes') + ' \n' ' \n' ' \n' @@ -223,7 +245,7 @@ def main(): add_title=False, mode="trace") + ' \n' ' \n' - + plot_shapes('ne_50m_lakes', max_rank=4) + + + plot_shapes('ne_50m_lakes') + ' \n' ' \n' ' \n'