The Black Death


Imagine that you are an epidemiologist looking back at the Black Death outbreak in 1665. You want to calculate the total deaths from the disease using historical figures of rat populations (recorded by the local rat catchers) and the population density (derived from the parish records).

You know from small scale studies that the relationship between average rats caught per week per 100m x 100m square(r), average population density per 100m x 100m square(p) and average deaths per week per 100m x 100m square(d) is...

d = (0.8 x r) x (1.3 x p)

You have files containing a raster map of average population densities per 100m x 100m square for 16 square parishes in London. You also have an area map of average rats caught per week per 100m x 100m square for each rat catcher's area of work. These are stored as text digits. One value represents a 100m x 100m square area, but the figures are averaged at the Parish or Rat Catcher area scale and then smoothly distributed between the appropriate individual areas.

Write a program that does the following.

  1. Pulls in the two maps and puts them in Images. Each pixel will represent a 100m x 100m square area.

  2. Calculates a map showing average deaths per 100m x 100m square area for the different geographical regions produced by the intersection of the two images.

    I.e. run through the maps and pull out the values for each pair of equivalently positioned cells. Put them through the equation above to produce a two dimensional array of absolute deaths that you can convert into an Image mapping the deaths.

  3. Has a GUI that displays the three maps as Images. You'll need to turn deaths into an Image/map with the range of the deaths shown on a scale between 0 and 255 rather than absolute figures.

  4. Saves the death map as a text file of absolute deaths. Each line should equal a line on the map.

  5. Displays the total deaths per week.

Additional marks are awarded for the following.

Allowing the user to change the parameter weights for the equation.

Files for this project.

2 x (400 by 400) raster maps with blocks of consistant average values in them. One represents average rats caught for that area per and the other represents the average population density for the area.

The blocks are not the same in the two files. One represents parishes, the other the domains of the rat catchers. The information for both are stored as text numbers. Each number represents a 100 x 100m area. The values are laid out from the upper left to lower right of the raster image, with each line being a line of the rasters.