Last active
August 29, 2015 14:12
-
-
Save pudo/e22f2fa135eba57f514b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
from pprint import pprint | |
#from cubes.model import Cell | |
from openspending.core import create_app | |
from openspending.model import Dataset | |
app = create_app() | |
with app.app_context(): | |
workspace = app.cubes_workspace | |
#print workspace.list_cubes() | |
dataset = Dataset.by_name('openspending-example') | |
res = aggregate(dataset, cuts=[('to', 'chesterfield-associates')], drilldowns=[]) | |
pprint(res) | |
#browser = workspace.browser('openspending-example') | |
#print browser, dir(browser) | |
#res = browser.aggregate(drilldown=['transactionid']) | |
#print res, res.summary | |
#print list(res) | |
#for fact in browser.facts(): | |
# pprint(fact) | |
#fact = nestify(browser.fact('1657328893f2e40e868e707c1402af99ecad5286')) | |
#pprint(fact) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment