Data on map

map, opendata, iss

Open Data

Open Data want to ease the acces using HTTP verbs with some URI conventions for accessing REST services through a common methodology. Of course it could mean that our app can be tightly coupled to the feed, and sometimes it show a lake of flexibility for the dev with sometimes re-factoring things. But in general it really help to be more legit especially for client side WebApp.

Create data

To create data is more challenging but with some great rewards. In the mapping community it’s something very easy to do, especially with OpenStreetMap and Mapillary. Create raw data and provide a JSON or GeoJSON may be more skill dependant.

Now to render these data Mapbox has also something to say with Datasets API as they used to say “it help your users understand the world around them” and it’s simple as create a GeoJson and push your data.

Make it live

This is where it’s start to be very useful and interesting. well, live is in fact kind of live most of the time, it really depends on your services, if it’s into the public transportation or disaster awareness it has to be as close as possible.

Make it live mean to push ASAP features into your JSON and update every x times

//My reqwest
.then(function(data) {
  var lat = data.lat;
  var lng = data.lon;
  var mydatapoint = mydatatrack.geometry.coordinates;
  mydatapoint.push(lng, lat);
})

A simple way to make it easy to understand is with the lib leaflet-realtime. Render the ISS (Internatial space Station) is a great example. We have to acces open data but we have also to extrapolate or kind of create data from the open ones because of the probability of the ISS position due to many factors like avoiding debris manoeuvre, gain speed to gain altitude…

So we have to re compute it’s orbit with the new data every X times and push the new data into our GeoJSON base to make it live.

The full project is on my GitHub as isslive and involved differents way to use the leaflet-realtime lib but also satellite-js to render the ISS past and futur orbit.

isslive

render the ISS orbit
Share
48.844965; 2.4358856
map, opendata, iss

© 2017 Jekyll hack mostly crafted on my couch while having a nice cup of tea