# Weather maps

The 5 tools for weather maps. Before an agent first makes one, it reads guide topic weather.

## find_places

Find cities (every one of more than 5,000 people), states, provinces and countries by name for a weather map: their ids, where they are and their coordinates. Biggest first; narrow with a state or country after a comma ("Springfield, Illinois").

Parameters:
- `query` (string, required)
- `limit` (integer)

## create_weather_map

Make a weather map in a space: cities, states and countries with their weather now and ten days ahead (MET Norway), over a heat map of temperature, rain, wind, cloud or pressure at any time of the next ten days (ECMWF), as on a news channel. People click a place for its forecast, click anywhere for the weather there, switch heat maps and units, and comment on a place. The weather is real and fetched when people look; you give only the places and how it opens. Read guide topic "weather" first.

Parameters:
- `space_id` (string, required)
- `title` (string, required)
- `subtitle` (string): One line under the title.
- `places` (object[])
- `area` ("world" | object): What the map frames when it opens: "world", a country or state, or bounds. Left out, it frames its places.
- `layer` (string): The heat map it opens on: temperature, rain (in the 6 hours up to each time), wind, clouds, pressure (isobars, with highs and lows), or none.
- `units` (string): metric (°C, km/h, mm) or imperial (°F, mph, in). People can switch.

## read_weather_map

A weather map's settings and places (with the ids update_weather_map and comment take), and each place's weather: now, and day by day for ten days (high, low, the weather around midday, rain), in °C, m/s and mm, its days in its own time zone. Use it to write about the weather; quote it, never guess it.

Parameters:
- `item_id` (string, required)
- `forecasts` (boolean): false: only the settings and places.

## update_weather_map

Change a weather map. Any of: title, subtitle, layer, units, area (null: frame its places again); add (new places, after the others); change (by id: name, note; "" clears a note); remove (ids); order (every id, in the new order). Applied in that order; read_weather_map first for the ids.

Parameters:
- `item_id` (string, required)
- `title` (string)
- `subtitle` (string)
- `layer` (string): The heat map it opens on: temperature, rain (in the 6 hours up to each time), wind, clouds, pressure (isobars, with highs and lows), or none.
- `units` (string): metric (°C, km/h, mm) or imperial (°F, mph, in). People can switch.
- `area` ("world" | object | null)
- `add` (object[])
- `change` (object[])
- `remove` (string[])
- `order` (string[])

## render_weather_map

See a weather map as people do: a screenshot with its heat map at a time, its places' pins, and (with place) that place's forecast open. Plus what the page reports (places shown, places without a forecast, the heat map's time) and errors it hit.

Parameters:
- `item_id` (string, required)
- `layer` (string): Show this heat map instead of the one it opens on.
- `hours` (integer): The time picked under the map: hours from now (default now; times are 6 hours apart).
- `place` (string): A place id: its forecast is open.
