--Amedas hourly observation data page of the Japan Meteorological Agency (Example: [Tokyo]](https://www.jma.go.jp/jp/amedas_h/today-44132.html?areaCode=000&groupCode=30 )) ** Display the graph **. The displayed contents are the temperature of today and yesterday, and the precipitation of today or yesterday. --Display ** links to past observation data ** above the graph. Now you can easily jump to the past weather data search page for that location. By the way, the date of the previous day has already been selected!
I used it to draw a graph.
** The AMeDAS observatory number and the observatory code for past meteorological data retrieval are different **, so it was necessary to associate the two.
You can find the observatory number at that point from the URL of the observation data page every hour. The list can be downloaded as csv from Japan Meteorological Agency | About AMeDAS.
On the other hand, the observatory code of the past meteorological data search does not have a mechanism to be seen in the list as far as I searched, so I made a list by ** scraping ** by Python.
The observatory code is represented by a combination of
Japan Meteorological Agency | Past Meteorological Data Search From the source, you can see the list of
You can see
block_no at each link.
I made a list by scraping these pages. I used Beautiful Soup for scraping and operated it on Jupyter Lab.
After that, the correspondence table is completed by inner joining the two tables. There are two keys, the prefectural promotion bureau and the name of the observatory. I output it in json format and import it.
My hobby is to watch AMeDAS on a regular basis, and especially in the recent summer, the records are updated so I never get tired of watching it. While looking at the AMeDAS page many times and comparing it with yesterday's temperature and seeing how the temperature drops when it rains, I decided to make it because I thought it would be more interesting if there was a graph. did. There are also sites such as Japan Weather Association that graph using data from the Japan Meteorological Agency, but it is better to see them directly. I thought.