[openspending-dev] Help to input the icons on WDMMG

Tryggvi Björgvinsson tryggvi.bjorgvinsson at okfn.org
Fri Feb 8 11:06:59 UTC 2013


Hi again,

Sorry for the late reply but here it comes.

Þann fim 7.feb 2013 14:16, skrifaði Володимир Харченко:
> But did not work with my set
>
> http://openspending.org/sumy13_v_col/meta, here is the result:
>
> http://imageshost.ru/photo/77503/id2788840.html

I see that you're working with the R1 dimension in the dataset. The
Cyrillic alphabet makes this a bit problematic since slugs don't work
that easily.

For example the 'slug' for 'освіта' isn't 'ocbita' but '700' (we
wouldn't actually call it a slug then). So this makes things a bit more
difficult but there are two ways in which you can find the relevant
slugs to use.

1. The better way
You can look at the csv. It's available via OpenSpending's API
aggregator. You can go here to download it:
http://openspending.org/api/2/aggregate?dataset=sumy13_v_col&drilldown=R1&format=csv

If you look at that csv you'll see one column named "R1.label" which
contains things like 'освіта' and another column called "R1.name" and
this contains the slug or the name you would use.

2. The OpenSpending user interface way
You can go to the OpenSpending's overview of the R1 dimension on:
http://openspending.org/sumy13_v_col/R1

If you click for example on 'освіта' you're transferred to a website
with this url:
http://openspending.org/sumy13_v_col/R1/700/entries#R1:700
There you can see what the name/slug is: 700

You can choose either one of these ways (or find another one) to find
the number used as the name for each item.

So you would then instead of what you write now:

> That's how I write:
>
> 'name': {
>
> 'освіта': {icon: 'money.svg' },// not

You would instead write:

That's how I write:

'name': {

'700': {icon: 'money.svg' },// not
...


I hope this works and makes sense. I think we need to figure out a good
way to support things like the Cyrillic alphabet since it isn't as
abvious as the English alphabet names/slugs.

Let us know if this works for you.

/Tryggvi






More information about the openspending-dev mailing list