This guide walks you through configuring and running the Source Voltage Report workflow (internal id source_voltage), which pulls GPS relocations and their embedded battery/collar-voltage telemetry from EarthRanger for a named subject group, compares the current period against a configurable previous period, and produces a per-subject historic voltage chart plus a merged Word doc report.
For each subject in the selected group, the workflow delivers:
- A historic voltage chart — the subject's current-period voltage plotted against a min/mean/max band derived from the previous period (falls back to the current period's own band when no previous-period data is available)
- 2 combined GeoParquet exports — all subjects' current-period and previous-period relocations, each with an extracted
voltagecolumn - A dashboard widget — one merged "Collar Voltage" map/plot widget per subject group run
- A Word doc report (
overall_report.docx) — cover page (with organisation logo, prepared-by, and report period) plus every subject's historic voltage chart, generated from a downloadable template
Before running the workflow, ensure you have:
- Access to an EarthRanger instance with subject group observations whose
observation_detailsinclude a battery/voltage field — the workflow looks forbattery,mainVoltage,batt, orpower(in that order) and uses whichever is present - (Optional) An organisation logo file (PNG or JPG) to display on the Word report's cover page — only needed if you enable the Word doc report
In the workflow runner, go to Workflow Templates and click Add Workflow Template. Paste the GitHub repository URL into the Github Link field:
https://github.com/wildlife-dynamics/wt-source-voltage.git
Then click Add Template.
Navigate to Data Sources and click Connect, then select EarthRanger. Fill in the connection form:
- Data Source Name — a label to identify this connection
- EarthRanger URL — your instance URL (e.g.
your-site.pamdas.org) - EarthRanger Username and EarthRanger Password
Credentials are not validated at setup time. Any authentication errors will appear when the workflow runs.
Click Connect to save.
After the template is added, it appears in the Workflow Templates list. Click it to open the workflow configuration form.
The card may show Initializing… briefly while the environment is set up.
The configuration form opens with two sections at the top.
Set Workflow Details
| Field | Description |
|---|---|
| Workflow Name | A short name to identify this run |
| Workflow Description | Optional notes (e.g. subject group, site, or reporting period) |
Time Range
| Field | Description |
|---|---|
| Timezone | Select the local timezone (e.g. Africa/Nairobi UTC+03:00) |
| Since | Start date and time of the current analysis period |
| Until | End date and time of the current analysis period |
Grouping is fixed to Subject Name — there is no grouping choice to make.
Connect to EarthRanger
Select the EarthRanger data source configured in Step 2 from the Data Source dropdown.
Subject Group
Enter the name of the EarthRanger subject group to analyse in the Subject Group Name field (default: Elephants). Each subject in the group is processed individually.
Previous Period
Every option below computes a comparison period that ends on the same Start Date as your current time range (so the two periods never overlap) — only the comparison period's own Start Date changes:
| Mode | Description |
|---|---|
| Custom | Enter your own Years / Months / Weeks / Days offset (defaults to 1 month back) |
| Preset | Choose a common lookback: 1, 3, or 6 months, or 1 year back |
| Calendar | Pick an exact Start Date |
The previous period's relocations are used solely to compute the historic min/mean/max voltage band; if no previous-period data is found, the band collapses to the current period's own values.
Generate Word Doc Report
| Field | Description |
|---|---|
| Report Logo | Upload the organisation logo to display on the report cover page (PNG or JPG recommended). Required if you want a logo on the cover page; leave blank to omit it — the report still generates without one. |
Once all parameters are set, click Submit.
Once submitted, the runner will:
- Fetch subject group observations from EarthRanger for the current time range, convert
fixtimeto the analysis timezone, and derive relocations (dropping points at(180,90),(0,0), and(1,1)). - Fetch subject group observations for the computed previous period and process them the same way.
- Sort both current and previous relocations by
fixtimeand persist each as GeoParquet (relocations.parquet,previous_period_relocations.parquet). - Extract a
voltagecolumn from each relocation set'sobservation_detailsJSON, checking thebattery,mainVoltage,batt, andpowerfields in order. - Split both relocation sets by subject name and pair each subject's current and previous slices together.
- Plot each subject's historic voltage chart — current-period voltage against the previous period's min/mean/max band (widened slightly if the band collapses to a single value; falls back to the current period alone when no previous-period data exists).
- Build each chart's filename from a safe-string version of the subject's name (
<subject>_historic_voltage.html), persist the chart HTML, and convert it to PNG. - Assemble a "Collar Voltage" map widget per subject and merge them into a single dashboard widget.
- Download the Word report template and, if provided, the organisation logo.
- Generate the merged Word doc report (
overall_report.docx) — cover page (logo, prepared-by, report period) plus every subject's historic voltage chart. - Assemble the interactive dashboard (Collar Voltage Dashboard) and save all outputs to the directory specified by
ECOSCOPE_WORKFLOWS_RESULTS.
All outputs are written to $ECOSCOPE_WORKFLOWS_RESULTS/. Files marked with <subject> are produced once per subject in the group.
| File | Description |
|---|---|
<subject>_historic_voltage.html / .png |
Historic voltage chart — current voltage vs. previous-period min/mean/max band |
| File | Description |
|---|---|
relocations.parquet |
All subjects' current-period relocations, including the extracted voltage column |
previous_period_relocations.parquet |
All subjects' previous-period relocations, including the extracted voltage column |
overall_report.docx |
Final Word doc report (cover page + every subject's historic voltage chart) |