GithubHelp home page GithubHelp logo

flowerpower's Introduction

flowerpower โ€” access Parrot's Flower Power Sensor from R

Travis-CI Build Status

timeseries plot of temperature data from FlowerPower unit

An R package to access data from Parrot's awesome Flower Power sensor. This is still in alpha.

FlowerPower's API is a bit strange and requires a lot of authentication keys, including your username and password to the FlowerPower site (not the dev portal). Here is an example:

> fp <- flowerpower(user, pass, id, secret)
> get_locations(fp) # get location IDs
> s <- get_samples(fp, location='1W2zIGfgEF14220_YOURLOCATIONKEY')
> head(s)
       capture_ts par_umole_m2s air_temperature_celsius vwc_percent
1 2015-03-10 21:49:00     12.607764                30.45476    17.04505
2 2015-03-10 22:04:00     11.928668                29.37226    16.63505
3 2015-03-10 22:19:00      8.715568                28.45192    16.44611
4 2015-03-10 22:34:00     11.429752                28.15554    15.81059
5 2015-03-10 22:49:00      7.567640                28.86598    16.66856
6 2015-03-10 23:04:00      7.066480                28.31073    16.91436

> p <- ggplot(s) + geom_line(aes(x=capture_ts, y=air_temperature_celsius))
> p <- p + xlab("time") + ylab("temperature (C)")
> p

There's also a get_fertilizer() function to access these data.

Design

An R6 class stores state and lower-level methods for getting data from the server, and higher-level S3 methods call these methods and reshape results. Users interact with these higher-level functions, but I leave the object methods public for developers that want to do their own hacking.

Todo

  • Refresh auth token.

flowerpower's People

Contributors

vsbuffalo avatar

Stargazers

Divya Pujara avatar  avatar Mark Boss avatar Dr. K. D. Murray avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Forkers

samberger

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.