Skip to content

Commit 315ccd4

Browse files
committed
Update _county_choropleth.py
1 parent 3a22960 commit 315ccd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/python/plotly/plotly/figure_factory/_county_choropleth.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,15 @@ def _calculations(
358358
elif fips_polygon_map[f].type == "MultiPolygon":
359359
x = [
360360
poly.simplify(simplify_county).exterior.xy[0].tolist()
361-
for poly in fips_polygon_map[f]
361+
for poly in fips_polygon_map[f].geoms
362362
]
363363
y = [
364364
poly.simplify(simplify_county).exterior.xy[1].tolist()
365-
for poly in fips_polygon_map[f]
365+
for poly in fips_polygon_map[f].geoms
366366
]
367367

368-
x_c = [poly.centroid.xy[0].tolist() for poly in fips_polygon_map[f]]
369-
y_c = [poly.centroid.xy[1].tolist() for poly in fips_polygon_map[f]]
368+
x_c = [poly.centroid.xy[0].tolist() for poly in fips_polygon_map[f].geoms]
369+
y_c = [poly.centroid.xy[1].tolist() for poly in fips_polygon_map[f].geoms]
370370

371371
county_name_str = str(df[df["FIPS"] == f]["COUNTY_NAME"].iloc[0])
372372
state_name_str = str(df[df["FIPS"] == f]["STATE_NAME"].iloc[0])

0 commit comments

Comments
 (0)