unicef / magicbox-maps

Map mobility data in a NodeJS + React front-end application with data served by magicbox-open-api
http://magicbox-maps.azurewebsites.net
BSD 3-Clause "New" or "Revised" License
11 stars 11 forks source link

Completes color admins by HDI #69

Closed mikefab closed 6 years ago

mikefab commented 6 years ago

Completes: I want to see a map with admin areas colored by Human Development Index,HDI), so that I can see which areas are more and less vulnerable to poverty.

I created mpio-hdi.json by combining colombia_hdipob.csv with mpio.json joining on CODMUN using:

// Convert colombia_hdipob.csv to json.
// Then, in node console:
let hdi = require('colombia_hdipob')
let j = require('mpio.json')

hdi.forEach(e=>{
  let f = j.features.find(f => {
    return f.properties.CODMUN ==  e.CODMUN
  });
   f.properties.hdi = e.hdi
})
require('jsonfile').writeFileSync('mpio-hdi.json', j)

screen shot 2018-03-23 at 4 15 18 pm

rdebeasi commented 6 years ago

Cool, this looks great. I'll write this logic in Python and put it in mapbox-data so that David can integrate your work here with the aggregation logic.