Support Us

Matthew Fullerton and some interesting CKAN extension development.

August 21, 2015 in Community, Extensions

Matthew Fullerton - mattfullertonNote: This is a re-post from one of our CKAN community contributors, Matthew Fullerton. He has been working on some interesting extensions, which are outlined below. You can support Matthew’s work by providing comments below, or you can link through to his GitHub profile to comment or get in touch there.

 

Styling GeoJSON data

The GeoView extension makes it easy to add resource views of GeoJSON data. In our extended extension, attributes of the features (lines, points) in the FeatureCollection are styled according to MapBox’s SimpleStyle spec.

Here’s an example where the file has been processed to add colors based on traffic flow state:
https://smartlane.io/dataset/differentgeovisualizations/resource/49f0fcffb3c848c8b1c6ddc33e4a83fe

And another where the points are styled to (vaguely) look like colored traffic lights:
https://smartlane.io/dataset/differentgeovisualizations/resource/a4e397adcbd948bfa77a296c5fcc9559
(watch out, it can take a while to load)

Realtime GeoJSON data

Using leaflet.realtime, an extension for the leaflet library that CKAN (GeoView) uses to visualize GeoJSON, maps can have changing points or colors/styles.

Here is an example of traffic lights changing according to pre-recorded data:
https://smartlane.io/dataset/trafficlightstreamfrankfurtniederrad/resource/b6e4319ef29b480bad6d214a753d3c2d

I’ll try and add a demo with moving data points soon, it ought to work without any further code changes. The problem is often getting the live data in GeoJSON format… but we have a backend for preprocessing other data.

Realtime data plotting

By making only a few small changes, we are able to continuously update Graph views. You can see the changing (or not) temperature in our office here:
https://smartlane.io/dataset/temperaturesensor/resource/bd6456385541499e861bf9c97e60f35a

That’s an example for ‘lines and points’ but it works for things like bar graphs too. Last week we had people competing to achieve the best time in a remote controlled robot race where their time was automatically displayed as a bar on a ‘leader board’. For good measure we had an automatically updating histogram of the times too. Updating the actual data in CKAN is easy thanks to the DataStore API.

Matthew Fullerton

Freelance Software Developer and EXIST Stipend holder with the start up project “Tapestry” http://www.smartlane.de/

Comments are closed.