[ckan-dev] [ckan-global-user-group] Viewing realtime data in CKAN and styling geojson data

Steven De Costa steven.decosta at linkdigital.com.au
Fri Jul 10 10:10:49 UTC 2015


Short answer:
Good for a blog post? yes :)

On Friday, July 10, 2015, Matthew Fullerton <matt.fullerton at gmail.com>
wrote:

> Short version:
> @global: Are these things anything anyone would like to be able to use in
> their CKAN? I would have to do some more work to add a UI for configuration
> and so.
> @dev: Are these things best put into new extensions with (inevitably) some
> duplication or as options in current extensions with (inevitably) some
> bloating of code over and above typically needed features?
> @Steve: Would this be good material for (a) blog post(s)
>
> Long version:
>
> Dear CKAN community,
> I have some experimental work that I would like to get some feedback on.
>
> - 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[1].
> Here's an example where the file has been processed to add colors based on
> traffic flow state:
>
> https://smartlane.io/dataset/different-geo-visualizations/resource/49f0fcff-b3c8-48c8-b1c6-ddc33e4a83fe
>
> And another where the points are styled to (vaguely) look like colored
> traffic lights:
>
> https://smartlane.io/dataset/different-geo-visualizations/resource/a4e397ad-cbd9-48bf-a77a-296c5fcc9559
> (watch out, it can take a while to load)
>
> - Realtime GeoJSON data
> Using leaflet.realtime[2], 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/traffic-light-stream-frankfurt-niederrad/resource/b6e4319e-f29b-480b-ad6d-214a753d3c2d
>
> 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/temperature-sensor/resource/bd645638-5541-499e-861b-f9c97e60f35a
>
> 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.
>
> Best Regards,
> Matt
>
> [1] https://github.com/mapbox/simplestyle-spec
> [2] https://github.com/perliedman/leaflet-realtime
>
> --
> Matthew Fullerton
> Freelance Software Developer und EXIST Stipend holder with the start up
> project "Tapestry" -http://www.smartlane.de/
>
> --
> You received this message because you are subscribed to the Google Groups
> "CKAN Global User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ckan-global-user-group+unsubscribe at googlegroups.com
> <javascript:_e(%7B%7D,'cvml','ckan-global-user-group%2Bunsubscribe at googlegroups.com');>
> .
> To post to this group, send email to
> ckan-global-user-group at googlegroups.com
> <javascript:_e(%7B%7D,'cvml','ckan-global-user-group at googlegroups.com');>.
> Visit this group at http://groups.google.com/group/ckan-global-user-group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/ckan-global-user-group/CAAm%2B7Tak7Y0jZNtvTgV3ch-wxh_UHon-xKHD2apXic8%2BvH%3DNww%40mail.gmail.com
> <https://groups.google.com/d/msgid/ckan-global-user-group/CAAm%2B7Tak7Y0jZNtvTgV3ch-wxh_UHon-xKHD2apXic8%2BvH%3DNww%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*STEVEN DE COSTA *|
*EXECUTIVE DIRECTOR*www.linkdigital.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150710/4ad43823/attachment-0003.html>


More information about the ckan-dev mailing list