Skip to content

Web map visualizing donor and government funded projects in Kenya

Notifications You must be signed in to change notification settings

ragemunene/FundedProjectsKE

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FundedProjectsKE

Web map visualizing donor and government funded projects in Kenya

About

The map is based on donor and government funded projects in Kenya data set and built using Mapbox.js and Leaflet.js plugins.

Using this code

Download as zip and unzip or clone to your computer

Approach taken

1. Getting data

To get the data into GeoJSON format to be used to map the projects, much cleaner and easier to work with JSON structure of the data was required. I decided to download the data as CSV and convert to JSON. The JSON generated is in js/projects.json Then I used a python script to parse and generate the GeoJSON file from the projects json. The script ensures coordinates in the GeoJSON are floating point numbers since the ones provided are strings.

2. Displaying / Clustering markers

The map has a layerGroup in which other featureLayers are added or removed depending on what is to be displayed. I also tried loading the GeoJSON data when the map initially loads and reusing it to display the different layers a little faster.

Libraries, plugins and other code used in this project

  1. jQuery
  2. Mapbox + Leaflet js
  3. Browserify
  4. Bootstrap CSS
Code
  1. Python script to convert JSON to GeoJSON
  2. Mapbox API
  3. Mapbox Examples

Data Visualization

It'd be helpful if the data can be visualized as a heatmap of the status of projects so as to show which ones are stalling and which ones have been completed or are near completion in specific areas.

About

Web map visualizing donor and government funded projects in Kenya

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Other 1.0%