Solution: Basic I/O

Follow the step-by-step solution to the Basic I/O challenge.

Solution: Exporting data to KML

Let's take a look the the solution and review the code.

Press + to interact
import geopandas as gpd
import fiona
import geodatasets
# Update fiona supported drivers
fiona.supported_drivers.update({'KML': 'w'})
# Open the natural earth dataset
n_earth = geodatasets.get_path('naturalearth.land')
gdf = gpd.read_file(n_earth)
# Save the file using the KML driver
gdf.to_file('output/naturalearth.kml', driver='KML')

...

Access this course and 1400+ top-rated courses and projects.