[openspending-dev] OS visuals not displaying after new data set added
Martin Keegan
martin.keegan at okfn.org
Thu Apr 11 02:31:15 UTC 2013
We can certainly give a better error message than Adam got, right?
On Wed, Apr 10, 2013 at 10:16 PM, Stefan Wehrmeyer
<stefan.wehrmeyer at okfn.org> wrote:
> Hi Adam,
>
> you did not link to the latest commit. The latest and deployed commit seems to be this one:
> https://github.com/adstiles/openbudgetoakland/commit/4b99e4c63348af3049341c985adc6a48542601cc
>
> You are using the labels instead of the dimension name in the drilldown.
>
> "drilldowns": [
> "Department",
> "Unit",
> "Child Fund"
> ],
>
> Here is your model:
> http://openspending.org/oakland-adopted-budget-fy-2011-13-expenditures/model.json
>
> The drilldown should read:
>
> "drilldowns": [
> "department",
> "unit",
> "child-fund"
> ],
>
> Which then results in the API call:
> http://openspending.org/api/2/aggregate?callback=a&dataset=oakland-adopted-budget-fy-2011-13-expenditures&drilldown=child-fund%7Cunit%7Cdepartment&cut=time.year%3A2011
>
> And that works. Good luck with the launch!
>
> Cheers
> Stefan
>
> On 10.04.2013, at 22:16 , Adam Stiles <adam.d.stiles at gmail.com> wrote:
>
>> Hello,
>>
>> We have OS widgets on our NOT YET PUBLIC site: http://openbudgetoakland.org/pre-launch/oak11-13adopted.html
>>
>> It was displaying properly until I created a new data set on OpenSpending and changed the corresponding JS variables to create new visuals on this page.
>>
>> Here are the changes I made: https://github.com/adstiles/openbudgetoakland/commit/5c598fabbde5ab7e1ef71305c25d8a9154d75b73
>>
>> Here is our data set: http://openspending.org/oakland-adopted-budget-fy-2011-13-expenditures
>>
>> Note that "2011" is the year even though this data set has both 2011 and 2012; I'm assuming this okay if I'm trying to make a visual of 2011, but maybe this is the problem?
>>
>> Here are the errors I'm seeing, which don't seem to indicate the changes I made, so maybe something on the OS side?
>>
>> • GET http://openspending.org/api/2/aggregate?callback=aggregate_ZGF0YXNldD1vYWts…expenditures&drilldown=Child+Fund%7CUnit%7CDepartment&cut=time.year%3A2011 400 (Bad Request) jquery.min.js:4
>> • sendjquery.min.js:4
>> • f.extend.ajaxjquery.min.js:4
>> • r.getTreeboot.js:3
>> • OpenSpending.Aggregatorboot.js:3
>> • updatemain.js:90
>> • initmain.js:116
>> • (anonymous function)main.js:267
>> • njquery.min.js:2
>> • o.fireWithjquery.min.js:2
>> • o.firejquery.min.js:2
>> • yepnope.completemain.js:274
>> • e.hasOwnProperty.fboot.js:1
>> • (anonymous function)boot.js:1
>> • u
>>
>>
>>
>>
>>
>> • Uncaught TypeError: Cannot read property 'label' of undefined main.js:106
>> • (anonymous function)main.js:106
>> • S.mapboot.js:1
>> • generateColumnsmain.js:105
>> • updatemain.js:78
>> • $.ajax.successmain.js:191
>> • njquery.min.js:2
>> • o.fireWithjquery.min.js:2
>> • wjquery.min.js:4
>> • d.onload.d.onreadystatechange
>>
>>
>>
>>
>>
>>
>> • GET http://openspending.org/api/2/aggregate?callback=aggregate_ZGF0YXNldD1vYWts…dget-fy-2011-13-expenditures&drilldown=Child+Fund%7CUnit%7CDepartment&cut= 400 (Bad Request) jquery.min.js:4
>> • sendjquery.min.js:4
>> • f.extend.ajaxjquery.min.js:4
>> • r.getTreeboot.js:3
>> • OpenSpending.Aggregatorboot.js:3
>> • updatemain.js:84
>> • initmain.js:109
>> • (anonymous function)main.js:123
>> • njquery.min.js:2
>> • o.fireWithjquery.min.js:2
>> • o.firejquery.min.js:2
>> • yepnope.completemain.js:130
>> • e.hasOwnProperty.fboot.js:1
>> • (anonymous function)boot.js:1
>> • u
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> THANKS for any help!
>>
>> Adam
>>
>> --
>> Adam Stiles
>> 510.280.4862
>> _______________________________________________
>> openspending-dev mailing list
>> openspending-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/openspending-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/openspending-dev
>
>
> _______________________________________________
> openspending-dev mailing list
> openspending-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/openspending-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/openspending-dev
More information about the openspending-dev
mailing list