This is a dashboard for Data Hub users, with information and graphs on their data hub. The dashboard has been created in Python Dash, which embeds interactive Plotly graphs.
- Clone this repository:
git clone https://github.com/nadimm-rahman/ena-datahub-dashboard.git
-
Check the requirements and ensure that you have them installed.
-
Download the data by specifying the data hub you're interested in. Dcc_grusin (a public SARS-CoV-2 data hub) has been used in the following example:
python scripts/visualisation_prep.py -u dcc_grusin -p <PASSWORD>
-
Include configuration fields within
config.yaml
. An example has been included within the file. -
Good to go! Run the application:
python app.py
and head to http://127.0.0.1:8050/
on your browser.
Files associated with data pulling, shaping and visualisation:
- scripts/data_import.py - Includes a class object which handles all data downloaded and required to create plots off of. The output is stored in the
data
directory. - scripts/visualisation_prep.py - Run this script to coordinate the data download and generation of customised dataframe(s) for plots in the application.
- scripts/plots.py - Includes a class object which handles creation of certain plot(s), that is called when
python app.py
is run. - assets - Contains all styling-related files.
Files associated with styling:
- assets/style.css - Includes CSS styling for the HTML elements in the application.
- assets/custom_with_ids.geo.json - JSON for the map visualisation coordinates
- assets/favicon.ico - Icons and font