Receiving Alert Notifications (Pub/Sub)
Alerts, alert conditions, Alert notification API
The mechanism that issues a notification when a risk such as rainfall, traffic congestion, traffic accident or otherwise has exceeded a threshold value for the specified spatial map range or theme is referred to as an alert.
In addition, the conditions to check whether to issue an alert notification, including spatial range to be vigilant, the targeted theme or threshold value, are referred to as alert conditions.
The API that searches for alerts from the risk map data based on the alert conditions and broadcasts alerts in the JSON-RPC response format is referred to as the Alert notification API.
Using the Alert notification API
The following procedures are carried out to use the Alert notification API.
- Consider the theme, spatial range and time to be obtained
- Obtain an API key and Alert notification API client
- Implement
Each procedure is described in greater detail below.
Consider the theme, spatial range and time to be obtained
First, investigate the theme holding the risk you wish to use and determine the spatial range and time. Determine the theme you wish to use from the following themes.
Theme Name | Risk Map Data Overview | Spatial Overview | Time | |
---|---|---|---|---|
rm_accident | Accidents | Area around Hyogo Prefecture and Osaka Prefecture, primarily Kobe-shi, Ashiya-shi, Nishinomiya-shi, Itami-shi and Amagasaki-shi | 1-minute increments starting from 2016/09/04 16:00 | |
rm_congestion | PANDA x JARTIC | Area around Hyogo Prefecture, primarily Himeji-shi, Kakogawa-shi, Akashi-shi, Awaji-shi and Kobe-shi | 30-second increments starting from 2014/05/1 6:46:30 | |
rm_dalat_domingo | DOMINGO for Dalat | Dummy data for mockup demonstration around Dalat | 5-minute increments starting from 2018/09/03 08:00:00??5??? | |
rm_dalat_hazardous | hazard for Dalat | Dummy data for mockup demonstration around Dalat | 1-minute increments starting from 2020/03/31 00:00:00??1??? | |
rm_dalat_polution | Polution for Dalat | Dummy data for mockup demonstration around Dalat | 1-minute increments starting from 2020/02/21 08:00:00??1??? | |
rm_dalat_wind | Wind for Dalat | Dummy data for mockup demonstration around Dalat | 1-minute increments starting from 2020/03/21 08:00:00??1??? | |
rm_dalat_xrain | XRAIN for Dalat | Dummy data for mockup demonstration around Dalat | 5-minute increments starting from 2018/08/01 00:00:00??5??? | |
rm_domingo | DOMINGO Traffic Obstruction Information | A mesh approximately 1km x 1km in area centered around Nakano-ku (Approximately 8km east to west and 11km north to south) | 5-minute increments starting from 2018/01/22 12:00 | |
rm_hiyarihatto | Near-miss Incidents | 17,718 points on roads and near intersections in the area of Tokyo’s 23 wards (however some deviations are present) | All times of day | As this risk map does not vary according to time, the results will be the same whatever time is specified |
rm_hiyarihatto_normalized | Near-miss Incidents | 2,703 points on roads and near intersections in Bunkyo-ku | 1-minute increments from 2018-09-18 17:30:00+09 to 2018-09-18 20:29:00+09 | Data corrected based on XRAIN precipitation amounts in addition to near-miss incident risk |
rm_panda | PANDA | Kansai area primarily Osaka Prefecture, Hyogo Prefecture and Kyoto Prefecture | 30-second increments starting from 2016/09/01 16:00 | |
rm_ssm2019_domingo | DOMINGO | Southern Kanagawa area primarily Atsugi, Hiratsuka, Fujisawa, and Kamakura | 5-minute increments starting from 2018/09/03 08:00 ??5??? | |
rm_ssm2019_domingo_xrain | DOMINGO x XRAIN | Southern Kanagawa area primarily Atsugi, Hiratsuka, Fujisawa, and Kamakura | 5-minute increments starting from 2018/09/03 08:00 ??5??? | |
rm_ssm2019_rt_nowcast | Nowcast | Southern Kanagawa area primarily Atsugi, Hiratsuka, Fujisawa, and Kamakura | 5-minute increments starting from 2020/02/20 12:40 ??5??? | |
rm_ssm2019_xrain | XRAIN | Southern Kanagawa area primarily Atsugi, Hiratsuka, Fujisawa, and Kamakura | 5-minute increments starting from 2018/08/01 00:40 ??5??? | |
rm_ssm2019_xrain_1min | XRAIN | Southern Kanagawa area primarily Atsugi, Hiratsuka, Fujisawa, and Kamakura | 1-minute increments starting from 2018/09/01 00:00 ??1??? | |
rm_xrain | XRAIN | Areas around Osaka Prefecture, Kyoto Prefecture, Hyogo Prefecture, Nara Prefecture, Mie Prefecture, Wakayama Prefecture, Aichi Prefecture, Shiga Prefecture, Tokushima Prefecture and Kagawa Prefecture | 1-minute increments starting from 2016/09/01 00:00 | |
rm_xrain_for_hiyarihatto | XRAIN x Near-miss Incidents | Kanto, Chubu, Kinki and Shikoku areas | 1-minute increments starting from 2018/09/18 17:30 |
In addition, details on spatial range have been displayed in GeoJSON format in the following table. Use http://geojson.io or a similar source to confirm the range.
rm_accident
{"type":"Polygon","coordinates":[[[135.125,34.666666666667],[135.125,34.833333333333],[135.5,34.833333333333],[135.5,34.666666666667],[135.125,34.666666666667]]]}
rm_congestion
{"type":"Polygon","coordinates":[[[134.521554851191,34.2830256567723],[134.521554851191,34.9461410098947],[135.431570148809,34.9461410098947],[135.431570148809,34.2830256567723],[134.521554851191,34.2830256567723]]]}
rm_dalat_domingo
{"type":"Polygon","coordinates":[[[108.194097222222,11.8506944444448],[108.194097222222,12.1048611111108],[108.575347222222,12.1048611111108],[108.575347222222,11.8506944444448],[108.194097222222,11.8506944444448]]]}
rm_dalat_hazardous
{"type":"Polygon","coordinates":[[[108.436640507387,11.9393545672872],[108.436640507387,11.9411614326446],[108.438475493353,11.9411614326446],[108.438475493353,11.9393545672872],[108.436640507387,11.9393545672872]]]}
rm_dalat_polution
{"type":"Polygon","coordinates":[[[108.375,11.916666666667],[108.375,12],[108.5,12],[108.5,11.916666666667],[108.375,11.916666666667]]]}
rm_dalat_wind
{"type":"Polygon","coordinates":[[[108.197222222222,11.8527777777778],[108.197222222222,12.1027777777778],[108.572222222222,12.1027777777778],[108.572222222222,11.8527777777778],[108.197222222222,11.8527777777778]]]}
rm_dalat_xrain
{"type":"Polygon","coordinates":[[[108.197222222222,11.8527777777778],[108.197222222222,12.1027777777778],[108.572222222222,12.1027777777778],[108.572222222222,11.8527777777778],[108.197222222222,11.8527777777778]]]}
rm_domingo
{"type":"Polygon","coordinates":[[[139.625244,35.648369],[139.625244,35.746512],[139.713135,35.746512],[139.713135,35.648369],[139.625244,35.648369]]]}
rm_hiyarihatto
{"type":"Polygon","coordinates":[[[139.631834417037,35.5914144456976],[139.631834417037,35.7790291589697],[139.872114671177,35.7790291589697],[139.872114671177,35.5914144456976],[139.631834417037,35.5914144456976]]]}
rm_hiyarihatto_normalized
{"type":"Polygon","coordinates":[[[139.717636353308,35.699204530787],[139.717636353308,35.7355328554088],[139.772832896927,35.7355328554088],[139.772832896927,35.699204530787],[139.717636353308,35.699204530787]]]}
rm_panda
{"type":"Polygon","coordinates":[[[134.295,34.169781],[134.295,35.364],[136.179357,35.364],[136.179357,34.169781],[134.295,34.169781]]]}
rm_ssm2019_domingo
{"type":"Polygon","coordinates":[[[139.246875,35.247916666667],[139.246875,35.502083333333],[139.628125,35.502083333333],[139.628125,35.247916666667],[139.246875,35.247916666667]]]}
rm_ssm2019_domingo_xrain
{"type":"Polygon","coordinates":[[[139.25,35.25],[139.25,35.5],[139.625,35.5],[139.625,35.25],[139.25,35.25]]]}
rm_ssm2019_rt_nowcast
{"type":"Polygon","coordinates":[[[139.25,35.25],[139.25,35.5],[139.625,35.5],[139.625,35.25],[139.25,35.25]]]}
rm_ssm2019_xrain
{"type":"Polygon","coordinates":[[[139.25,35.25],[139.25,35.5],[139.625,35.5],[139.625,35.25],[139.25,35.25]]]}
rm_ssm2019_xrain_1min
{"type":"Polygon","coordinates":[[[139.25,35.25],[139.25,35.5],[139.625,35.5],[139.625,35.25],[139.25,35.25]]]}
rm_xrain
{"type":"Polygon","coordinates":[[[134,33.5833333333333],[134,36],[137.375,36],[137.375,33.5833333333333],[134,33.5833333333333]]]}
rm_xrain_for_hiyarihatto
{"type":"Polygon","coordinates":[[[134,33.6166666666667],[134,37.5],[141.125,37.5],[141.125,33.6166666666667],[134,33.6166666666667]]]}
As risk map data varies depending on the periods and ranges registered for each set of data, risk map data is selected according to the purpose of use.
Obtain an API key and Alert notification API client
An API key and secret key needs to be issued in order to use the Alert notification API. Please submit an application to the EvWH system administrator to obtain an API key and secret key.
As the Alert API is designed to be used from a browser, a JavaScript module that allows a browser to be used as a client is provided. To use the JavaScript module, please obtain it from /bidal/alert-api-client/blob/master/build/AlertApiClientModule.js .
Implement
Use the Alert notification API client to obtain data from the Alert notification API. For specific usage instructions, please refer to the Function Reference.