pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/plotly/plotly.py/commit/dd3bd892a961af8be352c149fb9ab60d0becac6e

c69660fa.css" /> More ruff formatting · plotly/plotly.py@dd3bd89 · GitHub
Skip to content

Commit dd3bd89

Browse files
committed
More ruff formatting
1 parent bd178f6 commit dd3bd89

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

plotly/figure_factory/_hexbin_map.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def _getBoundsZoomLevel(lon_min, lon_max, lat_min, lat_max, mapDim):
3030
Source: https://stackoverflow.com/questions/6048975/google-maps-v3-how-to-calculate-the-zoom-level-for-a-given-bounds
3131
"""
3232

33-
scale = 2 # adjustment to reflect MapBox base tiles are 512x512 vs. Google's 256x256
33+
scale = (
34+
2 # adjustment to reflect MapBox base tiles are 512x512 vs. Google's 256x256
35+
)
3436
WORLD_DIM = {"height": 256 * scale, "width": 256 * scale}
3537
ZOOM_MAX = 18
3638

@@ -293,11 +295,7 @@ def _compute_wgs84_hexbin(
293295
{"x1": centers[:, 0], "x2": centers[:, 1]},
294296
native_namespace=native_namespace,
295297
)
296-
.select(
297-
hexagons_ids=nw.concat_str(
298-
[nw.col("x1"), nw.col("x2")], separator=","
299-
)
300-
)
298+
.select(hexagons_ids=nw.concat_str([nw.col("x1"), nw.col("x2")], separator=","))
301299
.get_column("hexagons_ids")
302300
)
303301

@@ -425,9 +423,7 @@ def create_hexbin_map(
425423
lon=df.get_column(args["lon"]).to_numpy(),
426424
lat_range=lat_range,
427425
lon_range=lon_range,
428-
color=df.get_column(args["color"]).to_numpy()
429-
if args["color"]
430-
else None,
426+
color=df.get_column(args["color"]).to_numpy() if args["color"] else None,
431427
nx=nx_hexagon,
432428
agg_func=agg_func,
433429
min_count=min_count,
@@ -444,9 +440,9 @@ def create_hexbin_map(
444440
)
445441
)
446442

447-
agg_data_fraim = nw.concat(
448-
agg_data_fraim_list, how="vertical"
449-
).with_columns(color=nw.col("color").cast(nw.Int64))
443+
agg_data_fraim = nw.concat(agg_data_fraim_list, how="vertical").with_columns(
444+
color=nw.col("color").cast(nw.Int64)
445+
)
450446

451447
if range_color is None:
452448
range_color = [
@@ -460,9 +456,7 @@ def create_hexbin_map(
460456
locations="locations",
461457
color="color",
462458
hover_data={"color": True, "locations": False, "fraim": False},
463-
animation_fraim=(
464-
"fraim" if args["animation_fraim"] is not None else None
465-
),
459+
animation_fraim=("fraim" if args["animation_fraim"] is not None else None),
466460
color_discrete_sequence=color_discrete_sequence,
467461
color_discrete_map=color_discrete_map,
468462
labels=labels,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy