Showing posts with label mashup. Show all posts
Showing posts with label mashup. Show all posts

Monday, May 13, 2013

Consuming GeoRSS and querying OpenStreetMap

In Adelaide, there was an unexpected fire. It was a bushfire, and I'd just been mapping the area earlier that day - ironically, tracing some of the forests which were being burnt out at that very point in time.

I decided to go and see what was available for fire alerts around the nation.

It turns out the majority of fire authorities publish GeoRSS. I took the feeds and aggregated them, plus put in a transformation of the data to JSON.

Using Leaflet, I added a rendering of particular fires.

Using the OpenStreetMap Overpass API, I queried for "all areas in a 500m bounding box", and again using Leaflet, rendered those polygons onto a map.

Here's the Project:
https://github.com/CloCkWeRX/burning-down

Here's a few screenshots:

Coverage, for most of Australia. WA doesn't provide openly licensed data, and South Australia's does not contain lat/long info.
The few you see in those states are from Sentinel, a satellite based system for detecting 'hot spots' that may indicate a fire.

Here, a number of resident buildings are marked as 'at risk' from a fire. In reality, these are probably safe, due to fires in these areas tending to be contained to residential areas.
On the other hand, you can certainly consider adding an Open Street Bug report if someone's house may have burned down!

This is more interesting - there's a fire or other emergency right next to a national park. National parks are made from trees, which in my experience tend to catch on a whole lot of fire!

Obviously this sort of incident is well in hand if the fire authorities are aware of it, but it is interesting to see that fuel sources are being picked up.

My next efforts here are going to be around encouraging edits near the area - if there isn't much detail on water sources (dams, swimming pools, rivers, lakes); it certainly makes sense to identify those if there's already been a fire once.

I also made a bit of effort to aggregate the feed output into sqlite - I might go run up a basic server and run this as a service at some later point, as aggregating this data seems useful.

The thing I like most about this - it's trivial to take any GeoRSS feed and query OpenStreetMap for nearby things - I've done fairly wide ranging queries with a narrow bounding box so far; but those are easy enough things to tweak.

Wednesday, October 31, 2012

Note to self: get the Planning Alerts API and OSM, and mix them together

Licencing is probably not a good match between planning alerts and OSM; but I should probably render planning applications as a feed on open street map.

http://www.planningalerts.org.au/api/howto points to this example, but it shouldn't be too hard to apply to an OpenStreetMap slippy map.


The more interesting thing will be
  • Flagging buildings as under construction automagically in OpenStreetMap, or adding a bug report
  • API that mashes up the two data sets

Saturday, October 20, 2007

Songbird webpage api, bits, pieces, and notes

Imagine this scenario:

You are using your media player/browser, and you stumble across a track on a webpage. You preview it. You like it. There's no information on the webpage about where it's from, but luckily, the mp3 is tagged correctly.

You hit a button on your media browser, and bam! You can find popularity information on Last.fm, prices on Amazon, full album information on Musicbrainz. Last.fm suggests a similar artist. The process rinses and repeats. You get to stuff yourself full of delicious music.

To see (some of) this in action; fire up Songbird 0.3 or greater, play some tunes, and go explore.

Last.fm's API is being used to render information that the page asked songbird about.
Sweet.

Look at the code underneath: simple javascript. More about songbird's webpage api. That's pretty easy looking.


Other notes and odds and ends:
Songbird now takes regular firefox extensions, (say hello to greasemonkey) and Freebase is awesome.

Basically: Freebase has an API, it's got data from wikipedia, and you can do things like search for episodes of Battlestar Galactica. Or shows produced by JJ Abrahams.

So, mix the power of Songbird's webpage api with the vast data of wikipedia/freebase, sprinkle in a few applications, and you've got something far more fun looking than a simple google maps mashup.

Throw in greasemonkey and operator, and you can scrape information from pages into microformats. Then export them.