Skip to content

Commit

Permalink
remove soon to be deprecated use of read_json in pandas and pass a St…
Browse files Browse the repository at this point in the history
…ringIO object
  • Loading branch information
AjayThorve committed Feb 8, 2024
1 parent a18f7af commit ba1d57f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/cuxfilter/assets/geojson_mapper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from urllib.request import urlopen
import geopandas as gpd
import pandas as pd
from io import StringIO


def geo_json_mapper(
Expand All @@ -16,7 +17,7 @@ def geo_json_mapper(

temp_gpd_df = gpd.read_file(data).to_crs(epsg=projection)

df = pd.read_json(temp_gpd_df.to_json())
df = pd.read_json(StringIO(temp_gpd_df.to_json()))

x_range = (
temp_gpd_df.geometry.bounds.minx.min(),
Expand Down

0 comments on commit ba1d57f

Please sign in to comment.