From 27c644d41994ca03d5b813e47636a71e00c8fec8 Mon Sep 17 00:00:00 2001 From: Randy Zwitch Date: Wed, 9 Oct 2024 16:04:57 -0400 Subject: [PATCH] Fix FutureWarning about literal json --- examples/pages/geojson_popup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/pages/geojson_popup.py b/examples/pages/geojson_popup.py index 22d74d2..d94b689 100644 --- a/examples/pages/geojson_popup.py +++ b/examples/pages/geojson_popup.py @@ -1,3 +1,5 @@ +import io + import branca import folium import geopandas @@ -32,7 +34,7 @@ def get_df() -> pd.DataFrame: "https://gist.githubusercontent.com/tvpmb/4734703/raw/" "b54d03154c339ed3047c66fefcece4727dfc931a/US%2520State%2520List" ) - abbrs = pd.read_json(response.text) + abbrs = pd.read_json(io.StringIO(response.text)) statesmerge = states.merge(abbrs, how="left", left_on="name", right_on="name") statesmerge["geometry"] = statesmerge.geometry.simplify(0.05)