CSE 163
Geopandas�
Suh Young Choi
Announcements
THA 4 Peer Reviews due tonight
Checkpoint 4 (Stats, ML, and Maps) open now; due next Monday
Project/Portfolio Part 2 due tomorrow
THA 5: Mapping due next Thursday
No resubmissions on the Creative Component (unless… 👀)
2
This Time
Last Time
3
Geospatial Data
4
Shapes
5
zip
6
x = [1,2,3]
y = [4,5,6]
zip(x, y)
Geopandas
7
import geopandas as gpd
df = gpd.read_file('data_file.shp')
df.plot(column='some_col', legend=True)
plt.savefig('plot.png')
Matplotlib
8
fig, ax = plt.subplots(1)
<plot1>(ax=ax)
<plot2>(ax=ax)
fig.savefig('plot_together.png')
Matplotlib
9
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
10
fig
ax1
ax2
Matplotlib
11
fig
ax1
ax2
Matplotlib
12
fig
ax1
ax2
Hurricane Florence
13
Hurricane Florence
14
Before Next Time
● Complete Lesson 17
○ Remember not for points, but do go towards Weekly Tokens
● THA 4 Peer Reviews due tonight
● Complete Project/Portfolio Part 2!
● Go to section tomorrow!!
Next Time
15