This is an interactive data visualiziation app (deployed here), which allows users to compare electricity rate plans.
To run this project on your local machine, run the following commands:
git clone https://github.com/Kama580/zappyride-rate-comparison.git
npm install
npm start
The structure of a new rate is an object with three keys:
- Name - a string
- Calculation - a function which takes a single parameter, a load profile array
- Home load profile - a non-EV load profile array which will be used for the B1 calculation
For example, for a rate called 'flat-17' which charges flat $17/kWh:
function flat17Rate(loadProfile){
return loadProfile[0] * 0.17
}
{
name: 'flat17',
calculation: flat17Rate,
homeLoadProfile: [
{demand: 'null', kWh: 6937.45}
]
}
To add a new rate, add the rate object to the allRates array in the main App.js file.
You can place the rate function inside the rates.js file and export it with the rateFunctions object.
This app uses React and Victory on the frontend. This project was bootstrapped with Create React App.
- Kama Lee-Tal