JSON file

27 views
Skip to first unread message

Eric

unread,
Oct 18, 2012, 6:11:26 PM10/18/12
to eea-...@googlegroups.com
Hi,
I'm trying to display map markers from a JSON file but I cannot get the data to appear in the table or on a map.  When I import the file (which I know works because I am using it elsewhere) I get the column headings but nothing else.  I am also not sure of how the latlng field should be formatted (lat, lng; lat lng).  Can someone advise?  Thanks!

Eric

Alin Voinea

unread,
Oct 19, 2012, 4:51:21 AM10/19/12
to eea-...@googlegroups.com, Eric
Hi Eric,

latlng should be comma separated (e.g. "45,78, 24,86"). For the other
issue, can you be more explicit please (Plone version, daviz version,
how do you "import" this JSON file?). You should also check for JS
errrors within Firebug, maybe you found a bug ;)

Cheers,
Alin

Alin Voinea

unread,
Oct 19, 2012, 11:19:06 AM10/19/12
to eea-...@googlegroups.com, Eric Hansen
Hi Eric,

I'm confused, you're trying to create a visualization from a JSON file. You can't do that (at least not yet).

An error message is raised when I'm trying to do that saying: "An error occured while trying to convert attached file. Please ensure you provided a valid CSV file"

So the only thing you can do now (without any programming) you can:
1. Add table header within Visualization > Edit > Copy & Paste
2. Within Edit Visualization > Data settings tab > Additional sources add the URL to your Exhibit JSON file.
3. This will work only with Exhibit Views (Tabular View, Tile View, Map View, Timeline View, no Google Charts).
Or with some programming, you can just add an adapter (browser:view) for your File called daviz.json that converts your JSON to Exhibit JSON. See

https://github.com/collective/eea.app.visualization/blob/master/eea/app/visualization/data/browser.py

Cheers,
Alin


On 10/19/2012 05:07 PM, Eric Hansen wrote:
Hi Alin,

Plone 4.2.1.1, DaViz 4.8.  I've tried uploading the json file and
enabling visualization and I have tried adding a visualization and
importing the json file...neither works.  I don't get any error with
firebug or chrome console...

Thanks!
Eric





On Fri, Oct 19, 2012 at 3:51 AM, Alin Voinea <alin....@gmail.com> wrote:

Eric Hansen

unread,
Oct 19, 2012, 11:24:03 AM10/19/12
to alin....@gmail.com, eea-...@googlegroups.com
Well that explains it. :)

I was actually getting the column headers from the json file, just the
rows weren't displaying.

I don't mind programming...I've actually been working on converting
the json to csv in my product browser view (where I am generating the
json file) but I'm having problems making it work for some reason.

Cheers,
Eric
--
Eric

Antonio De Marinis

unread,
Oct 20, 2012, 7:52:17 AM10/20/12
to eea-...@googlegroups.com, alin....@gmail.com
These issues were known.

Please be aware of upcoming features and bug fixes
E.g. json url in http://svn.eionet.europa.eu/projects/Zope/ticket/5591

Regards
Antonio De Marinis
European Environment Agency

Yuri

unread,
Oct 22, 2012, 2:44:08 AM10/22/12
to eea-...@googlegroups.com
That's great. Think to a local app in Plone or other software, you can
just have an export in csv of results using an url, and you can connect
it to the visualization.

I've in mind PloneFormGen, Plomino, csvreplicata and so on.
Reply all
Reply to author
Forward
0 new messages