最初に
個人メモなので、無保証で^^;
こちらの方が体系的にまとめていらっしゃいますので参考にさせていただいていますm(_ _)m → https://qiita.com/e_toyoda/items/7a293313a725c4d306c0
ナウキャストや気象衛星ひまわりの画像タイルを表示する場合は、 https://qiita.com/michan06/items/34759cc714731f4b0a9a を参照。
予報などのエリアコード
データJSON取得URL
構造
centers -> offices -> class10s -> class15s -> class20s
{
"centers": {
"010100": { ... },
"010200": { ... },
"010300": {
"name": "関東甲信地方",
"enName": "Kanto Koshin",
"officeName": "気象庁",
"children": [
"080000",
"090000",
"100000",
"110000",
"120000",
"130000",
"140000",
"190000",
"200000"
]
},
...
},
"offices": {
...
"130000": {
"name": "東京都",
"enName": "Tokyo",
"officeName": "気象庁",
"parent": "010300",
"children": [
"130010",
"130020",
"130030",
"130040"
]
},
...
},
"class10s": {
"130010": {
"name": "東京地方",
"enName": "Tokyo Region",
"parent": "130000",
"children": [
"130011",
"130012",
"130013",
"130014",
"130015"
]
},
...
}
"class15s": {
...
"130012": {
"name": "23区東部",
"enName": "Eastern Region of 23 wards",
"parent": "130010",
"children": [
"1310600",
"1310700",
"1310800",
"1311800",
"1312100",
"1312200",
"1312300"
]
},
...
},
"class20s": {
...
"1310600": {
"name": "台東区",
"enName": "Taito City",
"kana": "たいとうく",
"parent": "130012"
},
"1310700": {
"name": "墨田区",
"enName": "Sumida City",
"kana": "すみだく",
"parent": "130012"
},
"1310800": {
"name": "江東区",
"enName": "Koto City",
"kana": "こうとうく",
"parent": "130012"
},
...
},
}
天気予報(週間予報)
データJSON取得URL
https://www.jma.go.jp/bosai/forecast/data/forecast/{エリアコード(offices)}.json
構造
[
{ "//": "最初の要素は、直近の天気予報",
"publishingOffice": "気象庁",
"reportDatetime": "2021-03-06T17:00:00+09:00",
"timeSeries": [
{ "//": "timeSeriesの最初の要素は、直近の3日間の天気予報",
"timeDefines": [
"2021-03-06T17:00:00+09:00",
"2021-03-07T00:00:00+09:00",
"2021-03-08T00:00:00+09:00"
],
"areas": [
{
"area": {
"name": "東京地方",
"code": "130010"
},
"weatherCodes": [
"111",
"201",
"200"
],
"weathers": [
"晴れ 夜 くもり",
"くもり 昼前 から 夕方 晴れ",
"くもり"
],
"winds": [
"北の風 23区西部 では 北の風 やや強く",
"北東の風 日中 東の風 23区西部 では 北東の風 やや強く",
"北の風 後 東の風"
],
"waves": [
"0.5メートル 後 1メートル",
"1メートル 後 0.5メートル",
"0.5メートル"
]
},
...
]
},
{"//": "timeSeriesの2つ目の要素は、直近の6時間毎の降水確率",
"timeDefines": [
"2021-03-06T18:00:00+09:00",
"2021-03-07T00:00:00+09:00",
"2021-03-07T06:00:00+09:00",
"2021-03-07T12:00:00+09:00",
"2021-03-07T18:00:00+09:00"
],
"areas": [
{
"area": {
"name": "東京地方",
"code": "130010"
},
"pops": [
"20",
"10",
"10",
"10",
"10"
]
},
{
"area": {
"name": "伊豆諸島北部",
"code": "130020"
},
"pops": [
"30",
"30",
"20",
"20",
"20"
]
},
{
"area": {
"name": "伊豆諸島南部",
"code": "130030"
},
"pops": [
"50",
"50",
"30",
"30",
"30"
]
},
{
"area": {
"name": "小笠原諸島",
"code": "130040"
},
"pops": [
"20",
"20",
"20",
"10",
"10"
]
}
]
},
{ "//": "timeSeriesの3つめの要素は、今日、明日の朝の最低気温と日中の最高気温",
"timeDefines": [
"2021-03-07T00:00:00+09:00",
"2021-03-07T09:00:00+09:00"
],
"areas": [
{
"area": {
"name": "東京",
"code": "44132"
},
"temps": [
"4",
"11"
]
},
...
]
}
]
},
{ "//": "配列の2つめの要素は週間予報",
"publishingOffice": "気象庁",
"reportDatetime": "2021-03-06T17:00:00+09:00",
"timeSeries": [
{ "//": "timeSeriesの最初の要素は週間予報(天気、降水確率、信頼度)",
"timeDefines": [
"2021-03-07T00:00:00+09:00",
"2021-03-08T00:00:00+09:00",
"2021-03-09T00:00:00+09:00",
"2021-03-10T00:00:00+09:00",
"2021-03-11T00:00:00+09:00",
"2021-03-12T00:00:00+09:00",
"2021-03-13T00:00:00+09:00"
],
"areas": [
{
"area": {
"name": "東京地方",
"code": "130010"
},
"weatherCodes": [
"201","200","202","200","101","200","200"
],
"pops": [
"","40","50","40","20","40","40"
],
"reliabilities": [
"","","C","C","A","B","C"
]
},
...
]
},
{ "//": "timeSeriesの2つめの要素は週間気温予報(最気温、最低気温の予測下限、上限、最高気温、最高気温の予測下限、上限)",
"timeDefines": [
"2021-03-07T00:00:00+09:00",
"2021-03-08T00:00:00+09:00",
"2021-03-09T00:00:00+09:00",
"2021-03-10T00:00:00+09:00",
"2021-03-11T00:00:00+09:00",
"2021-03-12T00:00:00+09:00",
"2021-03-13T00:00:00+09:00"
],
"areas": [
{
"area": {
"name": "東京",
"code": "44132"
},
"tempsMin": [
"","5","6","6","4","7","7"
],
"tempsMinUpper": [
"","6","8","8","6","9","9"
],
"tempsMinLower": [
"","1","4","3","3","4","5"
],
"tempsMax": [
"","14","13","17","16","16","16"
],
"tempsMaxUpper": [
"","15","16","20","18","19","19"
],
"tempsMaxLower": [
"","8","11","16","13","14","13"
]
},
...
]
}
],
"tempAverage": { "//": "なぜかここに最低、最高気温の「向こう一週間(明日から7日先まで)の平年値」",
"areas": [
{
"area": {
"name": "東京",
"code": "44132"
},
"min": "3.6",
"max": "12.9"
},
]
},
"precipAverage": {"//": "なぜかここに降水量の7日間合計の「向こう一週間(明日から7日先まで)の平年値」",
"areas": [
{
"area": {
"name": "東京",
"code": "44132"
},
"min": "9.9",
"max": "25.8"
},
...
]
}
}
]
weatherCodeについて
weatherCodeについてはこちらの方のtweetを参照ください。
https://twitter.com/izutorishima/status/1364455657169031169?s=20
天気図
人間用URL
天気図画像ファイル名取得用:
{
"near": {
"now": [
"20210221081440_0_Z__C_010000_20210221060000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210221110131_0_Z__C_010000_20210221090000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210221141711_0_Z__C_010000_20210221120000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210221201441_0_Z__C_010000_20210221180000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210221230120_0_Z__C_010000_20210221210000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222021240_0_Z__C_010000_20210222000000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222050940_0_Z__C_010000_20210222030000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222080130_0_Z__C_010000_20210222060000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222110121_0_Z__C_010000_20210222090000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222140300_0_Z__C_010000_20210222120000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222200110_0_Z__C_010000_20210222180000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210222230110_0_Z__C_010000_20210222210000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223020211_0_Z__C_010000_20210223000000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223050100_0_Z__C_010000_20210223030000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223081140_0_Z__C_010000_20210223060000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223110210_0_Z__C_010000_20210223090000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223140440_0_Z__C_010000_20210223120000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223200210_0_Z__C_010000_20210223180000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210223230240_0_Z__C_010000_20210223210000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210224020300_0_Z__C_010000_20210224000000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210224050140_0_Z__C_010000_20210224030000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png",
"20210224080150_0_Z__C_010000_20210224060000_MET_CHT_JCIspas_JCP600x581_JRcolor_Tjmahp_image.png"
],
"ft24": [
"20210224051500_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas24_Rjp_JCP600x581_JRcolor_Tjmahp_image.png"
],
"ft48": [
"20210224065910_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas48_Rjp_JCP600x581_JRcolor_Tjmahp_image.png"
]
},
"near_monochrome": {
"now": [
"20210221081440_0_Z__C_010000_20210221060000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210221110131_0_Z__C_010000_20210221090000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210221141711_0_Z__C_010000_20210221120000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210221201441_0_Z__C_010000_20210221180000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210221230120_0_Z__C_010000_20210221210000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222021240_0_Z__C_010000_20210222000000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222050930_0_Z__C_010000_20210222030000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222080100_0_Z__C_010000_20210222060000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222110120_0_Z__C_010000_20210222090000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222140300_0_Z__C_010000_20210222120000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222200050_0_Z__C_010000_20210222180000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210222230110_0_Z__C_010000_20210222210000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223020210_0_Z__C_010000_20210223000000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223050100_0_Z__C_010000_20210223030000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223081110_0_Z__C_010000_20210223060000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223110130_0_Z__C_010000_20210223090000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223140440_0_Z__C_010000_20210223120000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223200140_0_Z__C_010000_20210223180000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210223230210_0_Z__C_010000_20210223210000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210224020251_0_Z__C_010000_20210224000000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210224050140_0_Z__C_010000_20210224030000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png",
"20210224080130_0_Z__C_010000_20210224060000_MET_CHT_JCIspas_JCP600x581_JRjmahp_image.png"
],
"ft24": [
"20210224051510_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas24_Rjp_JCP600x581_Tjmahp_image.png"
],
"ft48": [
"20210224065930_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas48_Rjp_JCP600x581_Tjmahp_image.png"
]
},
"asia": {
"now": [
"20210221083610_0_Z__C_010000_20210221060000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210221144140_0_Z__C_010000_20210221120000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210221203440_0_Z__C_010000_20210221180000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210222024040_0_Z__C_010000_20210222000000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210222081610_0_Z__C_010000_20210222060000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210222143210_0_Z__C_010000_20210222120000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210222201710_0_Z__C_010000_20210222180000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210223021630_0_Z__C_010000_20210223000000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210223083241_0_Z__C_010000_20210223060000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210223143040_0_Z__C_010000_20210223120000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210223202340_0_Z__C_010000_20210223180000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210224022500_0_Z__C_010000_20210224000000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png",
"20210224081710_0_Z__C_010000_20210224060000_MET_CHT_JCIasas_JCP600x512_JRcolor_Tjmahp_image.png"
],
"ft24": [
"20210224051440_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas24_JCP600x512_JRcolor_Tjmahp_image.png"
],
"ft48": [
"20210224065910_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas48_JCP600x512_JRcolor_Tjmahp_image.png"
]
},
"asia_monochrome": {
"now": [
"20210221083541_0_Z__C_010000_20210221060000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210221144110_0_Z__C_010000_20210221120000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210221203410_0_Z__C_010000_20210221180000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210222024010_0_Z__C_010000_20210222000000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210222081610_0_Z__C_010000_20210222060000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210222143140_0_Z__C_010000_20210222120000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210222201640_0_Z__C_010000_20210222180000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210223021611_0_Z__C_010000_20210223000000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210223083211_0_Z__C_010000_20210223060000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210223143010_0_Z__C_010000_20210223120000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210223202310_0_Z__C_010000_20210223180000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210224022430_0_Z__C_010000_20210224000000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png",
"20210224081640_0_Z__C_010000_20210224060000_MET_CHT_JCIasas_JCP600x512_JRjmahp_image.png"
],
"ft24": [
"20210224051440_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas24_JCP600x512_JRjmahp_image.png"
],
"ft48": [
"20210224065910_0_Z__C_010000_20210224000000_MET_CHT_JCIfsas48_JCP600x512_JRjmahp_image.png"
]
}
}
データJSON取得URL
https://www.jma.go.jp/bosai/weather_map/data/png/{天気図画像ファイル名}
アメダス(地点ごと10分データ)
人間用URL
https://www.jma.go.jp/bosai/map.html#9/35.747/139.922/&elem=temp&contents=amedas&interval=60