-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: plot_numeric_data for plotly_wrapper #395
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Max <[email protected]>
Codecov ReportAll 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.