Open the Things and See

Publishing TTN applications as open data

By sharing device information from the community, we would like to see some aggregate data about the use of nodes at the hackathon. We asked several teams at Make Zurich to share their applications on The Things Network to let us, in a safe way and without interfering with their projects, plot the overall activity data from all devices - and make a rudimentary analysis at least only based on timestamps. Furthermore, we started a discussion about the potential of integrating their Swagger-based API with Data Packages.

See also: aggregating analytics from Make Zurich (forum.schoolofdata.ch)

Analysis

Four teams - ttn-soundlevel, MoBiFloC, Bicycle tracking and silencr - have sent us (via private message) their keys (THANK YOU!), the collected snapshot was converted using csv-kit and aggregated in a LibreOffice spreadsheet. Download a copy.

We made a visualisation of the result:

Using this R code:

library("ggplot2")
library("plyr")

## read data
dat <- read.csv("allthethings1.csv")

## normalize the measurements per project
dat$value <- as.numeric(as.character(dat$value))
dat$value_normalized <- ddply(dat, .variables = .(device_id), 
                              .fun = function(x) scale(x$value))[, 2]


## time
dat$t <- as.POSIXlt(strptime(dat$time, "%FT%T"))

## plot
ggplot(dat, aes(x = t, y = value_normalized, color = device_id)) + 
  geom_point() +
  geom_line() 

Notes

How to

  • Add and enable a Data Storage integration (this is optional, but recommended)

  • Go to Settings > Access keys > Add an access key, give it a name (e.g. "opendata"), leave the default options

  • Go to back to the Overview, scroll to the bottom, and copy the newly created key

  • Note down the Access Key and Application ID (e.g. in the screenshot above, "makezurich-open")

  • Treat yourself to a sandwich :-)

Joined the team

29.10.2020 21:35 ~ loleg

Edited content

07.02.2020 15:34 ~ admin

Event finished

04.02.2017 17:00

Joined the team

04.02.2017 13:22 ~ heidi_seibold

Edited content

04.02.2017 13:03 ~ admin

Challenge posted

03.02.2017 21:58 ~ admin

Event started

27.01.2017 18:00

Open challenge

If you don’t feel like building any of the other challenges, you are free to combine elements of each to create innovative solutions for the city - kickstarted by you!

Get started

Join the conversation on The Things Network Switzerland Slack team (if you haven't signed up yet, get your invite here). There is one channel per challenge, look for the ones prefixed with #mz-.
Make Zurich 2017