Skip to content

Instantly share code, notes, and snippets.

View tgherzog's full-sized avatar

Tim Herzog tgherzog

View GitHub Profile
<?php
# This PHP array specifies alternate country parameters for select World Bank
# APIs. The top-level key is the 2-character country code used on the World Bank data
# website: see http://api.worldbank.org/countries. The corresponding array
# provides alternate value(s) when the default is not recognized. If an
# alternate value is not defined, then the value from
# http://api.worldbank.org/countries may be used
#
# papi_alt_iso2: alternate 2-character country code for the World Bank
@tgherzog
tgherzog / ebola.md
Last active August 29, 2015 14:06
Notes on ebola data

Collaborative data are being maintained in the Humanitarian Data Exchange. Key datasets include:

  • Case/Death data: Godfrey updates this based on WHO situation reports. This is the source data for the case, death and mortality rate charts on [EBC][ebc].
  • WFP Indicators - people receiving food, passengers transported, total supplies dispatches

Background

@tgherzog
tgherzog / big_data_links.md
Last active August 29, 2015 14:07
Big Data in Action for Development
@tgherzog
tgherzog / 00-resources.md
Last active November 19, 2015 05:12
Stuff for the Sail Buddy App
@tgherzog
tgherzog / overview.md
Last active September 14, 2016 18:29
SDG Resources

Websites

Reports

  • [SDG Report 2016][sdg1] (July, 2016)
  • [SDG Progress Report][sdg2] (June, 2016)
  • IAEG Report on SDG Indicators (March 8, 2016) | [Report][sdg3] | [Annex IV][sdg4]
@tgherzog
tgherzog / lots_of_links.md
Last active October 5, 2016 15:58
Data Bookshelf
@tgherzog
tgherzog / WBAPI.gs
Last active May 16, 2023 05:19
Google sheets interface to the World Bank API. Paste this code into the Google Sheets script editor to add a custom function.
/**
* Fetches data from the World Bank API
*
* @param {string} indicator The indicator code
* @param {string} country The 2- or 3-character ISO country code
* @param {number} year The optional year. If omitted, fetch most recent available
* @return The data value.
* @customfunction
*/
function WBAPI(indicator, country, year) {

Geospatial Files by Workflow

Workflow Status Count
[Draft][draft] 58
[Needs Review][review] 72
Published 1250

Geospatial Files by Classification/ToU

@tgherzog
tgherzog / chklicenses.py
Created November 28, 2017 01:07
Some API analysis scripts
# check for license inconsistencies from a indicator list via stdin - not terribly efficient
import requests
import sys
import re
response = requests.get('https://api.worldbank.org/v2/en/sources?format=json&per_page=1000')
result = response.json()
sources = [elem['id'] for elem in result[1]]
series = {}