I’m currently trying to work with weather sensors data (shape of data: <lon, lat, value, sensor_name, timestamp>). I’d like to use go.Contour to interpolate between the different data points and plot that on top of a scatter_mapbox where I have a point for each sensor (using sensor_name). But currently, the Contour object seems to flash when loading and then disappear when the map is loaded. When moving on the map, while loading, the Contour seems to appear on the background, doesn’t seem to share the same x, y axis as the mapbox. I.e. there’s no rescaling of the Contour.
So my questions are: is there a way to plot a Contour on top of a Mapbox ? Alternatively, is it possible to export the Contour to GeoJSON that could be loaded for example in a choropleth_mapbox as having 2 mapbox on top of each other work flawlessly? Do you have any other idea ?
PS: I tried to use scipy.griddata to generate the values between the data points and then using choropleth_mapbox, but it’s pretty slow when loading.
Hello @empet ,
Thanks for your reply. I’m aware of Densitymapbox (actually made a PR to fix a bug with the opacity). But it sadly doesn’t fit the bill. My data is pretty sparse (say 25 datapoints for a city the size of Zürich) and I’m not interested in knowing how many points there are in a zone, but rather interpolate between my points to get a surface.
So as my first idea is out of the window, is there a way to extract the Contour shapes from go.Contour. As I’m not familiar with the internals of graph_obj. I tried .data but to no avail.