CSE 163
Geopandas�
Suh Young Choi
Announcements
Midterm evaluations have opened!
Checkpoint 2 + LR 4 due tonight
HW4 due this Thursday (unless… 👀)
2
This Time
Last Time
3
Geopandas
4
import geopandas as gpd
df = gpd.read_file('data_file.shp')
df.plot(column='some_col', legend=True)
plt.savefig('plot.png')
zip
5
x = [1,2,3]
y = [4,5,6]
zip(x, y)
Matplotlib
6
fig, ax = plt.subplots(1)
<plot1>(ax=ax)
<plot2>(ax=ax)
fig.savefig('plot_together.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) # width, height
<plot1>(ax=ax1)
<plot2>(ax=ax2)
fig.savefig('plot_separate.png')
Matplotlib
8
fig
ax1
ax2
Matplotlib
9
fig
ax1
ax2
Matplotlib
10
fig
ax1
ax2
Hurricane Florence
11
Hurricane Florence
12
Before Next Time
Next Time
13