question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Categorical choropleths with legends

See original GitHub issue

Right now it doesn’t seem like we can make a categorical choropleth by adding multiple traces with the same color and having legend items appear for them: https://codepen.io/nicolaskruchten/pen/MLwyOZ?editors=0010

Ideally I’d want to be able to:

  1. set the color directly, like with marker.color, instead of doing a dance with z and colorscale
  2. have legend entries appear

So that I could easily switch between choropleth and scattergeo like with this one: https://codepen.io/nicolaskruchten/pen/QYbNax?editors=0010

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:34 (29 by maintainers)

github_iconTop GitHub Comments

9reactions
etpinardcommented, Jan 24, 2019

Slipping in @nicolaskruchten 's creation

image

for everyone’s enjoyment 😄

3reactions
nicolaskruchtencommented, Jan 24, 2019

For reference, BTW, this is the kind of figure I’m aiming at:

image

image

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with Choropleth map's legend created by plotly in R ...
I've try to split the map with categorical Class and the legend looks a little bit better, however my hover text does not...
Read more >
Choro legends — GeoPandas 0.12.2+0.gefcb367.dirty ...
Choro legends# · Default legend formatting# · Overriding numerical format# · When first class lower bound < y.min()# · Show interval bracket# ·...
Read more >
Create a Python map from categorical data | by ZhongTr0n
However, all of these posts use choropleths for continuous data, meaning a ... A nice map with categorical data and a corresponding legend....
Read more >
Our new choropleth & symbol maps: Easier to use, better ...
Since day one, you could use our choropleth maps to create continuous ... items of categorical color legends directly in the Visualize step....
Read more >
Choropleth Mapping — Geographic Data Science with Python
Choropleth maps play a prominent role in geographic data science as they ... ax = mx.plot("HANSON98", categorical=True, legend=True) ax.set_axis_off();.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found