Home assignment 4#
Last updated: 2025-01-15 17:45:03
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). You can do this step manually, e.g., in Excel, and not in your Python code.Define a
str
variable with your selected city nameCreate a subset of the
towns
layer which includes the neighbors of (i.e., intersecting with) the town you selectedPlot 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'
)
Question 2#
Calculate
'על יסודי'
education facilities density, i.e., number of facilities per \(km^2\) (\(1 / km^2\) units), in statistical areas of Beer-Sheva ('statisticalareas_demography2019.gdb'
) based on records of type'על יסודי'
in'education.csv'
Plot the density values using the
'Reds'
colormap (cmap='Reds'
) with a legend (legend=True
), as well as the facilities (as points)Keep in mind that the map has to display all statistical areas in Beer-Sheva, even thouse without any
'על יסודי'
facility (in which case density should be0
)Use
color='none',edgecolor='black'
to plot the facilities as empty circles