Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dashboard using Plotly Dash. #4

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ COPY . /

RUN pip --no-cache-dir install -r requirements.txt

ENV FLASK_APP=influenza_estimator
ENV FLASK_ENV=development
EXPOSE 8050

EXPOSE 5000

CMD ["flask", "run", "-h", "0.0.0.0", "-p", "5000"]
CMD ["python", "app.py", "-ip", "0.0.0.0", "-p", "8050"]
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ You will find instructions to install docker engine on your system [here.](https
### Pulling and running the docker image

```commandline
docker pull tejsukhatme/influenza_estimator:random_forest
docker run -it -p 5000:5000 tejsukhatme/influenza_estimator:random_forest
docker pull tejsukhatme/influenza_estimator:latest
docker run -it -p 5000:5000 tejsukhatme/influenza_estimator:latest
```


Expand All @@ -21,7 +21,7 @@ docker run -it -p 5000:5000 tejsukhatme/influenza_estimator:random_forest
cd into the folder of choice and enter:
```commandline
git pull https://github.com/Hephaestus12/applications.git
cd applications/gsoc_application_projects/2020/influenza/web/
cd applications/gsoc_application_projects/2020/influenza/dash/
```

### Prepare the Environment
Expand All @@ -40,9 +40,7 @@ pip install -r requirements.txt

### Running the application
```commandline
export FLASK_APP=influenza_estimator
export FLASK_ENV=development
flask run
python app.py
```

Your flask application should be successfully running once this is done.
Expand All @@ -58,36 +56,18 @@ Send a GET request to the following Endpoint:
```


#### GET older influenza ESTIMATE numbers as a JSON file for all countries.
#### GET older influenza PREDICTED ESTIMATE numbers as a JSON file for all the countries.
Send a GET request to the following Endpoint:
```
/api/v1.0/all/weekly/estimate/<int:year>/<int:week>/
```


#### GET older influenza INCIDENCE numbers as a JSON file for all countries.
#### GET older influenza INCIDENCE numbers as a JSON file for all the countries.
Send a GET request to the following Endpoint:
```
/api/v1.0/all/weekly/incidence/<int:year>/<int:week>/
```


#### GET the Live influenza ESTIMATE number as a JSON file for one country.
Send a GET request to the following Endpoint:
```
/api/v1.0/specific/current/<string:country>
```


#### GET the older influenza ESTIMATE number as a JSON file for one country..
Send a GET request to the following Endpoint:
```
/api/v1.0/specific/weekly/estimate/<int:year>/<int:week>/<string:country>
```


#### GET the older influenza INCIDENCE number as a JSON file for one country.
Send a GET request to the following Endpoint:
```
/api/v1.0/specific/weekly/incidence/<int:year>/<int:week>/<string:country>
```
This frontend is inspired from one of Plotly Dash's sample projects -----> https://github.com/plotly/dash-sample-apps/tree/master/apps/dash-oil-and-gas
Loading