Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Information on generating custom Population Density files #461

Open
hughormonducd opened this issue Dec 4, 2020 · 1 comment
Open

Information on generating custom Population Density files #461

hughormonducd opened this issue Dec 4, 2020 · 1 comment

Comments

@hughormonducd
Copy link

Hi all,

My name is Hugh and I am from the COMBAT team at University College Dublin. We are interested in experimenting with this model with our own inputs, but I can't find details on how the .shp and .dbf files mentioned to generate population density files should be structured and created.

Are there any more resources available describing the population density, or perhaps examples of these files used to generate the population density files?

Thanks in advance
Hugh
COMBAT is a rapid response Science Foundation Ireland funded project developing a COVID-19 Agent Based Model localised to Ireland.

@weshinsley
Copy link
Collaborator

weshinsley commented Dec 7, 2020

Hi Hugh, thanks for getting in touch, and sorry for the slight pause - we are being kept really busy with everything.

It's not a difficult job, just a bit fiddly. This repo is really designed for people to use the existing population we've set up (so you can reproduce our results exactly) - it's not quite so well-suited for starting out from scratch. I will try and get some code into the repo to do this (but can't promise a timeline) - but the basic process is like this - it can probably be done in ArcGIS.

You'll need some spatial population data - worldpop (open source), or Landscan (academic license) are the two main options. You'll end up with a 43200x21600 grid of lon/lat squares (1/120 degrees) with population counts in each.

You then need to mash this with your SHP/DBF files (eg. from gadm.org), to produce a long text file with lines in this form - no header, separated with white-space (space or tab) lines like this:

-0.85   60.833332       2       44      440300

The columns are longitude, latitude, population of the cell, country code, and admin code. The country/admin code are in groups of 2 digits - our UK country code is 44; the admin code also starts with this, and is followed by two digits for the ADM1 unit, and another two for the ADM2 - in this case zero, as we only went to ADM1 level. (03 in this example represents Scotland). IN another population file I have, 440327 ends up being Shetland. The long/lat are lower-left corners of a cell of size (1/120) long and lat.

That's the population density file done then - that goes on /D: on the command-line. You'll also need to set the parameter file to which admin units you're wanting to include - look for

[List of level 1 administrative units to include] and
[Codes and country/province names for admin units]

Hope that's enough to get you started - I will try and add some more support code to make this easier when I can.

Best,
Wes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants