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 815c0c1 commit 9f6a75c
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 9f6a75c

Please sign in to comment.