Lecture 15: Geopandas
Autumn 2026
1
Sli.do
#cse163
Questions?
Icebreaker
Favorite travel destination(s)?
CSE 163
CSE 163: Geopandas
Announcements
2
Questions?
CSE 163: Geopandas
zip
3
x = [1,2,3]
y = [4,5,6]
zip(x, y)
CSE 163: Geopandas
Geospatial Data: Map representation of data
4
CSE 163: Geopandas
Geopandas: pandas with geospatial data
5
import geopandas as gpd
df = gpd.read_file('data_file.shp')
df.plot(column='some_col', legend=True)
plt.savefig('plot.png')
CSE 163: Geopandas
Geopandas: Shapes
6
CSE 163: Geopandas
Matplotlib
7
fig, ax = plt.subplots(1)
<plot1>(ax=ax)
<plot2>(ax=ax)
fig.savefig('plot_together.png')
CSE 163: Geopandas
Matplotlib
8
fig, ax = plt.subplots(1)
<plot1>(ax=ax)
<plot2>(ax=ax)
fig.savefig('plot_together.png')
fig, [ax1, ax2] = plt.subplots(1, 2) # width, height
<plot1>(ax=ax1)
<plot2>(ax=ax2)
fig.savefig('plot_separate.png')
CSE 163: Geopandas
Matplotlib
9
fig
ax1
ax2
CSE 163: Geopandas
Matplotlib
10
fig
ax1
ax2
CSE 163: Geopandas
Matplotlib
11
fig
ax1
ax2
CSE 163: Geopandas
Hurricane Florence Example
12
CSE 163: Geopandas
Hurricane Florence Example
13
CSE 163: Geopandas