Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Scripts and visulization for African Terrestrial Fibre Optic Cables dataset — Read more http://thedatahub.org/dataset/afterfibre

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 vendor
Octocat-spinner-32 README.markdown
Octocat-spinner-32 app.js
Octocat-spinner-32 convert.py
Octocat-spinner-32 datapackage.json
Octocat-spinner-32 index.html
Octocat-spinner-32 leaflet.html
README.markdown

Geodata showing African terrestrial fibre optic cable projects. Data is available as CSV or JSON (+ GeoJSON) via the DataStore API.

Data

Primary data file is the CSV resource: http://thedatahub.org/dataset/afterfibre/resource/f5d81da5-2e55-4302-8ed2-58401d2c139e

However, this data needed to be cleaned up and converted to geojson for storing in the DataHub DataStore and visualization. Details of this below.

Cleaning Process

Use data package manager (dpm) to clone the DataHub dataset.

# say yes to downloading of data files
dpm clone http://thedatahub.org/dataset/afterfibre .

You will now have an afterfibre directory containing the dataset.

cd afterfibre

Grab scripts from the code repository

git clone https://github.com/rgrp/dp-afterfibre .

Now run cleanup - note you will need to install geojson (pip install geojson)

python convert.py

Now you have json version of data in data/AfTerFibre_21nov2011.json. We will upload this to the DataHub DataStore for the original CSV.

Note: you will need the DataStore client from https://gist.github.com/1950581

ckan-datastore.py upload http://thedatahub.org/api/data/f5d81da5-2e55-4302-8ed2-58401d2c139e data/AfTerFibre_21nov2011.json 

Let's check the result, visit: http://thedatahub.org/api/data/f5d81da5-2e55-4302-8ed2-58401d2c139e/_search?size=5&pretty=true

Now the data's ready for easy visualization in javascript! (Check ou the visualization resource).

Something went wrong with that request. Please try again.