Skip to content

Instantly share code, notes, and snippets.

View tgherzog's full-sized avatar

Tim Herzog tgherzog

View GitHub Profile
@tgherzog
tgherzog / start.html
Last active July 30, 2018 14:54
start page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>World Bank E-Learning Course</title>
<link rel="stylesheet" href="style/css/normalize.css"/>
<link rel="stylesheet" href="style/css/solo-localized.css"/>
<link rel="stylesheet" href="style/css/syntax.css"/>
@tgherzog
tgherzog / iso3.json
Last active July 9, 2018 15:29
Provides a mapping of ISO3 country codes to DDH taxonomy terms
{"yem": "278", "mnp": "200", "lso": "158", "uga": "263", "tkm": "260", "alb": "36", "ita": "142", "tto": "257", "nld": "191", "moz": "186", "eap": "847", "mna": "845", "tcd": "76", "mne": "183", "mng": "182", "cuw": "33", "bfa": "68", "nga": "197", "zmb": "279", "geo": "114", "hrv": "89", "gtm": "123", "imn": "140", "aus": "47", "jam": "143", "aut": "48", "ven": "271", "irl": "139", "mwi": "167", "fin": "107", "rwa": "218", "lcr": "842", "bih": "61", "cpv": "70", "tjk": "250", "pse": "276", "lca": "221", "ssd": "34", "ssa": "840", "nor": "201", "mhl": "172", "pak": "203", "png": "206", "wsm": "224", "zwe": "280", "gum": "122", "gbr": "266", "guy": "127", "cri": "87", "cmr": "72", "mda": "180", "eas": "847", "mdg": "166", "hti": "128", "aze": "49", "qat": "214", "lao": "155", "are": "265", "arg": "44", "sen": "228", "btn": "59", "mdv": "169", "arm": "45", "grd": "120", "nac": "844", "bmu": "58", "est": "102", "mus": "175", "esp": "239", "lux": "163", "irq": "138", "bdi": "69", "smr": "225", "per": "208", "blr"
@tgherzog
tgherzog / coverage.py
Last active August 10, 2020 20:46
Some data quality checks
#!/usr/bin/python -u
#wbgapi module available here: https://github.com/tgherzog/wbgapi
"""
coverage.py produces quick density coverage stats for an indicator
Usage:
coverage.py [--verbose --sources --prefixes --bssi --gaps] [--start YEAR] [--income INC] [--region RGN] [--since YEARS] [--archived-dbs IDS] INDICATOR...
@tgherzog
tgherzog / SBData.swift
Created December 12, 2017 13:47
SailBuddy code
//
// SBData.swift
// Sail Buddy
//
// Created by Tim on 6/27/15.
// Copyright (c) 2015 Zog Software. All rights reserved.
//
import Foundation
import CoreLocation
@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 = {}

Geospatial Files by Workflow

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

Geospatial Files by Classification/ToU

@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) {
@tgherzog
tgherzog / lots_of_links.md
Last active October 5, 2016 15:58
Data Bookshelf
@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 / 00-resources.md
Last active November 19, 2015 05:12
Stuff for the Sail Buddy App