Integration of Personalised EV Usage Insights use case into frontend#63
Open
jezzif wants to merge 21 commits intoChameleon-company:masterfrom
Open
Integration of Personalised EV Usage Insights use case into frontend#63jezzif wants to merge 21 commits intoChameleon-company:masterfrom
jezzif wants to merge 21 commits intoChameleon-company:masterfrom
Conversation
…dEvInsightsService
Connecting ends
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Personalised EV Usage Insights: Frontend Integration
What this PR does:
Integrates the EVAT-Data-Science Personalised EV Usage Insights use case into the website
Adds ML-powered results display and 3 charts
Files changed:
src/components/BarChart.jsx - new file with react-chartjs-2 bar chart component
src/components/InisghtsDisplay.jsx - new file with display for data and 3 BarChart components
src/components/PersonalisedInsightsFormComponent.jsx - new file with form
src/data/apiEndpoints.js - added two new endpoints
src/pages/PersonalisedInsights.jsx - new file with InsightsDisplay component
src/pages/PersonalisedInsightsForm.jsx - new file with PersonalisedInsightsFormComponent
src/pages/Profile.jsx - added links to PersonalisedInsights page and PersonalisedInsightsForm page
src/services/personalisedEvInsightsService.js - 2 new API functions added
Dependencies added:
react-chartjs-2 for creating BarChart component
Requirements to run:
Node backend must be running on port 8080
Python ML service must be running on port 8000
See setup guide in the repo for full instructions
Pages affected:
/profile - updated with new buttons that link to new pages created
/insights-form - added form that when submitted runs python ML service to predict driver type and potential savings for using an EV
/insights - added display that shows the results of python ML service prediction with driver profile, potential savings, and 3 charts comparing user's driving to similar drivers and all drivers in 3 categories: