Skip to content

Commit 9c0488e

Browse files
authored
docs: Resolve geopandas.read_file(...) warnings (#3795)
1 parent 92228f8 commit 9c0488e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

doc/user_guide/marks/geoshape.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Here we lookup the field ``rate`` from the ``df_us_unemp`` DataFrame, where the
254254
from vega_datasets import data
255255
import geopandas as gpd
256256

257-
gdf_us_counties = gpd.read_file(data.us_10m.url, driver='TopoJSON', layer='counties')
257+
gdf_us_counties = gpd.read_file(data.us_10m.url, layer="counties")
258258
df_us_unemp = data.unemployment()
259259

260260
alt.Chart(gdf_us_counties).mark_geoshape().transform_lookup(
@@ -470,7 +470,7 @@ regular faceting will not work for geographic visualization:
470470
.. altair-plot::
471471

472472
source = data.population_engineers_hurricanes().melt(id_vars=['state', 'id'])
473-
us_states = gpd.read_file(data.us_10m.url, driver='TopoJSON', layer='states')
473+
us_states = gpd.read_file(data.us_10m.url, layer="states")
474474
gdf_comb = gpd.GeoDataFrame(source.join(us_states, on='id', rsuffix='_y'))
475475

476476
alt.Chart(gdf_comb).mark_geoshape().encode(
@@ -524,7 +524,7 @@ populous states. Using an ``alt.selection_point()`` we define a selection parame
524524
import geopandas as gpd
525525

526526
# load the data
527-
us_states = gpd.read_file(data.us_10m.url, driver="TopoJSON", layer="states")
527+
us_states = gpd.read_file(data.us_10m.url, layer="states")
528528
us_population = data.population_engineers_hurricanes()[["state", "id", "population"]]
529529

530530
# define a pointer selection
@@ -583,8 +583,8 @@ We use here an elegant way to access the nested point coordinates from the geome
583583
import geopandas as gpd
584584

585585
# load data
586-
gdf_quakies = gpd.read_file(data.earthquakes.url, driver="GeoJSON")
587-
gdf_world = gpd.read_file(data.world_110m.url, driver="TopoJSON")
586+
gdf_quakies = gpd.read_file(data.earthquakes.url)
587+
gdf_world = gpd.read_file(data.world_110m.url, layer="countries")
588588

589589
# define parameters
590590
range0 = alt.binding_range(min=-180, max=180, step=5, name='rotate longitude ')

tests/examples_arguments_syntax/interval_selection_map_quakes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import geopandas as gpd
1212

1313
# load data
14-
gdf_quakies = gpd.read_file(data.earthquakes.url, driver="GeoJSON")
15-
gdf_world = gpd.read_file(data.world_110m.url, driver="TopoJSON")
14+
gdf_quakies = gpd.read_file(data.earthquakes.url)
15+
gdf_world = gpd.read_file(data.world_110m.url, layer="countries")
1616

1717
# defintion for interactive brush
1818
brush = alt.selection_interval(

tests/examples_methods_syntax/interval_selection_map_quakes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import geopandas as gpd
1212

1313
# load data
14-
gdf_quakies = gpd.read_file(data.earthquakes.url, driver="GeoJSON")
15-
gdf_world = gpd.read_file(data.world_110m.url, driver="TopoJSON")
14+
gdf_quakies = gpd.read_file(data.earthquakes.url)
15+
gdf_world = gpd.read_file(data.world_110m.url, layer="countries")
1616

1717
# defintion for interactive brush
1818
brush = alt.selection_interval(

0 commit comments

Comments
 (0)