-
Notifications
You must be signed in to change notification settings - Fork 39
Soramame Japan Environmental Agency
- Data frequency: hourly
- historical data access: limited to past year(?)
- Japan Standard Time
- Time zone in Tokyo, Japan (GMT+9)
Measurement Methods
https://soramame.env.go.jp/guide/guidePage5/guide-5-8
- Provides raw values
- Provide lat, lng values for locations
- provides locations list
- Translate locations list?
https://soramame.env.go.jp/apiManual/apiPage3/api-3-2-1#api-3-1-2
https://soramame.env.go.jp/station
use today's date in the url
contains coordinates https://soramame.env.go.jp/data/map/kyokuNoudo/2022/09/28/01.csv
Translated csv can be found here: https://drive.google.com/drive/folders/1FzqXcdSYCzud9RsbGMSrtGNQBi3yeNtz?usp=sharing
const translation = {
'緯度': 'latitude',
'経度': 'longitude',
'測定局コード': 'Measuring station code',
'測定局名称': 'Bureau name',
'所在地': 'location',
'測定局種別': 'Measuring station type',
'問い合わせ先': 'Contact information',
'都道府県コード': 'Prefecture code'
}
notes: below is the info to use their API. While robust, rate limiting prevents pulling data from the whole platform at once. To get the data we can build a url like this: https://soramame.env.go.jp/data/sokutei/NoudoTime/${station_id}/today.csv?_=${timestampInMilliseconds} for example: https://soramame.env.go.jp/data/sokutei/NoudoTime/12481050/today.csv?_=1690221225436 zero-padded station IDs must be preserved! for example https://soramame.env.go.jp/data/sokutei/NoudoTime/01101520/today.csv?_=1690232574986
Measurements are available at the data_search
. Measurements can be filtered to the year/month level, with start date (Start_YM
) and end date (End_YM
) query parameters
URL:
https://soramame.env.go.jp/soramame/api/data_search
https://soramame.env.go.jp/guide/guidePage4/guide-4-4
Important! Times are reported as 1-24hrs, using time-ending i.e. 1 would represent data from 0:00 to 0:59
-
Start_YM
- Starting Year/Month string in format YYYYMM (e.g. 202208) -
End_YM
- end Year/Month string in format YYYYMM (e.g. 202208), if none defualts to current month -
TDFKN_CD
- prefecture ID (e.g. 08) -
REQUEST_DATA
- comma delimited list of pollutants (parameters), if none returns all. see list below for valid values -
SKT_CD
- comma delimited list of station IDs that are within the relevant prefecture (TDFKN_CD)
Historical data is available for download in csv form here: https://soramame.env.go.jp/download
Under the hood the download button is using a POST request with the following signature:
URL:
https://soramame.env.go.jp/soramame/download
Query Parameters
-
DL_KBN
- unknown value, seems to work with a value of '3' -
Target_YM
- Year/Month string in format YYYYMM (e.g. 202208) N.B. Only works for 1 year prior -
TDFKN_CD
- prefecture ID (e.g. 08) -
SKT_CD
- comma delimited list of location IDs that are within the relevant prefecture (TDFKN_CD)