https://github.com/masa0902dev/openweather-moc
https://github.com/masa0902dev/openweather-moc
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/masa0902dev/openweather-moc
- Owner: masa0902dev
- Created: 2024-07-27T07:59:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-19T09:57:41.000Z (over 1 year ago)
- Last Synced: 2025-08-14T19:39:03.341Z (10 months ago)
- Language: TypeScript
- Size: 77.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OLD
# openweather-moc
lat, lon
https://openweathermap.org/api/geocoding-api
one call api3.0
https://openweathermap.org/api/one-call-3#history_daily_aggregation
### Daily Aggregation
これで可能:今年1年の実測気温、1週間の予報気温
## file
- fetch_temperature.mjs:
福島市だけ例外処理した。すでに47都道府県で正常動作を確認(location_jpの正しい日本語表記を確認)。
全て県庁所在地で取得している。Aichi-kenではなくNagoya、TokyoではなくShinjuku。
- module.js:
- readAllLineAnyOneColCSV()追加、最下部のexportにも書き加える
- appendCSV()の無駄なifを削除。appendFileSyncは新規作成も自分でやってくれる。
- csv_list.csv: すでに47都道府県
- .env: APIキーは本番用に書き換えること。
## ESmodule VS CommonJS
- 可能:ESmoduleファイルからCommonJSファイルを参照
- 不可能:CommonJSからESmodule
- 折衷案:ESmoduleを中間モジュールを使用してCommonJSで読みこむ(今回は必要ない)