This is a web-based application for predicting hypothermia (low-temperature risk) based on user input such as body parameters, environmental conditions, and sleeping bag insulation.
The app provides real-time visualization, history management, and weather auto-fetching from Taiwan CWA (Central Weather Administration) API.
- Input personal data (height, weight, shoulder width, etc.)
- Set initial body temperature and environmental conditions
- Sleeping bag thickness and thermal conductivity parameters
- Automatic weather fetching via geolocation + Taiwan CWA API
- Real-time prediction chart (powered by Chart.js)
- Safety summary with visual feedback (happy/sad face icons)
- History tracking with options to export CSV or share results
- Theme customization and personal data presets
- Multi-language support (Chinese & English)
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Visualization: Chart.js + chartjs-plugin-annotation
- APIs: Taiwan Central Weather Administration Open Data API
- Storage: LocalStorage for history & settings persistence
├── hypothermia.html # Main HTML file
├── hypothermia.css # Styling (responsive & modern UI)
├── hypothermia.js # App logic (input handling, prediction, chart, history)
├── requirements.txt # Python dependencies (optional for server hosting)
└── README.md # Project documentation
Dependencies are loaded via CDN, but for development and deployment, use the following:
- Chart.js (v4.4.1)
- chartjs-plugin-annotation (v1.4.0)
- A modern browser with JavaScript enabled
-
Clone this repository:
git clone https://github.com/your-username/hypothermia-app.git cd hypothermia-app -
Install dependencies (optional if using CDN):
pip install -r requirements.txt
-
Open
hypothermia.htmlin your browser, or host it with a simple local server:python -m http.server 8080
-
Navigate to:
http://localhost:8080/hypothermia.html
- Input:
- Height: 170 cm
- Weight: 65 kg
- Environment Temp: -5°C
- Wind Speed: 3 m/s
- Output: Prediction chart + safety summary (e.g., "Hypothermia may occur after 3.5 hours").
- Jonathan Peng
© 2025