use google refine to export json

Creating multi-dimensional arrays

So why do we care about multi-dimensional arrays? Well, there are a lot of free data visualization templates that use them. We're going to stick with Protovis and create data that can be used can in the Treemap, Bubble, Sunburst, and Dendogram examples.

Start by uploading "race.csv" from the example files into Refine and click Export/Template. Edit the Prefix and Suffix to match the examples we just looked at. Your window should look like this: 

multi-start

We create multi-dimensional arrays by editing the Row Template. Select and cut the first row.

multi 2

Paste the line in front of the first curly bracket so that it looks like this:

multi 3

Delete "County" :   Replace the comma at the end of the line with a colon. If you have an extra line after the curly bracket, delete that too. Your window should look like this:

multi 4

Delete the code after American Indian and replace it with an open curly bracket. Add a couple of spaces before the Seminole and Pahokee lines to keep things easy to read. Finally, add an extra closing curly bracket just before the comma at the end of the Pahokee line.

multi 5

Click export and you're done. Congrats! You just built a multi-dimensional array. Try plugging it into the Protovis examples linked to earlier.