# ⚡ Quick Adjustment Cheat Sheet

## 🎯 "I want to..."

### Change Who Gets Unfavorited (Easiest - Free)

**Edit:** `config.json`

**No re-analysis needed!** Just change thresholds:

```json
{
  "overall_score": 0.0,     // ← Change this number
  "market_garden": 3,        // ← Or these numbers
  "guest_accommodation": 3,
  "workshop": 2,
  "rental_units": 3,
  "location": 3,
  "local_market": 3,
  "max_risk": "Gemiddeld"   // ← Or this: Laag/Gemiddeld/Hoog
}
```

**Test first:**
```bash
/usr/bin/python3 smart_unfavorite.py --dry-run
```

---

### Make One Criterion More Important

**Edit:** `analyze_from_urls.py` (lines 49-56)

**Requires re-analysis** ($3-5):

```python
criteria_weights = {
    "regeneratieve market garden": 4.0,  # ← Double it!
    "gastenverblijf": 2.5,
    "werkplaats": 2.0,
    "zelfstandige verhuureenheden": 1.5,
    "locatie": 3.0,
    "afstand tot lokale markt": 1.5
}
```

**Then run:**
```bash
/usr/bin/python3 analyze_from_urls.py
/usr/bin/python3 parse_criteria.py
```

---

### Change What GPT Evaluates

**Edit:** `prompt.txt`

**Requires re-analysis** ($3-5):

Add or modify criteria descriptions. Example:

**Add new criterion:**
```
7. Duurzaamheid – zonnepanelen, isolatie, energielabel.
```

**Make existing stricter:**
```
1. Regeneratieve market garden – MOET minimaal 5000m² zijn, perfecte bodem.
```

**Then run:**
```bash
/usr/bin/python3 analyze_from_urls.py
/usr/bin/python3 parse_criteria.py
```

---

## 🎚️ Common Scenarios

### "Keep only the absolute best"

**config.json:**
```json
{
  "overall_score": 1.5,
  "market_garden": 4,
  "guest_accommodation": 4,
  "workshop": 3,
  "rental_units": 4,
  "location": 4,
  "local_market": 4,
  "max_risk": "Laag",
  "require_all": false
}
```

---

### "I only care about farming, not hospitality"

**config.json:**
```json
{
  "overall_score": 0.5,
  "market_garden": 4,
  "guest_accommodation": 1,
  "workshop": 3,
  "rental_units": 1,
  "location": 3,
  "local_market": 3,
  "max_risk": "Gemiddeld",
  "require_all": false
}
```

---

### "No high-risk properties allowed"

**config.json:**
```json
{
  "overall_score": 0.0,
  "market_garden": 3,
  "guest_accommodation": 3,
  "workshop": 2,
  "rental_units": 3,
  "location": 3,
  "local_market": 3,
  "max_risk": "Laag",  // ← Change here
  "require_all": false
}
```

---

### "Property must be good at EVERYTHING"

**config.json:**
```json
{
  "overall_score": 1.0,
  "market_garden": 3,
  "guest_accommodation": 3,
  "workshop": 3,
  "rental_units": 3,
  "location": 3,
  "local_market": 3,
  "max_risk": "Gemiddeld",
  "require_all": true  // ← Change to true
}
```

---

## 📊 Understanding Current Scores

### Check what you have:

```bash
cd scraper
/usr/bin/python3 parse_criteria.py
```

Shows:
```
📊 Criteria Coverage:
  market_garden: 174/186 properties (avg: 3.60)
  guest_accommodation: 174/186 properties (avg: 4.05)  ← Highest!
  workshop: 174/186 properties (avg: 2.56)             ← Lowest
  rental_units: 174/186 properties (avg: 3.48)
  location: 174/186 properties (avg: 3.09)
  local_market: 174/186 properties (avg: 3.71)
```

**Insights:**
- Setting `workshop: 3` keeps 50% of properties
- Setting `guest_accommodation: 4` keeps 50% of properties
- Setting all to `4` is VERY strict

---

## 🧪 Testing Changes

### Step 1: Preview current situation
```bash
/usr/bin/python3 smart_unfavorite.py --overall-score 0 --dry-run
```

### Step 2: Edit config.json with new thresholds

### Step 3: Preview again
```bash
/usr/bin/python3 smart_unfavorite.py --dry-run
```

### Step 4: If happy, execute
```bash
/usr/bin/python3 smart_unfavorite.py
```

---

## 🎯 Web Interface Quick Guide

**URL:** http://localhost:8000/map_viewer_advanced.html

**What each slider does:**

| Slider | Effect |
|--------|--------|
| Market Garden 1→5 | Hides properties with lower farming score |
| Guest 1→5 | Hides properties with lower hospitality score |
| Workshop 1→5 | Hides properties with poor workshop facilities |
| Rental Units 1→5 | Hides properties with poor rental potential |
| Location 1→5 | Hides properties in poor locations |
| Local Market 1→5 | Hides properties far from markets |
| Overall Score -5→+5 | Hides properties below this weighted score |

**Risk checkboxes:**
- Uncheck "Medium" = Only show Low risk properties
- Uncheck "High" = Hide all High risk properties

**Export button:**
- "Export Filtered for Unfavorite" = Download list of properties that DON'T meet your current filter settings

---

## 🔄 Quick Workflow

```bash
# 1. Adjust thresholds in config.json or web interface
# 2. Preview what would be removed
/usr/bin/python3 smart_unfavorite.py --dry-run

# 3. If happy, execute
/usr/bin/python3 smart_unfavorite.py

# 4. Or run full automation
./auto_clean.sh
```

---

## 💡 Pro Tips

1. **Start lenient**, increase strictness gradually
2. **Use dry-run** before every unfavorite operation
3. **Check averages** in parse_criteria.py output to set realistic thresholds
4. **Use web interface** to visually explore before committing
5. **Backup CSV files** before major changes
6. **Test with different require_all** settings (true vs false)

---

## 📞 Files Quick Reference

| Task | File | Re-analysis Needed? |
|------|------|---------------------|
| Change filter thresholds | `config.json` | ❌ No (Free) |
| Change criterion weights | `analyze_from_urls.py` | ✅ Yes ($3-5) |
| Change evaluation criteria | `prompt.txt` | ✅ Yes ($3-5) |
| Change score penalties | `analyze_from_urls.py` | ✅ Yes ($3-5) |
| Add visual filters | `map_viewer_advanced.html` | ❌ No (Free) |

---

## 🆘 Troubleshooting

**"Too many properties being unfavorited"**
→ Lower thresholds in config.json

**"Not enough properties being unfavorited"**
→ Raise thresholds in config.json or set `require_all: true`

**"I want different evaluation criteria"**
→ Edit prompt.txt and re-analyze ($3-5)

**"One criterion matters way more than others"**
→ Edit weights in analyze_from_urls.py and re-analyze ($3-5)

**"I want to see the impact before deciding"**
→ Use dry-run mode:
```bash
/usr/bin/python3 smart_unfavorite.py --dry-run
```

---

**Full guides available:**
- [CRITERIA_CUSTOMIZATION_GUIDE.md](CRITERIA_CUSTOMIZATION_GUIDE.md) - Complete customization guide
- [SCORING_FLOW.md](SCORING_FLOW.md) - Visual scoring explanation
- [AUTOMATION_GUIDE.md](AUTOMATION_GUIDE.md) - Automation details
