CSE 163
Geopandas�
Suh Young Choi�
🎶 Listening to: Johnny Cash
💬 Before Class: What is your favorite world flag?
Announcements
Midterm evaluations have opened!
Checkpoint 4 due tonight
HW4 and LR4 due on Thursday
Bonus Dataset Finding Activity releases after class—due next Monday (7/31)
2
Checking in with the Check-ins
Checkpoint Tokens and Lesson completions now on Canvas
Key topics for the LRs
3
This Time
Last Time
4
Geopandas
5
import geopandas as gpd
df = gpd.read_file('data_file.shp')
df.plot(column='some_col', legend=True)
plt.savefig('plot.png')
Important!
6
import geopandas as gpd
import pandas as pd
gdf = gpd.read_file('data_file.shp’)
df = pd.read_csv('data.csv’)
# Don’t do this!!
gdf = gpd.read_file('data.csv’)
zip
7
x = [1,2,3]
y = [4,5,6]
zip(x, y)
[(1,4), (2,5), (3,6)]
Matplotlib
8
ax
fig
fig, ax = plt.subplots(1)
<plot1>(ax=ax)
<plot2>(ax=ax)
fig.savefig('plot.png')
plot1
plot2
Hurricane Florence
9
LR topics may include:
10
Before Next Time
Next Time
11