Make sure you have the matching node version installed
nvm use && yarn
yarn start:api
yarn start
Convert csv to json
npx csvtojson data/trips.csv > data/trips.json
Normalize data for json server and output to data/api.json
npx ts-node scripts/mockVehiclesData.ts
Run mock data server
yarn start:api
You will create a small proof-of-concept of a calculation and accompanying interactive visualization that could be featured on our owner portal. You can choose how to present the information, but we recommend either showing CO2 emissions or cost savings generated by choosing an Electric SUV vs the provided benchmark gasoline vehicle (Audi Q7 at the top of the inputs.csv file).
Here are national average values for emissions and cost:
lbs CO2/kWh | $/kWh | lbs CO2/gal gas | $/gal gas |
---|---|---|---|
0.90 | 0.14 | 19.59 | 3.60 |
To simulate user data, the file trips.csv has some example inputs; the visualization should update according to which trip is selected in a dropdown menu. Each row of the file specifies the vehicle used for the trip data and the number of miles driven each month in that vehicle. You should “fetch” this data from a mock api. A quick example for reference: https://www.pluralsight.com/guides/react-mock-api.
We hope this task gives you a chance to demonstrate skills including: Front End Development: JavaScript/Typescript, React or similar library/framework Data Visualization: Presenting conclusions in a clear, logical way Good coding practices and time management
- Code can be delivered in a zip/tar file or git repository and either hosted in a demo environment or packaged with instructions for deployment
- Do not include any confidential or proprietary information in your response