Edent,
@Edent@mastodon.social avatar

South Up Equal Earth Projection in R

Yup - I'm still banging on about this! This time, in R

Result

The colours are wrong, and the labels need adjustment - but not bad for a few lines of code!

Code

library(tidyverse)
library(rnaturalearth)
library(rnaturalearthdata)
library(sf)

centre

https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/

#/etc/

Edent,
@Edent@mastodon.social avatar

After three whole people said they'd buy this, I'm nearly ready to start selling my "South Up, Aotearoa Centred, Equal Earth Projection Map".

A bit more work to do making sure all the country labels are correct. Then a test printing. And then I'll need to find a place where I can sell them.

All the code and images will be available on GitHub if you want to correct it or print it yourself.

Price is likely to be about £100 for a 1.5 metre wide print. If you're interested, let me know 🙂
🗺️

ianturton,
@ianturton@fosstodon.org avatar

@Edent worth considering Redbubble - can do a large poster for around £25 and lots of other varieties of print.

for example:

https://www.redbubble.com/i/poster/Vintage-Map-of-The-World-1883-by-BravuraMedia/30764195.G7H47

Edent,
@Edent@mastodon.social avatar

@ianturton Thanks. I'm not sure if 120cm will give it enough detail. I'll order one and find out 🙂

Edent,
@Edent@mastodon.social avatar

More experiments.
Using text labels for countries is hard - some small countries have very long names!

So I tried using emoji flags!

Problem is, some areas are very crowded - which makes seeing the flags impossible.
OTOH, if I print them small, they won't be easy to see when printed out.

Upside down map of Europe. Tiny flags cover each country and they are heard to see..

Edent,
@Edent@mastodon.social avatar

Hmmm. I think I've found a bug in how renders text.

https://gitlab.gnome.org/GNOME/gimp/-/issues/10238

I wonder if there's a sensible way to convert a complex SVG to a raster which doesn't involve it? Sadly, ImageMagick is just too slow.

Edent,
@Edent@mastodon.social avatar

Grrr. don't actually say what the fidelity of their poster printers are.

I'm hoping they're 300DPI. If so, I might be able to make their 119cm wide print work.

About £30 down the drain if not :-/

zuzak,
@zuzak@zuzakistan.com avatar

@Edent I've had a good experience with https://www.theprintspace.co.uk when printing posters, and they apparently go up to 40x470in

Edent,
@Edent@mastodon.social avatar

@zuzak nice thanks. They look a bit pricey - but I might give them a go.

darkling,
@darkling@mstdn.social avatar

@Edent Inkscape will export PNGs. You can even do it from the command-line if you have a build process. There's a load of --export-* options from inkscape --help.

Edent,
@Edent@mastodon.social avatar

@darkling sadly Inkscape doesn't cope with Emoji. Just refuses to render them.

ltlnx,
@ltlnx@g0v.social avatar

@Edent @darkling
I think you'll be able to render emoji if you select the emoji and choose an emoji font (usually Noto Color Emoji on Linux, Apple Color Emoji on Mac, not sure on Windows). If that doesn't work maybe it's time to reach for the XML editor...

robinwhittleton,

@Edent https://cairosvg.org/ might be worth a shot?

Edent,
@Edent@mastodon.social avatar

@robinwhittleton interesting. Sadly it doesn't support external images like:
<image xlink:href="example.png"/>

robinwhittleton,

@Edent ah right, yeah I use it with base64ed data URLs for embedded raster images.

Edent,
@Edent@mastodon.social avatar

@robinwhittleton and, reading further, it has really poor text support - which is my primary use case.

Looks like a good tool - but not right for me.

petes_bread_eqn_xls,
@petes_bread_eqn_xls@mastodo.neoliber.al avatar

@Edent Text to path?

rgarner,
@rgarner@mastodon.social avatar

@Edent I guess since your original toot mentions R you'll already have discounted rsvg/librsvg? Am using it in a build process for union logos but cannot speak to its handling of complexity. Just ended up using it because ImageMagick choked on a couple of union logos.

Edent,
@Edent@mastodon.social avatar

@rgarner I'm using R to create the SVG - but I need to rasterise it for print.
Looks like Inkscape will work.

rgarner,
@rgarner@mastodon.social avatar

@Edent I'm using rsvg to rasterise.

Edent,
@Edent@mastodon.social avatar

@rgarner ah! I hadn't spotted that. I'll give it a go.

jleedev,
@jleedev@mastodon.sdf.org avatar

@Edent @rgarner libvips also uses librsvg but there might be text handling differences.

failing that, headless chromium?

Edent,
@Edent@mastodon.social avatar

@jleedev How do you export an SVG to a bitmap using headless Chromium?

jleedev,
@jleedev@mastodon.sdf.org avatar

@Edent The main caveat is you need to specify the dimensions yourself.

It has a command line interface, somewhat rudimentary but gets the job done:

¶ identify Test.svg
620x472 […]
¶ chromium --headless --window-size=620x472 --screenshot Test.svg
18567 bytes written to file screenshot.png

Or use some API to script it, playwright is pretty popular.

Edent,
@Edent@mastodon.social avatar

I ended up opening the SVG in Firefox and then… saving as a bloody PDF!

That was the only sensible way to embed the emoji font in a vector file. Luckily that imports smoothly into Gimp.

So, with any luck, I should get the test prints next week then be able to start selling them.

Edent,
@Edent@mastodon.social avatar

OK! Test prints ordered.

I bloody hate dealing with physical stuff. At least with digital mistakes only cost time and computer cycles.

If these go well, I'll start selling them online ASAP.

If not... I dunno?

quaid,
@quaid@hachyderm.io avatar

@Edent
I know I'd love one, eventually — such a great idea to help retrain the mind and one's biases!

I know a Big Kickstarter Thing is probably more than you signed up for, but you might be able to fund necessary experiments with a small scale pledge tool – first N people pledge Y £s to receive 1 of N "good enough for web sales" prints. Numbered, aybe signed by you or something commemorative about the original run.

Supporting that seems easier to me than experimenting w/the SVG myself!

Edent,
@Edent@mastodon.social avatar

@quaid thanks!

Sadly, I abhor Kickstarters. Both the grind and the lack of certainty as a customer.

I'll get these prints in a few days I hope - then sell them through RedBubble.

The files will also be available if people want to print it themselves.

sldrant,
@sldrant@mastodon.social avatar

@Edent a friend and I used to hypothesise that software engineers make terrible DIYers as there's no undo or load from save in the real world. Definitely is a mental shift to measure twice, cut once

Edent,
@Edent@mastodon.social avatar

@sldrant 100% true!
Why can't I git stash in the real world?!!?

Edent,
@Edent@mastodon.social avatar

OMG!

O! M! G!

The test prints have come back and they look ✨ GORGEOUS✨

No sneak peaks until I've set up the RedBubble shop - which should take a week. Then they'll be available for shipping world wide.

So excited to show these off to you.

Edent,
@Edent@mastodon.social avatar

British businesses are weird.

I need to buy a custom built frame for this poster - 120cm x 60cm.

I couldn't find a framing shop that sold that size - even in their custom option. So I sent a few emails asking about price.

The only people who got back to me were eBay sellers. And they were consistently cheaper than the nearest equivalent sized frame listed on "big" companies' websites.

I often wonder if the "death of the high street" is just business owners not understand what people want?

glenjamin,
@glenjamin@hachyderm.io avatar

@Edent that’s odd, there’s 3 framing shops within walking distance of me that I can hand a picture to and they’ll custom mount and frame to whatever style I want

mia,
@mia@hcommons.social avatar

@Edent if it's not too late, we've used Best4Frames for lots of custom frames and mounts

mia,
@mia@hcommons.social avatar

@Edent we had a similar experience with blinds - the online services are so on it, while the local companies are slow and their options are a bit opaque. We've gone with local where we can, but sometimes online is just easier.

That said, there's a framer right near the Museum in Docklands who's really good too

sangu,
@sangu@m.fa.gl avatar

@Edent you tried local joiners? might be able to be willing to throw something together in any size

lee,

@Edent this is the problem I've found many times over. Combined with we don't stock that, but can get it for you in a couple of weeks.

OX1Digital,

@Edent There was a great framing shop off Abingdon Road if you still head back to Oxford periodically

Edent,
@Edent@mastodon.social avatar

OK friends, I've launched my shop!

You can now buy my South-Up, Equal Earth, New Zealand centred maps from: https://www.redbubble.com/people/terenceeden/explore?page=1&sortOrder=recent

There's a massive 40% off at RedBubble right now. Perfect Christmas gifts for the map nerd in your life 🙂
🗺️

oh8hub,
@oh8hub@mastodon.radio avatar

@Edent My Mercatorially spoiled brain just flipped.

Really neat map!

Edent,
@Edent@mastodon.social avatar

@oh8hub
Thanks!

luis_in_brief,
@luis_in_brief@social.coop avatar

@Edent I like the nice, tasteful flags. Maybe one of these days I'll learn the tooling and generate my own map for something lower-cost than https://bellerbyandco.com/

Edent,
@Edent@mastodon.social avatar

Woo! I made a sale!

Remember, everything you buy only encourages me to do sillier and sillier things.

z303,
@z303@mastodon.social avatar

@Edent Yay capitalism

Edent,
@Edent@mastodon.social avatar

@z303
🤑🤑🤑

csaetre,
@csaetre@techhub.social avatar

@Edent Not certain why you think the flags are too small in no.2.

The flags in no.1 obscure vital map information: borders! No.2 is far better, and the flags will still serve as a signal even if smaller, IMO.

Edent,
@Edent@mastodon.social avatar

@csaetre if they're printed out, the smaller ones will be about 1cm wide. Even at 300DPI, I don't think they'll be any better than smudges.

csaetre,
@csaetre@techhub.social avatar

@Edent Perhaps. But 1 cm may surprise you. Easily confirmed or disabused with a test.

Last opinion: fun project!

Edent,
@Edent@mastodon.social avatar

@csaetre the problem is, it's about £50 to do a test print - so I'm trying to get everything as neat as possible first.

Thanks 🙂

aweatherall,
@aweatherall@mastodon.social avatar

@Edent @csaetre You can print an A4 section yourself to check.

Edent,
@Edent@mastodon.social avatar

@aweatherall You assume that I have a commercial grade colour printer. I do not.

aweatherall,
@aweatherall@mastodon.social avatar

@Edent My theory was that a non-commerical grade colour printer will do a worse job... So if its good enough then yay.

james,
@james@bne.social avatar

@Edent Fun fact - country flag emojis don't work in Windows, which changes 🇦🇺 to "AU" in a box. I had to switch to SVGs for a website I was working on.

brianstorms,
@brianstorms@mastodon.social avatar

@Edent

I like, except, Africa still doesn’t get a break.

Edent,
@Edent@mastodon.social avatar

@brianstorms
Oh? How so?

brianstorms,
@brianstorms@mastodon.social avatar

@Edent

Ok, upon further review and analysis from flipping it around and zooming in… I’ll put it this way: this map does far better justice to Africa than mean ol’ Mercator. So, initial snark withdrawn. 😎

xgebi,
@xgebi@hachyderm.io avatar

@Edent I'll bookmark it. I'm not interested rn but might be some time next year

level98,
@level98@mastodon.social avatar

@Edent It looks like it could have been centred on my house.

Just trying to figure out where my wife would let me hang this.

dsc,
@dsc@mastodon.scot avatar

@Edent potential customer here

rlcw,
@rlcw@ecoevo.social avatar

@Edent Have you considered putting it on a print on demand site (eg Spreadshirt or similar)? Then people can print it in whatever format suits them, and you can offer internationally with no headache on fulfillment.

Edent,
@Edent@mastodon.social avatar

@rlcw
I'm getting a test print from RedBubble - sadly SpreadShirt dont support large print sizes.
If all goes well, I'll start selling on there.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • maps
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • khanakhh
  • rosin
  • Youngstown
  • everett
  • slotface
  • ngwrru68w68
  • mdbf
  • GTA5RPClips
  • kavyap
  • thenastyranch
  • cisconetworking
  • JUstTest
  • cubers
  • Leos
  • InstantRegret
  • Durango
  • tacticalgear
  • tester
  • osvaldo12
  • normalnudes
  • anitta
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines