Skip to content

Commit

Permalink
Text edits, README.md update and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
camiloramirezgo committed Sep 17, 2019
1 parent 3de384f commit 38f94bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ A companion dashboard to visualize the results from the OSeMOSYS model is provid
### Installation instructions:

1. You should have installed a distribution of python 3.x in your computer.
2. If you are using the Anaconda distribution of Python, install all python packages required listed in the `requirements.txt` file using the `conda install -c conda-forge --file requirements.txt` command in your computer bash or anaconda prompt. Alternatively, you can create a virtual environment using venv and install all required packages there using pip:
2. If you are using the Anaconda distribution of Python, install all python packages required listed in the `requirements.txt`
file using the `conda install -c conda-forge --file requirements.txt` command in your computer bash or anaconda prompt.
You can also create an environment with `conda create -n <name-of-environment> -c conda-forge --file requirements.txt`,
and activate it with `conda activate <name-of-environment>`.
Alternatively, you can create a virtual environment using venv and install all required packages there using pip:
```
cd <path-to-the-dashboard-folder>
pip install virtualenv
Expand All @@ -35,6 +39,6 @@ source venv/Scripts/activate
pip install -r requirements.txt
```
### Running the dashboard:
After installing all required packages, the dashboard can be run locally by running `python app.py` in your bash or anaconda prompt. A local host URL will be displayed as: http://127.0.0.1:8050/ copy it and paste it in your browser.
After installing all required packages, the dashboard can be run locally by running `dashboard/python app.py` in your bash or anaconda prompt. A local host URL will be displayed as: http://127.0.0.1:8050/ copy it and paste it in your browser.

To exit the app, type CTRL + C a couple of times in your bash.
Binary file modified dashboard/Data/Electricity_demand.xlsx
Binary file not shown.
8 changes: 4 additions & 4 deletions dashboard/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,14 @@ def get_general_graph(df, year_slider, variable, layout, title):
),
html.Div(
[
html.P('SDG7.1 - Access to electricity', style={'text-align': 'center', 'font-size': '12px'}),
html.P('SDG7.1.1 - Access to electricity', style={'text-align': 'center', 'font-size': '12px'}),
daq.BooleanSwitch(id='el-access-switch', on=False)
],
className="mini_container",
),
html.Div(
[
html.P('SDG7.1 - Access to clean cooking fuel', style={'text-align': 'center', 'font-size': '12px'}),
html.P('SDG7.1.2 - Access to clean cooking fuel', style={'text-align': 'center', 'font-size': '12px'}),
daq.BooleanSwitch(id='clean-cooking-switch', on=False)
],
className="mini_container",
Expand Down Expand Up @@ -561,7 +561,7 @@ def get_general_graph(df, year_slider, variable, layout, title):
[
html.Div(
[
html.H6('SDG7.3 - Access to electricity'),
html.H6('SDG7.1.1 - Access to electricity'),
dcc.Graph(
id='el_access_graph',
),
Expand All @@ -584,7 +584,7 @@ def get_general_graph(df, year_slider, variable, layout, title):
),
html.Div(
[
html.H6('SDG7.1 - Access to clean cooking fuel'),
html.H6('SDG7.1.2 - Access to clean cooking fuel'),
dcc.Graph(
id='cooking_graph',
),
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ python-dateutil==2.8.0
pytz==2019.2
retrying==1.3.3
six==1.12.0
snakemake
Werkzeug==0.15.6
xlrd==1.2.0

0 comments on commit 38f94bb

Please sign in to comment.