Skip to content

Instantly share code, notes, and snippets.

View pudo's full-sized avatar

Friedrich Lindenberg pudo

View GitHub Profile
@pudo
pudo / schema_proposal.yaml
Created May 5, 2015 18:32
A proposed metadata structure for OpenSpending raw data.
# This is an alternate proposal for a metadata structure for OpenSpending
# data models. The most significant change is that data is modelled in a
# way that highlights logical connections between fields, rather based on
# columns. This also means that column naming conventions are not needed.
#
# This proposal uses YAML to represent the model, but implementations
# would probably use JSON instead.
# The proposed format is currently supported by spendb and cubepress.
#
# The following is a data model for a fictitious budget/spending dataset.
@stefanw
stefanw / bundestag-api.md
Last active June 13, 2018 14:41
Bundestag XML API description

Bundestag XML API

The German parliament iPhone app "Bundestag" uses XML endpoints at bundestag.de to get fresh data. This guide lists them.

Authentication

Since version 4.2 the iPhone app requires an HTTP basic auth header for new endpoints. For backwards compatibility some old endpoints don't require authentication.

The authentication credentials are:

from PIL import Image, ImageDraw
import sqlite3
from grapefruit import Color
c1 = Color.NewFromHtml('#ffffff')
c2 = Color.NewFromHtml('#660000')
conn = sqlite3.connect('zon-tags-2.db')
im = Image.new('RGBA', (20 * 52 + 60, (2012 - 1946) * 20 + 40))
/* Proposed OpenSpending data model, v2 */
/* Core issues we want to address:
*
* - Merge "entities" and "classifiers".
* - Use better terminology.
* - Decide whether to still have value dimensions.
* - Handle time better (no "end_column")
*
* Secondary but long-term goals: