Prototyping
57

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 :-)
29.10.2020 21:35

Team forming

loleg has joined

07.02.2020 15:34

Documentation

Worked on by admin

04.02.2017 17:00

Hackathon finished

04.02.2017 13:53

Documentation

Worked on by heidi_seibold

04.02.2017 13:23

Documentation

Worked on by admin

04.02.2017 13:22

Team forming

heidi_seibold has joined

04.02.2017 13:03

Documentation

Worked on by admin

03.02.2017 21:58

Team forming

admin has joined

03.02.2017 21:58

Project started

Initialized by admin

27.01.2017 18:00

Hackathon started

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-.