Stap isi

Local government, the internet & community engagement online

25 July 2010

#LGWN10 tweeps

Last year I knocked up a tweeps map ahead of the 2009 LG Web Network conference. The aim was to link via Twitter ahead of the event – and to muck about with Google’s maps and spreadsheets. Here’s one for this year.

I had intended to use Google Fusion Tables, a tool purpose-built to import and visualize table data online. (It made light work of this visualisation of RTA speed camera locations, ripped from an RTA PDF.) But from the get-go I couldn’t import my spreadsheet from Google Docs. Maybe the service is too beta.

Here then are the steps taken to create the #LGWN tweeps app:

  1. Create a spreadsheet in Google Docs with a form to capture user input
  2. In sheet 2 of the spreadsheet, import the user data with the function =ARRAYFORMULA(Sheet1!A:E) then run a function in the neighbouring columns to return latitude and longitude (with some randomisation to prevent markers stacking directly on top of each other if two tweeps are in the same location)
  3. Share the spreadsheet – make the data public
  4. Set up a webpage with a Google Map generated using the excellent new Google Maps API v3
  5. Pull in and loop through the XML data, building markers in javascript for each tweep – I used a plugin for my CMS Textpattern but this could be handled natively by the Google Maps API

Geocoding

I chose to geocode within the spreadsheet because I was too timid to tackle the new Geocoder class in the Google Maps API.

I used the CONCATENATE function to construct a URL from the stem http://maps.google.com/maps/geo?output=csv&q= and the user’s location (suburb, town/city, country). For example, copy this URL into your address bar:

maps.google.com/maps/geo?output=csv&q=Darlinghurst,Sydney

The ImportData function runs this URL and adds the result to neighbouring columns. Note the limit of 50 ImportData functions per spreadsheet.

Twits as icons

When building the markers on the map, it was easy to grab the user’s profile picture and description from Twitter via their API. Try this URL with your screen name:

http://api.twitter.com/1/users/show.xml?screen_name=[ScreenName]

I generated a generic shadow using Google Maps Icon Shadowmaker although I didn’t anticipate some profile pictures having transparency.

Copy, paste, cross fingers

I hope this project shows that anyone with HTML, a search engine and some patience can build tools for fun and on the cheap. It’s a monkey see, monkey do approach. Not very efficient, often frustrating, but you have to get your hands dirty.

See Gabriel Svennerberg for a good introduction to the API, work off the demos at Google and find inspiration at Google Maps Mania.

And if you’re coming to LGWN10, add yourself to the map.

— b3rn   , ,    Jul 25, 01:25 PM   #   Comment

17 August 2009

Putting LGWN09 tweeps on the map

Another string & sticky tape home craft session. See the result. The nice bit is that people can add themselves to the map. Here are the steps taken:

  1. A Google Docs spreadsheet form collects Twitter name, suburb (optional), city/town and country from those attending the conference
  2. When submitted, the form populates a Google spreadsheet
  3. The spreadsheet uses functions to generate latitude, longitude, Twitter URL, Twitter profile image URL and a HTML description for each tweep
  4. The sheet is set to ‘publish to the web’ as a text fileCSV format – with option ticked to ‘automatically republish when changes are made’
  5. A Yahoo! Pipe transforms this data into a GeoRSS feed
  6. The feed gets chucked into Google Maps and you can see which tweeps will be at the conference (and where they’re from)

Those Twitter pics…

… are generated courtesy of the SPIURL web service. It provides a static link to Twitter profile images.

Limitations

  1. Locations are being dynamically geocoded via Google and returned to the spreadsheet using the ImportData function (refer to Geocoding by Google Spreadsheets). But you’re restricted to 50 of these functions per sheet – so there’s a hard limit on the number of tweeps that can be added.
  2. More than one tweep may enter “Sydney, Australia” as a location – resulting in multiple markers on the same point, with only one visible and clickable. The sidebar gives access to all tweeps but that’s a consolation prize at best. A random number could probably be added to the tail of each coordinate to push markers slightly apart? Update: truncated the lat/long and added a random number – kinda works but a cluster would be better.
  3. There is no error checking. “WE Believe in Community”!

— b3rn   , , ,    Aug 17, 11:04 PM   #   Comment

15 June 2009

Photo by Local Government Web Network on Flickr

WE Believe in Community 09

Over the last few years, I’ve been able to make a case for attending the Web Directions conference in Sydney. Training is rarely inspiring, unless you’re listening to people like Doug Bowman, Joe Clark, John Allsopp, Cameron Adams, Jeremy Keith or Andy Clarke.

But government has its own challenges. It can’t cut corners or take risks like private or business startups (not necessarily a bad thing) and it doesn’t have the benefit of a neutral (at worst) or evangelist (at best) constituency with which to work. So last year’s LG Web Network conference was fantastic.

Prior to the network, supported by the LGSA, I wasn’t unique in having little or no contact with fellow local government web workers in NSW. Professional groups in this field favour IT managers and administrators. Kudos to the prime movers, Diana Mounter, LGSA Design and Development Coordinator, and Reem Abdelaty, LOC&L Program Director.

Registrations are now open for this year’s conference in August.

I’m looking forward to hearing Jason Ryan of the N.Z. State Services Commission on Government 2.0 without the bullshit (my words) and attending the sessions on WCAG and digital recordkeeping. But most of all, talking with LG web people. (And it’d be great if more library people joined the network.)

Register now at WE Believe in Community 09.

— b3rn   ,    Jun 15, 05:39 PM   #   Comment

6 April 2009

Pied Currawong by Leonard John Matthews (Flickr)

Introducing LGi a.k.a. Local Government Eye

  • Update 2010-01-11 Today I turned off the Pipes and both Twitter accounts are now inactive. Twitter’s new Lists feature provides similar (and better) functionality. Follow twitter.com/b3rn/ozgovlocal or make your own!

I’ve set up a couple of Twitter accounts that aggregate and relay tweets from Local Government Authorities in Australia and their elected representatives:

If you’re a Council (or Shire or Town or Borough…) or a Councillor, follow the relevant Twitter account above, and you’ll be followed back – automatically adding you to the stream.

Credit to Barry Earnshaw in the UK, whose Pipe I cloned.

For more on Oz LG, see:

— b3rn   , , ,    Apr 6, 07:49 AM   #   Comment

3 November 2008

Community of Practice in NSW

Are you in local government and work on the web?

  • Editor, writer, librarian
  • Designer, coder, information architect
  • Manager, strategist, IT officer

Join the LG Web Network.

Please.

— b3rn      Nov 3, 07:07 PM   #   Comment

About

Latest comments

Archive

Search

Subscribe

Other places

Licence