> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metar.ws/llms.txt
> Use this file to discover all available pages before exploring further.

# Best Practices

> A checklist of practical tips gathered from across this reference for building a reliable client.

This page collects the practical advice scattered across the rest of the reference into a single checklist.

<AccordionGroup>
  <Accordion title="Treat temperatures and coordinates as decimal strings">
    `temp_c`, `dewp_c`, and the decimal fields on forecast events are sent as strings on purpose. Parse them with a decimal type rather than a float, so precision survives.
  </Accordion>

  <Accordion title="Deduplicate D-ATIS and METAR by station and report_time">
    If you subscribe to both `metar.atis.<icao>` and `metar.obs.<icao>` for the same station, the same observation will arrive twice. Use the pair (`station`, `report_time`) as your dedup key.
  </Accordion>

  <Accordion title="Filter incomplete forecast days before aggregating">
    Until `local_day_complete` is `true`, a forecast's `temp_max_c` and `temp_min_c` only reflect the hours received so far. Mixing incomplete days into an accuracy comparison biases it in one direction, so filter them out first.
  </Accordion>

  <Accordion title="It's safe to probe for a station">
    Subscribing to a channel that doesn't exist yet fails with `channel_format` rather than closing your connection, so you can safely try a station before you know it is covered.
  </Accordion>

  <Accordion title="Spread channels across connections deliberately">
    Channel limits are counted per account, not per connection. Opening a second connection doesn't buy you more channels, only more delivery paths for the same budget.
  </Accordion>

  <Accordion title="Build one reconnect loop and reuse it">
    Every example on this site reconnects on close with a short delay and re-subscribes afterward. Last-value replay means you're current again immediately, so there's no extra state to restore.
  </Accordion>
</AccordionGroup>

<Card title="Next: FAQ" icon="circle-question" href="/faq">
  Quick answers to common integration questions.
</Card>
