← back to projects

~/projects $ cat visit-widget-japan 🇯🇵

travel widgets for a 2024 trip to japan · repo

## currency converter

USD ↔ JPY at the latest published daily rate, plus a 30-day chart so you can eyeball the trend before you swipe a card. Originally hit ExchangeRate-API with a checked-in key; this rebuild uses the fawazahmed currency API on jsDelivr — free, keyless, and CDN-cached.

enter an amount and hit convert.
30-day usd→jpy
data: cdn.jsdelivr.net/npm/@fawazahmed0/currency-api · daily rates

## english ⇄ japanese translator

Quick-and-dirty machine translation through MyMemory's public endpoint. Direction auto-detects from which box you typed in. Romaji shows up underneath when translating to Japanese, so you can actually read it out loud at a counter.

enter text in either box.
data: api.mymemory.translated.net · ~5k chars/day per ip

## weather — major cities

Current conditions and a high/low for today across the four cities the original repo tracked. Originally embedded the OpenWeatherMap widget with an exposed appid; this rebuild uses Open-Meteo, which is free and needs no key.

Tokyo
東京
loading…
Kyoto
京都
loading…
Hiroshima
広島
loading…
Sendai
仙台
loading…
data: api.open-meteo.com · imperial units

## retrospective

The original was three separate HTML files, three separate API keys hardcoded in JS, and a "historical rates" chart that was actually five numbers I made up so the line would render. It did the job — I used the converter every day in Tokyo. But pushing it to GitHub with live keys in plaintext was the kind of thing you only do once before you learn. This rebuild is the version I'd put up if I were starting over: one page, keyless endpoints, real historical data, and an honest disclaimer on the rates.