CSE 163
Geopandas�
Suh Young Choi�
🎶 Listening to: Unwed Sailor
💬 Make sure to join the Slido!�🪶 Question of the Day: Do you have a favorite flag?
Or go to slido.com and enter:
#1174074
Announcements
Project proposals due Wednesday (May 14)
Education Interview grades released
Search grades released later tonight ☺
Education resubmissions close on Thursday (May 15)
2
This Time
Last Time
3
Geospatial Data
4
Geopandas
5
Geopandas
6
import geopandas as gpd
df = gpd.read_file('data_file.shp')
df.plot(column='some_col', legend=True)
plt.savefig('plot.png')
Matplotlib
7
fig, ax = plt.subplots()
<plot1>(ax=ax)
<plot2>(ax=ax)
fig.savefig('plot_together.png')
fig, [ax1, ax2] = plt.subplots(1, 2) # nrows, ncols
<plot1>(ax=ax1)
<plot2>(ax=ax2)
fig.savefig('plot_separate.png')
Matplotlib
8
fig
ax1
ax2
fig, [ax1, ax2] = plt.subplots(1, 2) # nrows, ncols
<plot1>(ax=ax1)
<plot2>(ax=ax2)
fig.savefig('plot_separate.png')
Matplotlib
9
fig
ax1
ax2
fig, [ax1, ax2] = plt.subplots(1, 2) # nrows, ncols
<plot1>(ax=ax1)
<plot2>(ax=ax2)
fig.savefig('plot_separate.png')
Matplotlib
10
fig
ax1
ax2
fig, [ax1, ax2] = plt.subplots(1, 2) # nrows, ncols
<plot1>(ax=ax1)
<plot2>(ax=ax2)
fig.savefig('plot_separate.png')
Jupyter time!
11
“
Before Next Time
Next Time
12