Git Product home page Git Product logo

openvolt-dashboard-frontend's Introduction

Energy Footprint Calculator - Frontend

It is a simple dashboard written in Vue using TypeScript.

Given a meter_id and a start_date and end_date it returns the energy footprint of the meter in the given period. The start_date is included in the calculation, while the end_date is excluded from the calculation, e.g.,: [start_date, end_date).

The footprint consists of the following properties:

  • total energy consumption
  • total CO2 emitted
  • the fuel mix based on the National Grid's fuel mix data.

Energy footprint dashboard

The total energy consumption is calculated by summing up the energy consumption of the meter in the given period.

The total amount of CO2 (kgs) emitted by the electricity generated for the given meter in the given period is calculated by taking the sum of the multiplication of the energy consumption of the meter in half-hourly intervals by the matching half-hourly CO2 average levels of the National Grid's CO2 level data.

The fuel mix is calculated by taking the sum of the multiplication of the energy consumption of the meter in half-hourly intervals by the matching half-hourly fuel mix of the National Grid's fuel mix data.

Prerequisites

In order to run the Dashboard Frontend locally you need to have the Dashboard Backend running locally as well.

The code for the Dashboard Backend is available here.

Installation

Clone the repository and navigate into it.

Create an .env file with the contents provided in the example.env file.

Run

npm install

to install all of the dependency packages.

Usage

npm run dev

to start the server in development mode at http://localhost:5173/.

Notes

  • the share values are fixed to 3 decimal places, so 0.000 is returned for a value of 0.0001.
  • the energyWithUnknownOrigin is calculated by subtracting the sum of the generationMix with accounted origin from the totalEnergyConsumption.
  • either meter_id or a combination of (meter_number and customer_id) must be provided. For the purpose of this example we only make use of the meter_id query parameter.
  • lookback is an alternative to start_date and end_date and it is used to calculate the start_date and end_date based on the current date. In this example we only make use of the start_date and end_date query parameters.
  • granularity value of hh is the only supported value at the moment.
  • start_date and end_date must be provided in the ISO 8601 format.

openvolt-dashboard-frontend's People

Watchers

nik mel-nik-ov avatar

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.