Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌎 ClimateCheck β€” Property Climate Risk Scorer

A web app that scores any property's flood and wildfire risk using real climate data APIs and AI-generated explanations.


πŸ—‚οΈ File Structure

IRVINEHACKS-PROJECT/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py            ← Nivedha (Melissa) + Sristi (FEMA/CalFire)
β”‚   β”œβ”€β”€ risk_scorer.py     ← You β€” scoring formula
β”‚   β”œβ”€β”€ ai_service.py      ← Cathryn β€” Gemini AI
β”‚   β”œβ”€β”€ .env               ← API keys β€” YOU MUST CREATE THIS (not in repo)
β”‚   └── requirements.txt
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ style.css
β”‚   └── app.js
└── .gitignore

πŸ‘₯ Who Works On What

Person File Task
You risk_scorer.py Converts raw zone data into 0-100 risk scores
Nivedha main.py β†’ geocode() Melissa API β€” address to lat/lng
Sristi main.py β†’ get_flood_zone() + get_calfire_zone() FEMA + CalFire API calls
Cathryn ai_service.py Gemini AI β€” explanation, probabilities, recommendations

βš™οΈ Setup After Cloning

1. Clone the repo

git clone https://github.com/your-org/your-repo.git
cd your-repo

2. Set up the Python environment

cd backend
python -m venv venv

Activate it:

  • Mac/Linux: source venv/bin/activate
  • Windows: venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Create your .env file

Inside /backend, create a file called .env:

MELISSA_KEY=get_this_from_team
GEMINI_KEY=get_your_own_free_key

πŸ”‘ Gemini key (Cathryn): get it free at https://aistudio.google.com β†’ "Get API Key"

πŸ”‘ Melissa key: get it from your teammate, everyone shares one

5. Run the backend

uvicorn main:app --reload

Test at http://localhost:8000 β€” should see {"message": "ClimateCheck API is running!"}

6. Test the full risk endpoint

http://localhost:8000/risk?address=123 Main St, Irvine CA

7. Open the frontend

Just open frontend/index.html directly in your browser. No extra server needed.


πŸ§ͺ How to Test Your Piece Independently

You (risk_scorer.py):

python risk_scorer.py
# should print {"flood": 90, "fire": 90, "overall": 90}

Cathryn (ai_service.py):

python ai_service.py
# should print a JSON with explanation, recommendations, probabilities

Nivedha + Sristi (main.py functions): Run the server and hit the /risk endpoint in your browser.


🌿 Git Workflow

Work on your own branch β€” never commit directly to main:

git checkout -b feature/your-name-task
# do your work...
git add .
git commit -m "describe what you did"
git push origin feature/your-name-task
# open a Pull Request on GitHub to merge into main

⚠️ Important Notes

  • Never commit .env β€” share keys over Discord/text
  • Always activate venv before running anything: source venv/bin/activate
  • Backend runs on port 8000, frontend is just a static HTML file
  • If you get a CORS error, make sure the backend server is running first

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages