Home assignment 4

Home assignment 4#

Last updated: 2024-02-24 18:05:22

Question 1#

  • Read the towns ('muni_il.shp') layer (see Sample data).

  • Aggregate the towns layer according to the 'Muni_Eng' column, to dissolve the separate polygons per town (see Aggregation (.dissolve)).

  • Choose a city that starts with the same English letter as your first name (e.g., 'Metula' if your first name is Michael).

  • Create a subset of the towns layer which includes the neighbors of (i.e., intersecting with) the town you selected.

  • Plot the resulting layer, using different colors for the selected town and for the neighbors.

  • Note that you cannot specify any specific town names or indices other than the string with the name of the selected town (e.g., 'Metula').

_images/cc65abcf6dbb4ccc039364993e2d3323b4e9bf5370cf0766272f05e11a0d00f5.png

Question 2#

  • Calculate tree density, i.e., number of trees per \(km^2\) (\(1 / km^2\) units), in statistical areas of Beer-Sheva ('statisticalareas_demography2019.gdb') based on tree records in 'trees.csv'.

  • Plot the density values using the 'Reds' colormap (cmap='Reds') with a legend (legend=True).

_images/e754882013273ccd118449a729a7dc15c16d295faadaa7b38d04f003dbbe288e.png