dhmit / democracy_africa

dhmit's spring 2020 project - Democracy and Development: Perspectives from Africa
4 stars 2 forks source link

Add script to create better africa.geojson #31

Closed ryaanahmed closed 4 years ago

ryaanahmed commented 4 years ago

This PR adds a data preprocessing script to construct a higher resolution GeoJSON file, which includes island countries missing from our earlier JSON.

A few things left to be done here -- particularly better handling of disputed territories.

This also creates a situation in the map quiz where we now have all of the countries... but the geometries for, e.g., Cape Verde are too small to click on easily. Not impossible, but hard to use. We'll probably have to use the bounding boxes instead of the paths for the click handlers for those.

ryaanahmed commented 4 years ago

@JasonLin43212 -- did some additional scripting to merge the geometries of the disputed territories into the nearby nations. Please take another quick look to sanity check, then I'll merge.

JasonLin43212 commented 4 years ago

@ryaanahmed It seems like the merge_geometries function sort of works. There seems to be some remaining lines between the disputed territories. I'm not sure how to go about removing them since you used a function from a library to do the merging. som

ryaanahmed commented 4 years ago

Nice catch -- I'd noticed this seam, too. I think it's because the geometries are not completely overlapping / do not completely share a boundary. I'm going to put this in the category of "good enough for right now" and file an issue to improve down the road. I think we're going to have to do some manual tweaking.