This application is a specialized frontend designed for wildlife tracking analysis. It automates Kaplan–Meier survival analysis, providing a standardized, GUI-driven interface to visualize survival curves and life tables from tracking data.
While designed to simulate a node within the MoveApps R-SDK workflow, this web version runs entirely in the browser using React, simulating the statistical logic typically performed by R packages (survival, move2).
Note: This version is a static demo. The "Biological Interpretation" feature serves a pre-written example report instead of connecting to a live AI API, ensuring the app is safe to run without configuration.
- Data Ingestion: Upload CSV files simulating
move2tracking data. - Survival Analysis: Client-side calculation of Kaplan-Meier estimates (Survival Probability, Standard Error, 95% CI).
- Interactive Visualization: Dynamic survival curves with censoring marks and confidence intervals.
- Risk Table: "Number at risk" tabulation aligned with time steps.
- Interpretation Example: Displays a mock publication-quality ecological insight report (simulating Google Gemini output).
- Configuration: Flexible controls for time units, event columns (mortality), and grouping variables (e.g., Sex, Age).
- Frontend: React 18, Tailwind CSS, Lucide React (Icons).
- Visualization: Recharts.
- Markdown Rendering:
react-markdown. - Build-less Execution: Uses ES Modules via
importmapfor immediate browser execution.
- Running: Serve the directory using a simple HTTP server (e.g.,
python3 -m http.server,npx serve, or VS Code Live Server). - Data: The app loads with mock data. Upload a CSV with columns for duration/time, status (binary), and grouping factors to test with your own data.
User Prompt:
Build Design: MoveApps Survival Estimator (R-SDK) ... (See full prompt in history) ...
Implementation: The system was implemented as a React Web App simulating the R logic.
survivalLogic.ts: Recreatedsurvfitlogic (KM estimator, Greenwood's formula).SurvivalChart.tsx: Used Recharts to mimicggsurvfitaesthetics.
Issue: Sort comparison in RiskTable.tsx caused a TypeScript arithmetic error due to implicit types.
Fix: Explicitly typed parameters in the sort function (a: number, b: number) => a - b.
User Prompt:
can we format pretty this Biological Interpretation (Gemini)?
Implementation:
- Added
react-markdownto theimportmapinindex.html. - Updated
App.tsxto render the Gemini response as Markdown with custom styling.
User Prompt:
the ai-features are connected to my account? If so just create a png example and remove code that would utilize my API.
Implementation:
- Removed
GoogleGenAIimport and API key logic fromservices/geminiService.ts. - Replaced dynamic generation with a static Markdown string to mock the feature safely.
- Removed
@google/genaifromindex.html.