Visualization Options

3026
10
11-18-2013 02:12 AM
Highlighted
New Contributor
Hi,

I'm using the GeoEvent Processor for analyzing georeferenced Tweets concering the weather in the Netherlands.
The tutorial (introduction & twitter) provides information about visualization with the Operations Dashboard Application. Unfortunately, that application does not work on my computer due to an old version of Windows.

What are the other options for visualizing the georeferenced tweets (on a map), besides Operations Dashboard?

Thanks a lot,

Greets,
Ingeborg
Reply
0 Kudos
10 Replies
Highlighted
Esri Regular Contributor
Hello Ingeborg -

Your best option for viewing Twitter posts on a map will be to push the GeoEvent data as Feature JSON (as opposed to Generic JSON) out to a web socket and use either Chrome or Firefox to create a "stream layer". This leverages JavaScript and WebSocket technology to stream the twitter events in near real time to a map for visualization.

The Twitter tutorial is being reworked for the 10.2.1 product release. The approach above will be reflected in the tutorial. Twitter's terms of service prohibit developers from caching or storing data harvested from tweets - which means that you cannot use the GEP Cache or Feature Service outputs and remain compliant with the Twitter TOS.

Attached is a PDF with draft material from the tutorial which is currently being developed. Hope this helps you in the near term.

- RJ
Reply
0 Kudos
Highlighted
New Contributor
Hi RJ,

Thanks a lot for your eleborate answer! I will try the tutorial provided, it looks pretty simple.

What do you mean with your last comment about Twitter? Am i going to 'break the rules' by using this method?

Thanks!

Greets,
Ingeborg
Reply
0 Kudos
Highlighted
New Contributor
Hi RJ,

I tried out the tutorial, but it looks like I'm missing the correct data for the streamlayer.
Step 11 and 12 wants you to add data to your �??<GEP install folder>/assets�?? directory, but I do not have that data.
Could you provide the correct data?

Thanks a lot.

Greets,
Ingeborg
Reply
0 Kudos
Highlighted
Esri Regular Contributor
Hey Ingeborg,

Sorry for the confusion ... using a stream layer to visualize the geographic locations contained in tweets should be compliant with the Twitter "Rules". We are reworking the tutorial exercise to not collect the twitter content in a feature class; this I feel is a violation of the terms of service.

I've attached a file 'WebSocketsSupportFiles.zip' which contains the supporting files from a draft tutorial on working with WebSockets.

- RJ
Reply
0 Kudos
Highlighted
New Contributor
Hi RJ,

I tested the tutorial with the data and it worked, thanks for that!

Now I want to use it for my case: visualization of georeferenced tweets. I used a Twitter input, with a Filter (geolocated = true) and connected this to the stream layer output. The tweets are visualized by dots on the map, but I want more information than just the dot. I would like some information about the message and the time of the tweet.

Is it possible to adjust the streamlayer to my own wishes? And how?

Thanks a lot,
Ingeborg
Reply
0 Kudos
Highlighted
Esri Regular Contributor
Hi Ingeborg,

My knowledge in the area of JavaScript and HTML isn't going to be sufficient to tell you how to do what you're asking, but I believe that the stream layer object in the HTML should have the information necessary to allow the "identification" of features. That is, you should be able to add code which will allow users to retrieve attributes associated with an event such as the event's date/time by clicking on a feature's location. I say that because part of the edits you can make to the HTML within the <script> tag as a developer includes a variable declaration for the layer (var layerDefinition = ...) which includes attribute fields.

If you look in the attached Twitter.zip archive you'll find a TwitterStreamLayer.html which was updated for the revised Twitter tutorial. (This tutorial should be up on the product gallery soon...)

Look for the first block of code below the layerDefinition declaration. You should see code which identifies the basemap, the map's center, and zoom level, then code which invokes a setClickEvents() function to establish callbacks for click events on the HTML form's two buttons. I'm assuming that with a sufficient knowledge of JavaScript you could establish a callback for a mouse click or double-click overtop the basemap which would find the nearest feature within a tolerance and report back to the user the attributes of that feature in some sort of pop-up. I just don't know how do actually do that.

Hope this helps -
RJ
Reply
0 Kudos
Highlighted
New Contributor
Did you ever figure out how to have a pop-up display the info of the StreamLayer?  I'm working on doing the same thing and haven't figured it out yet.

Thanks.
Reply
0 Kudos
Highlighted
New Contributor
Hi,

No I did not. I had contact with Esri and they confirmed that it is possible after editing the stream layer with JavaScript. I do not have enough JavaScript knowledge to do so, unfortunately.

Good luck!
Reply
0 Kudos
Highlighted
New Contributor
I was able to get this working how I wanted.  I found this sample on ESRI's website.  I just modified the field names and the stream layer url.  I'm no JavaScript whiz, but it was pretty easy to modify their sample code and plug in my field names.  Took me only about 30 mins.  Hope it helps you.

http://https://developers.arcgis.com/javascript/jssamples/layers_streamlayer.html
Reply
0 Kudos