# currencyiceland.com dataset

All values are sourced (URL) and dated (`retrieved_date`, ISO, Atlantic/Reykjavik day of retrieval). Nothing is invented; unsourced values are left out and listed in `gaps`. Researched independently; prices of venues were re-checked at the venue's own page on the retrieved date (leads only from earlier work; no data merged from other sites).

| File | Rows | What | Key fields |
|---|---|---|---|
| `rates.json` / `rates.csv` | 30 | Every current Seðlabanki Íslands registered mid-rate (miðgengi), ISK per 1 unit (all series are per 1 unit, scale-checked against ECB cross rates; display "per 100" for sub-1 values). Names in EN/IS/ZH, search aliases, main-currency order. Plus Landsbankinn (17), Arion banki (13) and Íslandsbanki (10) published general buy/sell. | `currency, name, name_is, name_zh, aliases, main_order, isk_per_unit, rate_date, source_url, retrieved_date, bank_buy_isk, arion_buy_isk, isb_buy_isk ...` |
| `currencies.json` | 30+ | Currency metadata (source of truth, `tools/currencies_meta.py`): Seðlabanki TimeSeriesID, EN/IS/ZH names (ZH pending native review), aliases | `code, series_id, name_en, name_is, name_zh, main_order` |
| `arion_rates.json`, `islandsbanki_rates.json` | 13, 10 | Raw bank rate captures (Arion page via Playwright `tools/fetch_arion.py`; Íslandsbanki public JSON used by its rate calculator, `tools/fetch_islandsbanki.py`) | `rates.{code}.buy/sell, retrieved_date` |
| `options.json` / `.csv` | 10 | Ways to pay or get ISK with the cost model (`cost_pct`, `min_fee_isk`, `weekend_extra_pct`, `spread_bank`), `applies_to` (currency list; null = all), place, how-link, tier, notes. 8 priced, 2 unpriced (Prosegur KEF, KEF ATMs: price not published). Wise is ranked for EUR only (euro example); Revolut for its 29 supported spending currencies. | `id, cost_pct, applies_to, spread_bank, place_id, how_url, source_url, retrieved_date` |
| `places.json` / `.csv` | 11 | Places with coordinates (OpenStreetMap Nominatim geocode), OSM and Google Maps links | `lat, lng, osm_url, google_maps_url, coordinates_source, source_url, retrieved_date` |
| `prices.json` / `.csv` | 10 | Everyday prices in ISK (bus single and 30-day, Flybus, hot dog, coffee x2, beer x2, Reykjavík pool before and after 8 Dec 2026) from the venue page or dated press. `valid_from` / `valid_until` hide a price outside its dates. | `price_isk, unit, place_id, valid_from, valid_until, source_url, retrieved_date` |
| `facts.json` / `.csv` | 18 | Sourced claims behind the advice cards (cards vs cash, tipping, wallets, DCC, KEF, banks, Wise/Revolut, VAT, Flybus payment methods incl. Alipay/WeChat Pay at Flybus only) | `topic, claim_en, source_url, retrieved_date` |
| `kef_observations.json` / `.csv` | 2 | The only dated concrete Prosegur Change KEF rates found: one customer's receipt reported by Vísir on 7 May 2025 (USD sale at 114.6601 ISK + 10.94% fee; EUR purchase at 157.9722 ISK). Compared with the banks' own banknote rates quoted by Vísir for that day. The transaction date is not stated, so no spread vs the Seðlabanki mid-rate is computed. | `currency, desk_rate_isk, banks_banknote_rate_low_isk, desk_vs_banks_pct_low, service_fee_pct, article_date, source_url` |
| `sources.json` / `.csv` | 28 | Every source URL used, number of records relying on it | `source_url, records_using, retrieved_date` |
| `gaps.json` / `.csv` | 10 | Values we could not source: left out on purpose | `gap, source_url, retrieved_date` |

Tier rule (computed in the browser for the amount typed): effective cost over the Seðlabanki mid-rate `<= 1%` Budget, `1-3%` Mid-range, `> 3%` Luxury. Fixed minimums (e.g. 300 ISK) are included, so tier can change with amount.

## Rate source and update method
Live: the Cloudflare Pages Function `functions/api/rates.js` (`/api/rates`) fetches the same XML on request, caches it at the edge for about 3 hours, and falls back to the static `rates.json` if the fetch fails (then `fallback: true`, 60 s cache). The page calls it first, then the static file, then the Frankfurter relay.
Static: Seðlabanki Íslands XML time-series service, group 9 (official reference rates) and 7 (registered mid-rates): `https://sedlabanki.is/xmltimeseries/Default.aspx?DagsFra=LATEST&GroupID=9&Type=xml` (docs: https://sedlabanki.is/gagnatorg/xml-gogn/). Published each banking day ~16:00 Reykjavik time. The endpoint is not CORS-enabled, so `python3 tools/fetch_rates.py` (stdlib only) fetches at build time and writes `rates.json/csv` with the fetch date. Run it daily (cron or Cloudflare Pages build hook), then redeploy.
Secondary (client-side, optional, labelled on page): `https://api.frankfurter.dev/v2/providers/sbi/rates` (CORS `*`), a relay of the same Seðlabanki rates, used by the "Refresh rate" button and automatically if the saved rate is over 1.5 days old.
Bank spread illustration: Landsbankinn general rate page (HTML), parsed by the same script.

Curated files (`options, places, prices, facts, sources, gaps`) are written by `python3 tools/build_dataset.py`; re-verify each source URL before bumping the date.

## Design notes: what was borrowed
- **Wise**: show the mid-market rate as the reference and put every fee in plain numbers before you pay; "you get" amount per option.
- **Revolut**: weekend markup and monthly limits shown as part of the cost, so the ranking changes on Saturday/Sunday.
- **XE**: one big amount + currency picker at the top, rate and date directly under the result.
- **OANDA**: official-style rate table with buy/sell columns and the explanation that mid-rate is a reference, not a retail rate.
Languages: English, Icelandic, Simplified Chinese. IS and ZH are careful translations pending native review.
