I know the choropleth areas are pre-defined when making maps in Plotly but is there a way to customize the area so that the choropleth functionality applies to it? I want to build a zip code map or district map that does what a state or country map does (ex. interactive features).
I had to do something similar: the goal was to color the shapes according to some value that is a function of user input, like a heatmap. This meant that the grouping of the layers would change depending on the input. My solution (kind of messy, but would love ideas for cleaner approaches) was to dynamically spit out the GeoJSON. Luckily, my shapes are just lat/lon squares, so that part was easy (I didn’t use ScatterGeo because I figured the squares wouldn’t line up just right for any projection). Anyways, code is here: https://github.com/leejt489/solar-reliability-cost-web