Prototype data dashboard using the Cuthill Gold Standard Dataset, which was processed from Cuthill, et. al. (original dataset available at doi:10.5061/dryad.2hp1978). Test datasets (the processed version of Cuthill's data with and without filepath URLs) are available in test_data.
This dashboard focuses on images labeled at the species and subspecies level as described in a CSV.
For full dashboard functionality, upload a CSV or XLS file with the following columns:
Species
: Species of each sample.Subspecies
: Subspecies of each sample.View
: View of the sample (eg., 'ventral' or 'dorsal' for butterflies).Sex
: Sex of each sample.hybrid_stat
: Hybrid status of each sample (eg., 'valid_subspecies', 'subspecies_synonym', or 'unknown').lat
*: Latitude at which image was taken or specimen was collected: number in [-90,90].lon
*: Longitude at which image was taken or specimen was collected: number in [-180,180].long
will also be accepted.file_url
*: URL to access file. Note: Images should be in PNG or JPEG format, TIFF may fail to render in the sample image display.
*Note:
- Column names are not case-sensitive.
lat
andlon
columns are not required to utilize the dashboard, but there will be no map view if they are not included. Blank (or null) entries are recorded asunknown
, and thus excluded from map view.file_url
is not required, but there will be no sample images option if it is not included.locality
may be provided, otherwise it will take on the valuelat|lon
orunknown
if these are not provided.
Create and activate a new (python) virtual environment.
Then install the required packages (if using conda
, first run conda install pip
):
pip install -r requirements.txt
and run
python dashboard.py
Then navigate to http://127.0.0.1:8050/ in your browser to see the graphs.
To run the dashboard in a more scalable manner a Dockerfile is provided. This container uses gunicorn to support more users at the same time. Building and running the container requires that docker is installed.
docker build -t dashboard .
To deploy the dashboard with 6 workers run the following command:
docker run --env BACKEND_WORKERS=6 -p 5000:5000 -it dashboard
Then open the following URL http://0.0.0.0:5000/.
The testing suite requires Dash Testing and pytest-mock, which can be installed in your python environment by running:
pip install dash\[testing] pytest-mock
Within your python environment run the following command to run all tests:
pytest