求 Urban Residents 社区的面积
Urban Residents 社区有多大?
本练习是课程的一部分
在 Python 中可视化地理空间数据
练习说明
- 打印 urban 多边形,并留意每组经度/纬度的单位。
- 对
urban_polygon调用to_crs()来创建urban_poly_3857,然后再次打印表头。注意每组经度/纬度的单位已经改变。 - 打印
urban_poly_3857的面积。记得除以10**6将其转换为平方千米。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Print the head of the urban polygon
print(urban_polygon.____())
# Create a copy of the urban_polygon using EPSG:3857 and print the head
urban_poly_3857 = urban_polygon.____(epsg = ____)
print(urban_poly_3857.head())
# Print the area of urban_poly_3857 in kilometers squared
area = urban_poly_3857.____ / ____
print('The area of the Urban Residents neighborhood is ', area[0], ' km squared')