Skip to content

Instantly share code, notes, and snippets.

View tgherzog's full-sized avatar

Tim Herzog tgherzog

View GitHub Profile
@tgherzog
tgherzog / pyddh_example_dataset_add.py
Last active April 3, 2019 19:52
DDH module example
# from github.com/tgherzog/pyddh - be sure to get the dkan-2018-api branch
import ddh
ddh.load('ddh1stg.prod.acquia-sites.com')
ds = ddh.dataset.ds_template()
# populate required fields
ds['title'] = 'Python test'
ds['body'] = 'Blah blah blah'
@tgherzog
tgherzog / 01-overview.md
Last active November 5, 2018 18:58
How to Deposit Energy Datasets in DDH
@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 / 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 / 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