ABM model looking at population decrease in Detroit, focusing specifically on the effect of education and schools.
The data files are taken from the American Community Survey (ACS) through the census data API and the censusdata library (https://pypi.org/project/CensusData/). The school data was imported from the Detroit Public SchoolsCommunity District, and scoring considered in the analysis is the Michigan Index.
The ABM analysis will also include GIS elements. To do so, the library geo-mesa, which builds on the mesa library adding geographical features such as geometry of the agents, was used. Moreover the model is not completely dynamic as there is no influx of new people to the city, only individuals moving within Detroit and, eventually, leaving (shrinkage).
(i) Zip: each zip area is defined as an agent, with its associated area taken from official shapefiles. They also contain information about the number of households, schools, vacant houses they contained, as well as ethnic and family characteristics of households. (ii) Schools: their shape was defined as a point at their official address. All available information about the schools were added to the agents. (iii) Households: each household was initialised at a random point within their assigned zip code. The first features added were family status and size, generated to match direct counts over the zips. From the family status and household size, the presence of children was computed (1 โ P(notchild|f amilystatus) (householdsize)). Conditioning on the family status, the ethnicity and tenure type (renter or owner) were drawn, from the computed percentages of these attributes conditioned on family types in the official census data. Income was added the same way by conditioning on household ethnicity. Finally, monthly spending on housing was drawn conditioning on tenure and income. This result was available as a percentage of monthly income, and then turned as a dollar value. (iv) Houses had two availability statuses: as households are initialised, the associated house is generated, with availability set to false. Once all households are initialised, the vacant ones are generated by drawing random points in their assigned zip. The house cost is computed by averaging the housing related spending of neighbouring occupied houses.
The model was ran as is, then changes were made to the initialisation values to obtain 3 different simulations: new schools were placed in zip codes with no schools, the school scores of the lowest performing schools were increased, and the budget of the poorer families with children was updated to simulation scholarships and remove education related costs.
A more detailed description and the input data folders can be found at the following link: https://drive.google.com/drive/folders/1n776OWlGaCtfMD6c2Rda_ccZTDjXZHIK?usp=sharing