Get Event Data
Note
This document has been machine translated.
This section describes how to retrieve EvWH event data in the xData Edge environment using the API. Follow the instructions in Submitting Event Data. The code and data used in this explanation can be downloaded from here.
1. event data acquisition
API to get event data (mapserv.eventdata) is used to acquire event data for EvWH.
To retrieve event data, it is necessary to specify the table name, column, time and space information of the event data to be retrieved.
In this case, we will retrieve event data from table event.rain_jma_tbl_0 with the following conditions.
- Columns:
start_datetime,end_datetime, `rainfall - Time:
start_datetime>=2019-10-12 00:00:00andstart_datetime< `2019-10-13 00:00:00 - Space: 35 to 36 degrees latitude, 139 to 140 degrees longitude rectangle
An example of this implementation is get_event.py.
When running get_event.py in a VM with Edge installed, the results are saved to a file and visualized in the next section as follows.
python3 get_event.py >2019-10-kanagawa.json
2. visualization of event data
Here we will use QGIS for visualization; QGIS can be downloaded from here.
After starting QGIS, select OpenStreetMap under XYZTiles and zoom in on the Kanto area.
! Figure 1
The result of running get_event.py will be output in GeoJSON format, so drag and drop the file saved in the previous section onto the map.
The `2019-10-kanagawa - result' will be added from the layer, so select its properties and set the following.
SymbolologymenuDefine by continuous value.- Set
valueto `rainfall - Increase the size of the marker with
symbol. - Press the
Classifybutton and create asymbol-valuepair
- The
Time Seriesmenu- Turn on `Dynamic time series control
- Make sure
start_field/end_fieldarestart_datetime/end_datetimerespectively !
Press OK when you have completed the settings.
Next, press Time Series Controller Panel on the main QGIS screen to display the Time Series Controller.
From the Time Series Controller, press Animated Time Series Navigator , set
2019-10-12 00:00:00 to 2019-10-13 00:00:00 as the animation range and press the play button. The display will show the amount of rainfall at each station according to the time in red to white.



