TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/rescue-retriever/llms.txt
Use this file to discover all available pages before exploring further.
exportCSV function in filterUtils.js serializes the current animal array to a CSV string, wraps it in a Blob with MIME type text/csv;charset=utf-8, creates an object URL via URL.createObjectURL, programmatically clicks a hidden anchor element with the download attribute set, then immediately revokes the object URL with URL.revokeObjectURL. No server interaction occurs — the entire file is generated and delivered in the browser.
Export Columns
Each exported row corresponds to one animal record. Two computed columns —rescue_programs and best_match_score — are appended beyond the raw dataset fields.
| Column | Type | Description |
|---|---|---|
animalId | string | Unique shelter identifier (e.g. "A706953") |
name | string | Animal name — may be an empty string for unnamed animals |
animalType | string | Always "Dog" in this dataset |
breed | string | Shelter breed assessment at intake |
color | string | Recorded coat color |
sex | string | Sex and reproductive status (e.g. "Intact Female", "Neutered Male") |
age_weeks | integer | Age in whole weeks — Math.round(ageWeeks) applied before writing |
location | string | Shelter intake location (e.g. "Thorndale, Texas, US") |
latitude | float | Intake latitude formatted to 4 decimal places |
longitude | float | Intake longitude formatted to 4 decimal places |
rescue_programs | string | Semicolon-separated qualifying program ids (e.g. "water; disaster"), or empty string if none |
best_match_score | integer | Highest matchScore across all three programs — range 22–100 |
Encoding Rules
- All fields are double-quoted regardless of content type
- Internal double-quote characters (
") are escaped as two consecutive double-quotes ("") per RFC 4180 - File encoding is UTF-8
- Lines are separated by
\n(Unix line endings) - The first row is always the header row with column names
Sample Output
+50), sex matches Intact Female (+25), and age of 30 weeks falls within the 26–156 week range (+25). Luke shares the same breed (contributing +50) but is a Neutered Male — Water Rescue requires Intact Female — so sex does not match (+5). His age of 134 weeks falls within the Water Rescue range (+25), giving a best score of 80 (50 + 5 + 25). He does not fully qualify for any program, so rescue_programs is empty. Lucky is a German Shepherd Mix Intact Male aged 157 weeks: breed matches Disaster Rescue (+50), sex matches (+25), and his age of 157 weeks falls within Disaster Rescue’s 20–300 week range (+25), scoring 100 and qualifying for that program. His age exceeds Mountain Rescue’s maximum of 156 weeks, so he does not qualify there despite matching breed and sex.
Implementation
The completeexportCSV function as it appears in filterUtils.js:
filterUtils.js
getQualifyingPrograms(animal)returns astring[]of program ids — these are joined with"; "(semicolon + space) to produce therescue_programsfield valuegetBestScore(animal).matchScoreis the raw integer from the highest-scoringProgramScoreobjectlatitudeandlongitudeare formatted with.toFixed(4)— any floating-point imprecision in the source data is truncated to four decimal places- The Blob object URL is created immediately before the anchor click and revoked immediately after, minimizing memory retention
The export reflects the current application state at the moment the export button is clicked. If you have filtered the dashboard to Water Rescue candidates before exporting, only those animals appear in the CSV. Filtering first is the recommended workflow for producing program-specific candidate lists.
Export Feature Guide
How to use the Export button in the Rescue Retriever UI, including filter-before-export workflows.
Filter Utilities
Full reference for exportCSV and all other filterUtils.js functions.