feat: plot_numeric_data for plotly_wrapper#395
Conversation
Signed-off-by: Max <mcschrader@crimson.ua.edu>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #395 +/- ##
==========================================
- Coverage 88.15% 87.74% -0.41%
==========================================
Files 66 66
Lines 2929 2929
==========================================
- Hits 2582 2570 -12
- Misses 347 359 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
piotrgramacki
left a comment
There was a problem hiding this comment.
Thanks for the implementation of this missing plotting function. I've found a minor issue when running it, but it should be relatively straightforward to fix ;)
| regions_gdf: gpd.GeoDataFrame, | ||
| data_column: str, | ||
| data_df: Optional[Union[gpd.GeoDataFrame, pd.DataFrame]] = None, | ||
| colormap: Union[str, List[str]] = px.colors.sequential.Sunsetdark, |
There was a problem hiding this comment.
This colormap, which is the default, throws an error. I suppose that this is because this one is in RGB format so it is not a List[str] but List[Tuple]
ValueError:
Invalid value of type 'builtins.list' received for the 'colorscale' property of make_figure
| width (float, optional): Width of the plot. Defaults to None. | ||
| """ | ||
| regions_gdf_copy = regions_gdf.copy() | ||
| regions_gdf_copy[REGIONS_INDEX] = regions_gdf_copy.index |
There was a problem hiding this comment.
When I pass a geodataframe with regions from our regionalizer I get an error, because we set index name to REGIONS_INDEX. It results in an error on merge, because there is a column and index with the same name in regions_gdf_copy
ValueError: 'region_id' is both an index level and a column label, which is ambiguous.
No description provided.