空間連接練習
藝術作品(點資料)與社區(多邊形資料)之間,使用 intersects(相交)和 within(位於內部)這兩種關係做空間連接,結果會有差異嗎?請用已為你預先載入的 art_geo 和 neighborhoods 這兩個 GeoDataFrame,嘗試不同的空間連接方式。
本練習屬於課程
在 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.____)