Commit e5bca74b authored by Theis's avatar Theis
Browse files

Added a README.md file for the web part

parent e93fdc99
# Air
AIR is an open-source machine learning project to improve rehabilitation for danish citizens.
## Installation
To run the application it is recommended to firstly install visual studio code.\
Get it from: https://code.visualstudio.com/
When it is install open Visual Studio Code and select 'File' followed by 'Open Folder'.
Select the web folder in the air project.
Now open a terminal by selecting 'Terminal' followed by 'New Terminal' in the top toolbar in Visual Studio Code.
A window in the bottom should now appear, and it is recommended to split the terminal into two.
Click with your mouse on the created terminal and enter CTRL+SHIFT+5.
Enter the following in one of the two terminals:
```bash
cd vue-app
```
And the following in the other terminal:
```bash
cd api
```
In both terminals, enter 'npm install' to install all necessary dependencies.
When that is done, enter the following in the presented order:\
├──'node server.js' - In the terminal associated with the api.\
├──'npm run serve' - In the terminal associated with the vue-app.
When the latter has finished a window should now open in a browser with the application running.
Enjoy!
\ No newline at end of file
......@@ -125,7 +125,7 @@ app.post("/home/:ssn", async (req, res) => {
res.send(false)
} else {
//Format and sort assistive aids data from Database
//Format and Sort Assistive Aids Data from Database
var assistiveAidsWithCorrectDateFormat = changeLendDateFormat(citizenData.Assistive_Aids)
var sortedAssistiveAids = sortAssistiveAidsByDate(assistiveAidsWithCorrectDateFormat)
......@@ -144,11 +144,9 @@ app.post("/home/:ssn", async (req, res) => {
//Result from ML model for both cases
var citizenCompleteTrainingPrediction = await getCompleteTrainingPrediction(inputForCompleteTrainingPrediction);
var citizenAlarmPrediction = await getAlarmPrediction(inputForAlarmPrediction);
convertDataSizeToKb("Combined datasize from both the ML Model and Database in Kb: ", { citizenData, citizenCompleteTrainingPrediction, citizenAlarmPrediction })
res.json({ citizenData, citizenCompleteTrainingPrediction, citizenAlarmPrediction })
await deleteVariable([
citizenData,
assistiveAidsWithCorrectDateFormat,
......@@ -167,7 +165,7 @@ function changeLendDateFormat(assistiveAids) {
assistiveAids.forEach(function(assistiveAid) {
assistiveAid.lend_date = rearrangeDateFormat(assistiveAid.lend_date)
});
return assistiveAids;
return assistiveAids
}
function rearrangeDateFormat(date) {
......@@ -176,7 +174,7 @@ function rearrangeDateFormat(date) {
var month = dateInArray[1]
var year = dateInArray[2]
var rearrangedDateFormat = month + '/' + day + '/' + '20' + year
return rearrangedDateFormat;
return rearrangedDateFormat
}
function sortAssistiveAidsByDate(assistiveAids){
......@@ -195,7 +193,7 @@ function removeAlarmFromAssistiveAidsList(assistiveAids) {
assistiveAids.splice(i, 1);
}
}
return assistiveAids;
return assistiveAids
}
function appendAssistiveAidsISO(assistiveAids) {
......
......@@ -4,7 +4,7 @@
<v-row>
<v-col cols="12" xl="6" lg="6" md="12" sm="12">
<v-card class="pa-2" outlined rounded="15px" elevation="5">
<div class="header-text">Sandsynlighed for ikke at en nødalarm</div>
<div class="header-text">Sandsynlighed for ikke at modtage en nødalarm</div>
<apexchart height="400" type="area" :options="$_chart_options" :series="$_chart_series" />
<explainer :alarm="true" />
</v-card>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment