เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

ฝึก Spatial Join

มีความแตกต่างระหว่างข้อมูลศิลปะ (point data) ที่ intersects กับละแวกบ้าน (polygon data) และข้อมูลศิลปะ (point data) ที่อยู่ within ละแวกบ้าน (polygon data) หรือไม่? ลองสำรวจ spatial join รูปแบบต่าง ๆ โดยใช้ GeoDataFrame art_geo และ neighborhoods ที่โหลดไว้ให้แล้ว

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

การแสดงผลข้อมูลเชิงภูมิศาสตร์ด้วย Python

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Spatially join art_geo and neighborhoods 
art_intersect_neighborhoods = gpd.____(art_geo, neighborhoods, predicate = ____)

# Print the shape property of art_intersect_neighborhoods
print(art_intersect_neighborhoods.____)
แก้ไขและรันโค้ด