-
-
Couldn't load subscription status.
- Fork 2.7k
create_hexbin_mapbox uses *_map chart types instead of *_mapbox #5358
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
Changes from 8 commits
7c589f8
b9a271d
565a92c
cd2d4ad
bd178f6
5b38811
dd3bd89
ebb6209
4d8fbc4
9773b5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ import plotly.express as px | |
| px.set_mapbox_access_token(open(".mapbox_token").read()) | ||
| df = px.data.carshare() | ||
|
|
||
| fig = ff.create_hexbin_mapbox( | ||
| fig = ff.create_hexbin_map( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 9773b5 |
||
| data_frame=df, lat="centroid_lat", lon="centroid_lon", | ||
| nx_hexagon=10, opacity=0.9, labels={"color": "Point Count"}, | ||
| ) | ||
|
|
@@ -63,7 +63,7 @@ import plotly.express as px | |
| px.set_mapbox_access_token(open(".mapbox_token").read()) | ||
| df = px.data.carshare() | ||
|
|
||
| fig = ff.create_hexbin_mapbox( | ||
| fig = ff.create_hexbin_map( | ||
| data_frame=df, lat="centroid_lat", lon="centroid_lon", | ||
| nx_hexagon=10, opacity=0.5, labels={"color": "Point Count"}, | ||
| min_count=1, | ||
|
|
@@ -80,7 +80,7 @@ import plotly.express as px | |
| px.set_mapbox_access_token(open(".mapbox_token").read()) | ||
| df = px.data.carshare() | ||
|
|
||
| fig = ff.create_hexbin_mapbox( | ||
| fig = ff.create_hexbin_map( | ||
| data_frame=df, lat="centroid_lat", lon="centroid_lon", | ||
| nx_hexagon=10, opacity=0.5, labels={"color": "Point Count"}, | ||
| min_count=1, color_continuous_scale="Viridis", | ||
|
|
@@ -100,7 +100,7 @@ import numpy as np | |
| px.set_mapbox_access_token(open(".mapbox_token").read()) | ||
| df = px.data.carshare() | ||
|
|
||
| fig = ff.create_hexbin_mapbox( | ||
| fig = ff.create_hexbin_map( | ||
| data_frame=df, lat="centroid_lat", lon="centroid_lon", | ||
| nx_hexagon=10, opacity=0.9, labels={"color": "Average Peak Hour"}, | ||
| color="peak_hour", agg_func=np.mean, color_continuous_scale="Icefire", range_color=[0,23] | ||
|
|
@@ -118,7 +118,7 @@ import numpy as np | |
| px.set_mapbox_access_token(open(".mapbox_token").read()) | ||
| df = px.data.carshare() | ||
|
|
||
| fig = ff.create_hexbin_mapbox( | ||
| fig = ff.create_hexbin_map( | ||
| data_frame=df, lat="centroid_lat", lon="centroid_lon", | ||
| nx_hexagon=10, opacity=0.9, labels={"color": "Summed Car.Hours"}, | ||
| color="car_hours", agg_func=np.sum, color_continuous_scale="Magma" | ||
|
|
@@ -150,7 +150,7 @@ frame = np.concatenate([ | |
| np.ones(N, int) * i for i in range(n_frames) | ||
| ]) | ||
|
|
||
| fig = ff.create_hexbin_mapbox( | ||
| fig = ff.create_hexbin_map( | ||
| lat=lat, lon=lon, nx_hexagon=15, animation_frame=frame, | ||
| color_continuous_scale="Cividis", labels={"color": "Point Count", "frame": "Period"}, | ||
| opacity=0.5, min_count=1, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,14 +29,14 @@ | |
|
|
||
| if optional_imports.get_module("pandas") is not None: | ||
| from plotly.figure_factory._county_choropleth import create_choropleth | ||
| from plotly.figure_factory._hexbin_mapbox import create_hexbin_mapbox | ||
| from plotly.figure_factory._hexbin_map import create_hexbin_map | ||
|
||
| else: | ||
|
|
||
| def create_choropleth(*args, **kwargs): | ||
| raise ImportError("Please install pandas to use `create_choropleth`") | ||
|
|
||
| def create_hexbin_mapbox(*args, **kwargs): | ||
| raise ImportError("Please install pandas to use `create_hexbin_mapbox`") | ||
| def create_hexbin_map(*args, **kwargs): | ||
| raise ImportError("Please install pandas to use `create_hexbin_map`") | ||
|
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
def create_hexbin_map(*args, **kwargs):
raise ImportError("Please install pandas to use `create_hexbin_map`")
def create_hexbin_map(*args, **kwargs):
raise ImportError("Please install pandas to use `create_hexbin_map`")
def create_hexbin_mapbox(*args, **kwargs):
raise ImportError("Please install pandas to use `create_hexbin_mapbox`")
|
||
|
|
||
|
|
||
| if optional_imports.get_module("skimage") is not None: | ||
|
|
@@ -57,7 +57,7 @@ def create_ternary_contour(*args, **kwargs): | |
| "create_distplot", | ||
| "create_facet_grid", | ||
| "create_gantt", | ||
| "create_hexbin_mapbox", | ||
| "create_hexbin_map", | ||
emilykl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "create_ohlc", | ||
| "create_quiver", | ||
| "create_scatterplotmatrix", | ||
|
|
||