SkillAgentSearch skills...

Gbsample

A sample Sinatra app that uses the Green Button gem to parse a Green Button data file and graph it using High Charts.

Install / Use

/learn @cew821/Gbsample
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Readme

This is a sample application that uses the Green Button gem to parse data collected from a server that responds to GET requests for Green Button usage points.

It is built using Sinatra and HighCharts, and is merely meant to provide a simple example of the Green Button parser library at work.

Running Locally

You will need Ruby installed.

To run locally, clone the repository, cd into the repo, and run $ bundle install. Then, $ ruby gbsample.rb to start a server. Visit http://localhost:4567/greenbutton to initiate a request to the sample Green Button data endpoint (in this case https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource/Batch/RetailCustomer/1/UsagePoint). Once the file has been loaded from the server, it will be parsed and displayed on the chart.

The action happens in gbsample.rb.

In Production

The app, such as it is, is deployed on Heroku. You can test it by visiting http://gbsample.herokuapp.com/greenbutton.

This software is Open Source. See license.txt for more details.

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated5y ago
Forks0

Languages

Ruby

Security Score

70/100

Audited on Oct 10, 2020

No findings