The Notes from Nature Field Book is intended to provide a dashboard for volunteers that participate in Notes from Nature.
This project was bootstrapped with Create React App.
In the project directory, you can run:
Installs the dependencies.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode. See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Deployment is handled by Github Action. Both staging and production deployment can be run ad hoc in the actions tab as needed if you have the appropriate permissions on the repository.
On merge to master, a Github Action is triggered to deploy to staging found at https://field-book-preview.notesfromnature.org
.
Production deployments are triggered by an update to which commit the production-release
tag is pointed to. This tag should be updated via chat ops and then a Github Action will run that builds and uploads the files to our cloud provider found at https://field-book.notesfromnature.org/
.
Accepts query params:
env=[ENV]
, whereENV
=production
orstaging
project_id=[PROJECT_ID]
, wherePROJECT_ID
= desired project's ID, i.e.1234
There are two types of badges, referred to as:
- Stats badges, based on zoo-event-stats (i.e. 10 Classifications),
- Caesar badges, based on Caesar and nfn-faas (i.e. 80s, Night Owl, 10 Herbarium, etc.)
Stats badges require no additional configuration. Caesar badges require the following project and workflow Caesar configurations:
- From https://caesar.zooniverse.org/projects, if no Caesar project config exists then click the "+Add" button to create a new config, providing the project ID when prompted. Once the project config is added/created, or if it already exists, select it from the list.
- From the Caesar project config, click the "Reducers" tab (i.e. https://caesar.zooniverse.org/projects/1558#reducers).
- Create the following 4 Count Reducers by clicking "+Create" and select "Count" from the dropdown for each, with the noted options:
- Decade
- key:
decade
- topic: reduce_by_user
- field_name:
faas.decade
- if_missing: ignore
- extractor keys:
["faas"]
- key:
- Earth Day
- key:
earth_day
- topic: reduce_by_user
- field_name:
faas.earth_day
- if_missing: ignore
- extractor keys:
["faas"]
- repeated classifications: keep_first
- key:
- Time
- key:
time
- topic: reduce_by_user
- field_name:
faas.time
- if_missing: ignore
- extractor keys:
["faas"]
- repeated classifications: keep_first
- key:
- Workflow
- key:
workflow_type
- topic: reduce_by_user
- field_name:
faas.workflow
- if_missing: ignore
- extractor keys:
["faas"]
- key:
Note: use other Notes from Nature Caesar project configurations as additional examples, search https://caesar.zooniverse.org/projects for "Notes from Nature".
- From https://caesar.zooniverse.org/workflows, if no Caesar workflow config exists then click the "+Add" button to create a new config, providing the workflow ID when prompted. Once the workflow config is added/created, or if it already exists, select it from the list.
- From the Caesar workflow config, click the "Extractors" tab (i.e. https://caesar.zooniverse.org/workflows/10362#extractors), then click "+Create Extractor" and select "External" from the dropdown. The External Extractor settings are:
- Key:
faas
- Url: variable per workflow, starts with
https://aggregation-caesar.zooniverse.org/extractors/nfn_extractor?
, then includes:- (required)
workflow=[WORKFLOW_TYPE]
,WORKFLOW_TYPE
options (choose one of) =[aquatics, butterfly, fossils, herbarium, labs, macrofungi, magnified, pinned_specimen]
, as determined often by workflow name (usually prefixed) or contact researcher - (optional, if relevant task)
year=[TASK_KEY FOR DROPDOWN TASK WITH 4-DIGIT YEAR]
, if multiple tasks for year, likely use first related task (key) with confirmation from researcher - example:
https://aggregation-caesar.zooniverse.org/extractors/nfn_extractor?workflow=herbarium&year=T10
- (required)
- Key:
- Click "Create External extractor" to save extractor settings.
Note: use other Notes from Nature Caesar workflow configurations as additional examples, search https://caesar.zooniverse.org/workflows for "Notes from Nature" or by workflow type (i.e. "Herbarium").
Stats related badges working (total classifications), Caesar related badges not (decade, workflow type, or time of day):
- Check the Caesar workflow config summary, confirm there are total extracts
- If no extracts, review workflow extractor settings, rerun workflow extractor, though classifications before may be lost
- If there are workflow extracts, issue is likely with Caesar project config. From Caesar project config confirm there are total reductions, regardless though especially if there are no reductions - rerun project reducers
Decade badges not working, all others working:
- Confirm task for year is dropdown task with options generated with dropdown task editor presets and therefore values are numeric (i.e. dropdown task option has label and value of
1900
, not value of randomly generated alphanumeric) - Confirm Caesar workflow extractor external url notes correct task key (i.e. included in url is
year=T10
)
To add or edit workflow type badges (add lichen badges commit example):
- Add or edit badge images (preferably .png, around 25KB) in related workflow type folder in src/badges/workflow/
- Edit src/badges/index.js to import new badge images
- Edit src/badges/index.js to reflect badge objects, where:
{
icon: [badge image import name, i.e. seed],
level: [number of classifications to earn badge, i.e. 10],
reducerKey: 'workflow_type',
subgroup: [workflow type, i.e. 'herbarium']
},
Note: stats badges can be added similar to workflow type badges while decade, time, and Earth Day equivalent badges require changes to nfn-faas.