This respository contains code to produce geographical simulations of Cornish and Welsh over the time periods considered in the study.
The pipeline is as follows:
- Obtain shapefiles of regions and census Output Areas from UK Gov website. For example,
wales_mask.npycontains the shape for Wales (the binary mask used to determine the region over which the simulation is performed) andwales_pop.npycontains the population for each region (for methodological reasons each pixel of the element in the array contains the population of the region that element is in). - Following the method from Burridge, smooth the population distribution by replacing the population in each Output Area with a Gaussian distribution, with population falling outside the region iteratively redistributed so the total population is preserved. This is done using
smooth_population.pyand the resulting file is calledwales_smoothed_dist_ss10.npy(ssreferring to σ_s). - The simulation carried out with
simulate_wales.py, using the population distribution generated above, the initial conditionwales_initial_1850.npyand the region masks. Snapshots are saved in an automatically generated folder everysaveIntervaliterations. Be warned: the simulation can be very intensive (HPC was used to create the figures in the report). - Figures are plotted and comparisons made to historical data using the various files in the repo (
cornwall/wales_pop/area.py,snapshotsWales/Cornwall.py, etc.)