[openspending-dev] Cuts and Programmatically Generated Visualizations in OpenSpending?

Marc Joffe marc at publicsectorcredit.org
Fri Jul 26 17:50:45 UTC 2013


Reposting from Openspending list..

I loaded spending data for 260 California cities earlier and the it looks
pretty good (there are some errors due to duplicates on my side - but these
are minor).  I have also had some luck with manually creating visualizations
for individual cities.  I am not doing so well with JSON so maybe someone on
this list can help!

In the Views tab of the Manage function, I cannot figure out how to "cut"
the data by year.  I tried using years and dates (e.g. 1/1/12), but no luck.
Can someone have a look at my data set at
http://openspending.org/pscs_ca_cities and tell me what I am doing wrong?

Also, I am not clear on whether or how I can manipulate the data set
programmatically so that I can generate one view for each city.

Here is the JSON I entered into the View tab:

[

  {

    "name": "default",

    "label": "Spending by City, 2012",

    "cuts": {

      "time": "2012"

    },

    "drilldown": "gov-full-name",

    "entity": "dataset",

    "dimension": "dataset"

  },

  {

    "name": "2011",

    "label": "Spending by City, 2011",

    "cuts": {

      "time": "2011"

    },

    "drilldown": "gov-full-name",

    "entity": "dataset",

    "dimension": "dataset"

  },

  {

    "name": "2010",

    "label": "Spending by City, 2010",

    "cuts": {

      "time": "2010"

    },

    "drilldown": "gov-full-name",

    "entity": "dataset",

    "dimension": "dataset"

  }

]

Marc

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20130726/80a659bf/attachment.html>


More information about the openspending-dev mailing list