3.2.2.1 Prepare source file for administrative structure
Prepare your administrative structure source file following the Humdata standard. This is a csv file for every administrative division in your country. You can import and create csv files in Excel or Google Drive.
Using our locations.csv (2 levels) file as an example, download and create a new csv file with the Humdata compatible administrative division information for your country.
Do not change or re-format the header row as the seeding process requires these names to be precise in order to parse the csv. Do not use commas in any cell and do not have any empty rows.
The admin<level>Pcode column is a unique statistical identifier for each level. We often refer to this as a statisticalID in the code. This could be a unique identifier you already use in your statistical analysis. Alternatively you could create unique identifiers programatically, using Excel or using an online UUID generator website for which there are many free ones available. It is important to note that the admin<level>Pcode must contain no spaces, rich text or commas The admin<level>Name_en column contains the default human readable name for the level and the admin<level>Name_alias column allows you to add one other localised language or character set. It is important to note that the names must contain no commas It should be clear in the Humdata standard how hierarchy of administrative levels is achieved from the example. You should see how you can increase or decrease the number of columns to configure from 1 to 5 standardised levels.\
Note: It is very important that there are no empty extra lines in the csv document as the script will attempt to import empty rows. Any commas are treated as separators between data. This is how a csv works. So there must be no commas in any data field.
Last updated