Skip to content

feat: plot_numeric_data for plotly_wrapper#395

Open
mschrader15 wants to merge 2 commits into
kraina-ai:mainfrom
mschrader15:plotly-numeric
Open

feat: plot_numeric_data for plotly_wrapper#395
mschrader15 wants to merge 2 commits into
kraina-ai:mainfrom
mschrader15:plotly-numeric

Conversation

@mschrader15
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Max <mcschrader@crimson.ua.edu>
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 31, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.74%. Comparing base (b9894e9) to head (7d876f9).
⚠️ Report is 142 commits behind head on main.

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     
Flag Coverage Δ
macos-latest-python3.11 87.16% <ø> (-0.48%) ⬇️
ubuntu-latest-python3.10 87.06% <ø> (-0.41%) ⬇️
ubuntu-latest-python3.11 87.12% <ø> (-0.41%) ⬇️
ubuntu-latest-python3.8 87.04% <ø> (-0.48%) ⬇️
ubuntu-latest-python3.9 87.04% <ø> (-0.42%) ⬇️
windows-latest-python3.11 87.23% <ø> (-0.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@piotrgramacki piotrgramacki left a 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,
Copy link
Copy Markdown
Collaborator

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
Copy link
Copy Markdown
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants