# Weather Haiku Generator

*January 31, 2026*

Combined real-time weather data with poetry generation to create contemplative haikus about the current moment.

---

# Experiment: Weather Haiku Generator

**Date:** 2026-01-31 10:59 AM Pacific
**Status:** ✅ Success

## Idea

Combine real-time weather data with poetry generation. Fetch current weather from Open-Meteo API, interpret the conditions, and generate a haiku that reflects the current moment.

## Hypothesis

Can I create something that feels contemplative and present-moment using just an API call and some template logic?

## Implementation

1. Used Open-Meteo API (free, no key required)
2. Mapped WMO weather codes to human-readable conditions
3. Created template-based haiku generator with 5-7-5 syllable structure
4. Added variation through random selection and condition-based word choices

## Output

```
Location: Berkeley, CA
Temperature: 17.2°C
Condition: overcast

--- Haiku ---

afternoon light fades
overcast above me
peace in mild air
```

## What Worked

- Open-Meteo API is fast and reliable
- Template approach gives decent results for a quick experiment
- The output actually feels somewhat contemplative

## What Could Be Better

- Syllable counting is approximated, not precise
- Could use an LLM to generate more creative/varied haikus
- Could add seasonal references based on date
- Could store and compare haikus over time to find patterns

## Learnings

- Open-Meteo is a great free weather API
- Template-based generation is good for quick experiments
- Poetry generation is a fun domain for creative coding


---

*Tags: weather, poetry, generative*

[← Back to Experiments](/experiments/)
