Burkina-Faso-map
The objective of this small project is to prepare a GeoJSON representation of Burkina Faso's administrative regions and departments to be offered by the African country's government together with the newly launched open data portal to its citizen. The source of the maps is MapMaker Ltd.'s "Map Library" service (read the Licence chapter below for more information).
##Map format conversion
Conversion from MapMaker's shapefile to GeoJSON was performed using the ogr2ogr utility, part of GDAL, the open source geospatial data abstraction library.
After unzipping MapMakers' original shapefiles in data/raw, Two simple commands are sufficient to perform the conversion:
ogr2ogr -f data/processed/geoJSON burkinaFaso_regions.json data/raw/BUF-level_1_SHP/BUF-level_1.shp
ogr2ogr -f data/processed/geoJSON burkinaFaso_departments.json data/raw/BUF_admin_SHP/BUF.shp
Unfortunately MapMaker does not offer Burkina Faso provinces' map, although, with a little effort, that could be built by assembling together the boundaries of the departments that make one province.
It is important to consider the option to make the maps more suitable to bad or slow Internet connectivity by creating smaller GeoJSON files. This is achieved by losing some of the detail in the regions and provinces' boundaries definition, adding the -lco COORDINATE_PRECISION=[target_precision] to the above commands, where target_precision is an integer >=1, e.g.:
ogr2ogr -lco COORDINATE_PRECISION=3 -f geoJSON data/processed/burkinaFaso_regions.json data/raw/BUF-level_1_SHP/BUF-level_1.shp
ogr2ogr -lco COORDINATE_PRECISION=3 -f geoJSON data/processed/burkinaFaso_departments.json data/raw/BUF_admin_SHP/BUF.shp
The bigger the value used, the less detail is lost in creating the GeoJSON file. A value of 3 was used for the production of the GeoJSON files distributed with this project. See Bjørn Sandvik's great blog post "How to minify GeoJSON files?" for more detail.
##Adding functionality to the example map
The core JavaScript library used to build the example choropleth map that comes with this project is Leaflet. It is important that you study the tutorials and gain some degree of proficiency with it before you decide to add functionality on top of the existing code.
GeoJSON though is a standard open format that can be easily enhanced and transformed for many other kinds of uses. In that case, just use the GeoJSON files as your starting point, and have fun!
##Embedding the map in a document
You don't need to do anything, the code is already suitable for embedding, see this example, and this is how it looks like.
##Licence
The original Burkina Faso maps' shapefiles are sourced from MapMaker Ltd.'s "Map Library" service: a source of public domain basic map data concerning administrative boundaries in Africa. MapMaker's sources are described on this web page on their website.

Burkina-Faso-map is a Digital Contraptions Imaginarium Ltd. project for the Open Data Institute.
