Equal earth projection

Are there any plans to add the Equal Earth projection to maps?

Yes, sometime in 2021 we’ll upgrade the geo module internally and get a few more projections. We have a pull request open that could use some assistance if you’re interested in helping out! https://github.com/plotly/plotly.js/pull/5112

What is the status of the Equal Earth projection in Plotly? I see a lot of others but not this one. Yet Equal Earth is the one highly recommended projection for near-global choropleths and other use cases. Hence, for instance, NASA’s use of it. I also find it on the more aesthetically pleasing side. I am loathe to redo all the customization work I did for my graphs with geopandas and matplotlib, but I also find it a bit weird that, instead of just making D3’s projections available as is, you chose to gate them and make yourself the single point of failure/delay.

Sorry for the cranky tone, but having spent a couple of hour diving through documentation and code (and finding them completely out of sync), I’m currently regretting my choice of Plotly.

Hi @apparebit - Equal Earth does look like a nice projection - relatively new but I can see why people like it.

We make ourselves the gatekeeper here because plotly.js adds a good deal of interactivity that isn’t compatible with all projections, and some need us to add a few extra parameters of customization. Probably Equal Earth is in neither category so it could be added just by listing it in https://github.com/plotly/plotly.js/blob/master/src/plots/geo/constants.js and including it in one or more of our test images. Feel like making a PR to add it?

I’m sorry if the docs are out of sync with the code / API - where specifically are you finding them to be wrong?

Hi Alex,

Thank you for the fast response. It makes sense. Since I started out cranky, I feel obliged to also be constructive. I’ve created the pull request but CI seems to be unhappy, complaining that the schema changed. I’m not sure how to address that because the schema change seems unavoidable. Any advice or pointers, please?

I’ll create the release notes blurb a little later.

As to documentation being out of sync: When I looked up supported projections, the Python pages only listed maybe a dozen. But then checking GitHub and the source, I saw a bunch more. It does not help that the documentation seems to list projections in random order instead of alphabetical. That made it really hard to check which of the more or less desirable projections are supported.

I think I got it. I actually have to install and build. Oops…

I’ve updated the pull request with the test schema change and the release notes blurb. But now webgl-jasmine test is failing on interactive operations. Is that just test flakiness or what? Some gentle pointers would be much appreciated.

Thanks for the PR! Yeah some of those tests are known to be a bit flaky. I’ll take a look in a bit and can rerun them. @liamc can you take a look at Map configuration and styling in Python? @apparebit is right that this is both unsorted and incomplete - only lists 22, vs the alphabetized 83 you see in Plotly.PlotSchema.get().layout.layoutAttributes.geo.projection.type.values or in the reference at Layout.geo in Python - so maybe that hardcoded list should just be removed and point people to the reference page, unless there’s a good way to bring the full list in programmatically.

83! wow, did not realize we had that many… I don’t think all of those appear in our tests, perhaps at some point we can at least smoke test them all, if not full image & interaction tests

@alexcjohnson and @apparebit, I’ve updated the map configuration and styling page to link out to the complete list in the reference docs, a page which gets updated automatically with each release. Thanks for letting me know.

4 Likes

Thank you, @alexcjohnson, for kicking CI until the tests passed! And @liamc, thank you, for updating the documentation. This is so much better. I guess now we wait until next week on the pull request. Once approved, how long does it usually take for a PR to make into a release?

We’ll probably make a plotly.js release in 2-3 weeks, followed shortly thereafter by a plotly.py release.

@archmoj just merged the pull request. I’m looking much forward to the next release. Thank y’all! :tada: