Description
A choropleth
trace supports specifying locations as high-level string names/IDs, via the locations
and locationmode
keys. This is very convenient and makes it easy to get a nice plot 👍
A choroplethmapbox
trace seems to not support this, and thus requires specifying any geometries as a manual GeoJSON file. It would be nice if choroplethmapbox
supported the same automatic "inference" of appropriate geometries too.
Related issues:
-
Introducing choroplethmapbox traces #3988 mentions the possibility of this, but it seems there's no progress:
locationmode. The current behavior would correspond to locationmode: 'geojson-id'. Some users might expect to identify GeoJSON features using their properties.name (this would correspond to e.g. locationmode: 'geojson-prop-name'. Moreover, we could also support the locationmode values found in geo traces: 'ISO-3', 'USA-states', 'country names'
-
Add new choroplethmapbox locationmode for geojson
properties.id
#4154 was, I think, about generalising the GeoJSON support inchoroplethmapbox
, but not adding the no-GeoJSON mode as here -
Add support for custom geojson polygons in choropleth traces #4267 was the opposite, I think: adding support for GeoJSON to
choropleth