Welcome to The Public Knowledge Workshop's databases project
The databases are available for public querying via Redash
A Google account is required to prevent abuse
from collections import defaultdict | |
def sum_per_date(rows): | |
date_sums = defaultdict(int) | |
for row in rows: | |
date_sums[row['date']] += row['amount'] | |
return dict(date_sums) | |
Usage: cloudcli [OPTIONS] COMMAND [ARGS..] | |
Cloud Infrastructure Management | |
All commands accept relevant configurations on STDIN in yaml format. | |
Each commands help message provides usage examples. | |
Options: | |
--debug | |
--help |
pip3 install -U datapackage-pipelines |
#!/usr/bin/env bash | |
wget https://pypi.python.org/packages/6a/34/8176b841926a2add20524a9f74c307ac5fe6e33e9f4af12a58e6f7223982/mollyZ3950-2.04-molly1.tar.gz#md5=a0e5d7bb395ae31026afc7f974711630 | |
sudo pip2 install ./mollyZ3950-2.04-molly1.tar.gz | |
sudo pip2 install pymarc |
build_positions: | |
pipeline: | |
- run: load_resource | |
parameters: | |
url: data/datapackage.json | |
resource: input_resource | |
- run: split_resource | |
- run: dump.to_path | |
parameters: | |
out-path: data/splitted_resource |
{ | |
"translatorID": "dcf19e16-0b1e-11e8-bed0-e4a4719186ba", | |
"translatorType": 1, | |
"label": "Migdar", | |
"creator": "Ori Hoch", | |
"target": "migdar", | |
"minVersion": "3.0", | |
"maxVersion": "", | |
"priority": 100, | |
"inRepository": false, |
from datapackage import Package | |
from tabulator import Stream | |
package = Package('https://minio.oknesset.org/committees/datapackage.json') | |
print(package.resource_names) | |
protocols_parsed = package.get_resource('committee_meeting_protocols_parsed') | |
for protocol_num, protocol in enumerate(protocols_parsed.iter(keyed=True)): | |
print(protocol) | |
with Stream("https://minio.oknesset.org/committees/" + protocol["parts_object_name"], headers=1) as stream: | |
for part_num, part in enumerate(stream.iter(keyed=True)): | |
print(part) |