GithubHelp home page GithubHelp logo

solarprotocoldata's Introduction

Working with Solar Protocol Data

  • Data is from the Solar Protocol API: http://solarprotocol.net/api/v2/. Please read the documentation there.
  • Offline examples of API data are saved in the data folder in this repository.

Examples are in Javascript (p5js) and Python (Gizeh).

P5JS (client side rendering)

Install p5.js:

Example: 0-single-value

To access the data, loadJSON() is used with a callback function called gotData.

loadJSON(URL, gotData); 

Example: 1-value-duration

alt text

Example: 2-cc-data

alt text

Example: 3 Point of Entry

  • Visualizes time series of parameters from all servers on the network.
  • Code

alt text

Python (server side rendering)

  • Visualizing data server side using Python and either a plotting library called Plotly or a graphics library called Gizeh:

Plotly

Example: 0-single-value

  • Access a single data point from the server
  • Code

Gizeh

Install Gizeh

  • Upgrade pip: python3 -m pip install --upgrade pip
  • Install cairo sudo apt-get install libcairo2-dev
  • Install gizeh sudo pip3 install gizeh
  • Or use the online editor.

Notes on Gizeh

Color

  • Takes RGB color of the form (r,g,b) where each element is comprised between 0 and 1 (1 is 100%).
  • (1,1,1) is white
  • (0,0,0) is black
  • See the rip codes in this online color converter

Example: 0-single-value

  • Access a single data point from the server
  • Code

alt text

Example: 1-value-duration

  • Work with the timeseries of a charge controller parameter like current or voltage.
  • Code

alt text

Example: 2-cc-data

  • Visualize the timeseries of all charge controller parameters
  • Code coming soon.

solarprotocoldata's People

Contributors

alexnathanson avatar tegacodes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

guillaume-slize

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.