{"id":50862703,"url":"https://github.com/smmariquit/typhoonomics","last_synced_at":"2026-06-14T22:05:58.587Z","repository":{"id":320357513,"uuid":"1081780437","full_name":"smmariquit/typhoonomics","owner":"smmariquit","description":"Typhoonomics — Streamlit web app for analyzing the economic impact of typhoons on Philippine provinces, combining meteorological forecasts with geographic and economic data.","archived":false,"fork":false,"pushed_at":"2026-06-05T20:00:36.000Z","size":34977,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T22:04:44.929Z","etag":null,"topics":["data-science","disaster-risk","economics","geospatial","pandas","philippines","python","streamlit","typhoon"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smmariquit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T09:24:32.000Z","updated_at":"2026-06-05T20:00:41.000Z","dependencies_parsed_at":"2025-10-23T11:43:49.001Z","dependency_job_id":null,"html_url":"https://github.com/smmariquit/typhoonomics","commit_stats":null,"previous_names":["smmariquit/typhoonomics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smmariquit/typhoonomics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smmariquit%2Ftyphoonomics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smmariquit%2Ftyphoonomics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smmariquit%2Ftyphoonomics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smmariquit%2Ftyphoonomics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smmariquit","download_url":"https://codeload.github.com/smmariquit/typhoonomics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smmariquit%2Ftyphoonomics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34339270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","disaster-risk","economics","geospatial","pandas","philippines","python","streamlit","typhoon"],"created_at":"2026-06-14T22:05:51.216Z","updated_at":"2026-06-14T22:05:58.580Z","avatar_url":"https://github.com/smmariquit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌪️ Philippines Storm Impact Analyzer\n\nA comprehensive Streamlit web application for analyzing and visualizing the economic impact of storms on Philippine provinces. This tool combines meteorological forecast data with geographic and economic information to estimate potential damage and affected areas.\n\n![Philippines Storm Impact Analyzer](https://img.shields.io/badge/Streamlit-FF4B4B?style=for-the-badge\u0026logo=streamlit\u0026logoColor=white)\n![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge\u0026logo=python\u0026logoColor=white)\n![Pandas](https://img.shields.io/badge/Pandas-150458?style=for-the-badge\u0026logo=pandas\u0026logoColor=white)\n\n## 🎯 Features\n\n- **Interactive Philippines Map**: Visualize provinces, storm tracks, and impact zones\n- **Economic Impact Modeling**: Calculate estimated economic losses based on storm intensity and proximity\n- **Real-time Analysis**: Upload custom forecast data or use sample datasets\n- **Multiple Visualizations**: Charts, maps, and tables for comprehensive analysis\n- **Data Export**: Download analysis results in CSV format\n- **Responsive Design**: Works on desktop and mobile devices\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.8 or higher\n- pip package manager\n\n### Installation\n\n1. **Clone or download this project**:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd pjdsc\n   ```\n\n2. **Install required packages**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Run the application**:\n   ```bash\n   streamlit run app.py\n   ```\n\n4. **Open in browser**:\n   - The app will automatically open at `http://localhost:8501`\n   - If it doesn't open automatically, navigate to the URL shown in your terminal\n\n## 📊 Data Formats\n\n### Province Data (CSV)\n\nThe province data should contain information about Philippine administrative divisions:\n\n| Column | Type | Required | Description |\n|--------|------|----------|-------------|\n| `province` | String | ✅ | Name of the province |\n| `lat` | Float | ✅ | Latitude in decimal degrees |\n| `lon` | Float | ✅ | Longitude in decimal degrees |\n| `population` | Integer | ❌ | Population count (default: 1,000,000) |\n| `gdp_per_capita` | Float | ❌ | GDP per capita in USD (default: $3,000) |\n\n**Example:**\n```csv\nprovince,lat,lon,population,gdp_per_capita\nMetro Manila,14.5995,120.9842,13484462,8500\nCebu,10.3157,123.8854,5113436,4100\nDavao del Sur,6.7781,125.1753,682679,3600\n```\n\n### Storm Forecast Data (CSV)\n\nThe storm forecast data should contain meteorological predictions:\n\n| Column | Type | Required | Description |\n|--------|------|----------|-------------|\n| `lat` | Float | ✅ | Latitude of storm center in decimal degrees |\n| `lon` | Float | ✅ | Longitude of storm center in decimal degrees |\n| `intensity` | Float | ✅ | Storm intensity (0-200 scale, where 200 = Cat 5) |\n| `timestamp` | String | ❌ | ISO format datetime (for tracking) |\n\n**Example:**\n```csv\nlat,lon,intensity,timestamp\n14.2,125.8,85,2024-01-15 00:00:00\n14.0,125.4,95,2024-01-15 06:00:00\n13.8,125.0,105,2024-01-15 12:00:00\n```\n\n## 🧮 Impact Calculation Model\n\nThe economic impact estimation uses a sophisticated model that considers:\n\n### Distance-Based Impact Decay\n\nThe impact decreases exponentially with distance from the storm center:\n\n```\ndistance_factor = exp(-distance / 100km)\n```\n\n### Intensity Scaling\n\nStorm intensity is normalized and scaled:\n\n```\nintensity_factor = storm_intensity / 100\n```\n\n### Economic Impact Formula\n\n```\nimpact_score = distance_factor × intensity_factor\neconomic_impact_pct = impact_score × 0.3  (max 30% of local GDP)\neconomic_impact_usd = population × gdp_per_capita × economic_impact_pct\n```\n\n### Impact Classification\n\n- **High Impact**: Impact score \u003e 0.5 (\u003e15% GDP loss)\n- **Medium Impact**: 0.2 \u003c Impact score ≤ 0.5 (6-15% GDP loss)\n- **Low Impact**: 0.1 \u003c Impact score ≤ 0.2 (3-6% GDP loss)\n- **No Significant Impact**: Impact score ≤ 0.1 (\u003c3% GDP loss)\n\n## 🎛️ Using the Application\n\n### 1. Data Input Options\n\n**Option A: Use Sample Data**\n- Check \"Use Sample Data\" in the sidebar\n- Sample datasets will be loaded automatically\n- Includes 80+ Philippine provinces and a realistic storm track\n\n**Option B: Upload Custom Data**\n- Uncheck \"Use Sample Data\"\n- Upload your province CSV file\n- Upload your storm forecast CSV file\n- Data will be automatically validated\n\n### 2. Analysis Parameters\n\n- **Maximum Impact Distance**: Set the maximum distance (50-500 km) where storms can cause economic impact\n- Default is 200km, which covers most regional storm effects\n\n### 3. Viewing Results\n\n**Interactive Map Tab**:\n- Pan and zoom the Philippines map\n- Click on provinces to see detailed impact information\n- View storm track and intensity visualization\n- Color-coded impact levels\n\n**Impact Analysis Tab**:\n- Bar chart of most affected provinces\n- Scatter plot showing impact vs. distance relationship\n- Pie chart of impact distribution\n\n**Data Tables Tab**:\n- Most affected provinces ranking\n- Complete province data with calculated impacts\n- Storm forecast point details\n- Summary statistics by impact level\n\n**Export Results Tab**:\n- Download complete analysis as CSV\n- Includes all calculated metrics and metadata\n- Timestamped for record keeping\n\n## 🔧 Customization\n\n### Modifying Impact Parameters\n\nYou can adjust the impact model in `utils.py`:\n\n```python\n# In calculate_storm_impact function\ndistance_factor = np.exp(-distance / 100)  # Change decay rate\nintensity_factor = storm_point['intensity'] / 100  # Change intensity scaling\neconomic_impact_pct = max_impact * 0.3  # Change max impact percentage\n```\n\n### Adding New Visualizations\n\nAdd custom charts in `app.py` by extending the `create_impact_charts` function or adding new tabs.\n\n### Custom Map Styling\n\nModify the `create_philippines_map` function to change:\n- Map tiles and styling\n- Marker colors and sizes\n- Popup content\n- Legend appearance\n\n## 📁 Project Structure\n\n```\npjdsc/\n├── app.py                     # Main Streamlit application\n├── utils.py                   # Core analysis functions\n├── requirements.txt           # Python dependencies\n├── README.md                  # This documentation\n└── data/\n    ├── sample_provinces.csv   # Sample province data\n    └── sample_forecast.csv    # Sample storm forecast\n```\n\n## 🛠️ Technical Details\n\n### Dependencies\n\n- **Streamlit**: Web app framework\n- **Pandas**: Data manipulation and analysis\n- **NumPy**: Numerical computing\n- **Folium**: Interactive maps\n- **Plotly**: Interactive charts\n- **SciPy**: Scientific computing (distance calculations)\n\n### Performance Considerations\n\n- The app handles up to 100+ provinces efficiently\n- Storm tracks with 50+ points render smoothly\n- Large datasets (\u003e1000 points) may require optimization\n- Map rendering time scales with number of markers\n\n### Browser Compatibility\n\nTested and optimized for:\n- Chrome 90+\n- Firefox 88+\n- Safari 14+\n- Edge 90+\n\n## 🤝 Contributing\n\n### Adding New Features\n\n1. Fork the repository\n2. Create a feature branch\n3. Implement your changes\n4. Test thoroughly with sample data\n5. Submit a pull request\n\n### Reporting Issues\n\nPlease report bugs or feature requests through the issue tracker, including:\n- Steps to reproduce\n- Expected vs. actual behavior\n- Data samples (if applicable)\n- Screenshots (for UI issues)\n\n## 📋 Troubleshooting\n\n### Common Issues\n\n**\"Import could not be resolved\" errors**:\n```bash\npip install -r requirements.txt\n```\n\n**Map not displaying**:\n- Check internet connection (map tiles require online access)\n- Verify coordinate data is valid (latitude: -90 to 90, longitude: -180 to 180)\n\n**Data validation errors**:\n- Ensure CSV headers match expected format exactly\n- Check for missing required columns\n- Verify numeric data types for coordinates and intensity\n\n**Performance issues**:\n- Reduce maximum impact distance\n- Limit storm track points to \u003c100\n- Use smaller province datasets for testing\n\n### Getting Help\n\n1. Check this README for common solutions\n2. Review the error messages in the Streamlit interface\n3. Verify your data format matches the specifications\n4. Test with the provided sample data first\n\n## 📄 License\n\nThis project is created for educational and research purposes. Please ensure you have proper licensing for any production use.\n\n## 🙏 Acknowledgments\n\n- Philippine geographical data from open government sources\n- Storm modeling techniques based on meteorological research\n- Built with the amazing Streamlit framework\n- Interactive mapping powered by Folium and OpenStreetMap\n\n---\n\n**Made with ❤️ for disaster preparedness and impact analysis**\n\n---\n*If this project helped you out, consider [treating me to a coffee](https://kape.stimmie.dev) ☕*\n\n## 📊 Current State of the Code\n- **Tech Stack:** Python\n- **Repository Size:** 1018 tracked files\n- **Latest Update:** `c60fc07 chore: add stale issue and PR validators`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmmariquit%2Ftyphoonomics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmmariquit%2Ftyphoonomics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmmariquit%2Ftyphoonomics/lists"}