Pages

Place and Sentiment From Many Voices

Sunday, November 27, 2011
Place is powerful in a crisis.

Place brings the responder to the emergency. Place measures risk and damage. Place is often the most important piece of situational context, particularly when a hurricane takes a wrong turn on the New Jersey Turnpike at the end of an otherwise-unremarkable August.

Crisis maps were invaluable in the reaction and recovery surrounding the drunken lope of Hurricane Irene up the eastern seaboard a few months ago. The rapid deployment of tools like UshahidiTweak the Tweet and #VTResponse created a centralized, crowdsourced voice for the crisis. Google's Crisis Landing was used to augment the capabilities of local, state and federal agencies as they organized reports of damage and assessed priorities, disseminating the information directly to the public. [Patrice Cloutier has exhaustively documented the crowdsourced Irene response in this report] All of these tools involved a place component -  "Where is this happening?", "Where is this needed?" - and could draw on semi-precise geolocation assets like online address searches and smartphone GPS sensors.

However, there was also a huge dialog occurring without real geolocation, on Twitter, Facebook and any number of smaller social media outlets. These messages numbered in the hundreds of thousands, but on their own were lacking the context of place.

This is where new developments in "Big Data" analytics come in handy. With some computational heavy lifting from Kate Starbird at the University of Colorado and Chris Danforth at the University of Vermont, Geosprocket was able to bank millions of Twitter posts from the days surrounding the storm. Then the assistance of metaLayer Inc. was instrumental in putting Irene-related tweets on the map. Using a series of digital sifting processes, they were able to mine the archived Twitter data for placenames and keywords. Where a town or street name was included in a post, that post could be placed at a set of geographic coordinates. Were words like "washout" and "devastated" were used, fine-tuned algorithms could assign a scaled value for the sentiment of the post.

Add a bit of cartographic styling and serving with the open-source MapBox toolkit, and we've got an interactive mapped timeline of Hurricane Irene, as told by Twitter:


No analysis of this type is going to be perfect - the data is inherently messy, noisy, inconsistent - but now that the storm is long past this kind of view can tell us a lot about how we responded to the crisis. It can give us ideas for preparedness. And as platforms like metaLayer and Swiftriver become more robust, we can apply the power of place and more in real-time when the next crisis hits.


Read more ...

Creating Geographic Variation Where it Doesn't Exist . . .

Wednesday, November 23, 2011
Info-Vortex Over Burlington
Cartography has a well-earned but still-largely unrecognized reputation for messing with human perceptions of real phenomena. Got heathens on the other side of your national border? Just shade them out and pretend they don't exist. Want to make it seem like you're a global underdog? Show yourself surrounded and menaced by powerful foes. This sort of crap makes cartography - and geography more broadly - look like something practiced by schemers in tophats and handlebar mustaches.

But manipulation of space is the bread and butter of cartography, stemming from some central questions: How do you make round things flat? How do you make the impossibly-large small enough to see on a canvas or on a glowing smartphone screen? Mapping inherently involves reduction and obfuscation, so the problem I recently came across is a novel one:

How do you expand an effect on a map?

When Hurricane Irene hit the U.S. Northeast, hundreds of thousands of people took to the Twitterverse (and to Facebook and traditional civil response agencies, not to discount them) to report damage and request help. A few thousand folks mostly in the NYC area sent their tweets with geolocation included. Good on them, but they represented somewhere in the neighborhood of 1% of the hurricane-related traffic. Tens of thousands more sent messages with placenames in the text, some more specific than others.

Modern geocoding services like Google, Yahoo and Nominatim provide great geolocation based on addresses and fragments, but what happens when you've got a single placename representing a general area? What if it recurs thousands of times? Do you map everything at a single location, the centroid of a state boundary?

The word "Vermont" appeared in over 6,000 Twitter posts in the four days immediately after Irene washed through the state. With nothing else to add specificity, this means that over 6,000 events occurred at 43.8717 N, 72.4517 W: the geographic center of the state. While this is a bit whimsical, it still presents the problem of showing a huge number of unique messages at a single place.



A spiral seems to fit the bill; the points spill outward and occupy their own space, but they clearly originate from the central coordinates they share. It's not spatially exact, but it shows both association and information volume. Smaller spirals begin everywhere multiple posts share the same placename, for example in Rochester and South Burlington.

Using LibreOffice Calc (or Excel if you must) and CartoDB, this visualization is actually a snap. It begins with a set of Twitter posts and Lat (Y1) & Long (X1) coordinates taken from placenames in the text (a service provided by metaLayer - more on that in the next posting).

  1. Sort the table by unique location
  2. Add fields representing:
    1. Location-magnitude (i)
    2. Bearing of spiral point (ang)
    3. New Lat (Y2)
    4. New Long (X2)
  3. Calculate as follows:
a = 0.005
b = 0.009

i = if X1 is not unique
  i + 1
 else 0

ang = (Pi/45)*i

Y2 = Y1 - (a * SIN(ang)) * (2.718281828 ^ (b * ang))

X2 = X1 + (a * COS(ang)) * (2.718281828 ^ (b * ang)) 

This may seem a bit obtuse, but it can be adapted to VBA, Python, JavaScript or whatever suits your purpose. And the 'a' and 'b' variables can be tweaked to make a spiral to your own specifications; 'a' controls the distance offset from the central point, and 'b' controls the rate at which the spiral expands. It works best if both are kept between 0.001 and 0.1. In any case, once the table has the new coordinates, upload it to your CartoDB account and render some tiles! 

There are certainly a host of other ways to attack this problem, but a spiral is a basic solution in a world where crowdsourced data increasingly muscle into the geographic sphere, begging to be placed on a map.

Read more ...