Skip to content

Collecting and visualizing data in NepalMap

Clifton McIntosh edited this page Oct 23, 2017 · 2 revisions

There are several steps to adding a data set. We welcome a contribution that accomplishes any or all of that work. If the data is in PDF form, the first steps would be:

  • extracting data from a PDF into a CSV
  • converting data into a format (typically CSV) that can be used to populate a table

It is possible to do these steps as one.

If the data is already in a CSV, it will need transforming into a shape that can be used in NepalMap.

Here are some simple rules:

  • Every unit at the same geo_level (like "district" or "country") must have data for every data point in the data set. Filling in with zeroes for a particular location is permissible if lack of data in the data set is a sign that the thing did not exist in a particular location. For example, if we have data on the number of hectares devoted to tea growing for only 10 districts because tea is only grown in 10 districts, then it is logical and permissible to list zero hectacres devoted to tea growing for the other districts. Be careful to make sure that lack of data in the data set really means there is none of the thing that you are counting in the locations for which we have no data.
  • If there is no national total in the data set we also need to sum up all the district entries to get national totals.

Using census data for religion as an example, the format for the data would look something like:

geo_code, geo_level, religion, sex, total
01,district,Hindu,male,21957
01,district,Hindu,female,23801
01,district,Buddhist,male,12308
01,district,Buddhist,female,13846
01,district,Islam,male,1
01,district,Islam,female,1
01,district,Kirati,male,24064
01,district,Kirati,female,27764
...

(The data for this is example is in Table 8 here, starting on page 278.)

The mappings from district name to geo_code can be found here. ("01" is the code for Taplejung.) The maptools project also has samples of scripts that have been used to transform data.

After data conversion here are the steps we take to get the data into www.nepalmap.org

Clone this wiki locally