BMKG Weather & Earthquakes
Latest, M5.0+ and felt earthquakes with shakemaps, 3-day village weather forecasts by adm4 code, nowcast weather warnings (credit BMKG as the source)
Stable v0.1.0 Node.js 7 actions
About
A Graphrt plugin for the open data of BMKG (Badan Meteorologi, Klimatologi, dan Geofisika), Indonesia's meteorology, climatology and geophysics agency. It returns the latest earthquake, the last 15 M5.0+ and felt earthquakes, 3-day weather forecasts per village (kelurahan/desa, Kemendagri adm4 code) and active nowcast weather warnings. No account or API key is needed. Every operation is a workflow node and an agent tool.
What it can do
- Earthquakes (from data.bmkg.go.id/DataMKG/TEWS/*.json, updated within minutes): - get_latest_earthquake: date, time (WIB) and UTC DateTime, coordinates, magnitude, depth, region, tsunami potential, felt intensity, plus shakemap_url (the shakemap image on data.bmkg.go.id) - list_recent_earthquakes: the last 15 earthquakes of M5.0+, with tsunami potential - list_felt_earthquakes: the last 15 felt earthquakes, with where and how strongly (MMI) they were felt
- Weather: get_weather_forecast for one adm4 code (e.g. 31.71.03.1001, Kemayoran, Jakarta Pusat): the location (province, regency, district, village, coordinates, time zone) and a flat, time-ordered list of 3-hourly forecasts for 3 days: t (°C), hu (%), weather_desc / weather_desc_en, ws (km/h), wd, tcc (%), tp (mm), vs_text, local_datetime, utc_datetime, icon image
- Warnings (nowcast, www.bmkg.go.id/alerts/nowcast): list_weather_warnings parses the RSS feed of active provincial warnings (title, affected districts, alert_code, publish time), get_weather_warning parses one warning's CAP 1.2 document (event, urgency, severity, certainty, effective/expires, infographic URL, area and, with include_polygons: true, its polygons as [latitude, longitude] pairs). language is id or en.
- api_request: any other file on data.bmkg.go.id, e.g. /DataMKG/TEWS/autogempa.json (GET only for agents)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- Latest earthquake
bmkg.get_latest_earthquake - Recent M5.0+ earthquakes
bmkg.list_recent_earthquakes - Recent felt earthquakes
bmkg.list_felt_earthquakes - Village weather forecast
bmkg.get_weather_forecast - Active weather warnings
bmkg.list_weather_warnings - Weather warning details
bmkg.get_weather_warning - BMKG open data request
bmkg.api_request
Settings
This plugin needs no settings.
How to use it
In Graphrt Desktop
- Open Plugins and search for BMKG Weather & Earthquakes.
- Click Install and approve it.
- Follow the setup steps on the plugin's page.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install bmkg workflow.yaml
- id: quakes
type: bmkg.list_felt_earthquakes
- id: warnings
type: bmkg.list_weather_warnings
language: en
- id: detail
type: bmkg.get_weather_warning
language: en
alert_code: "{{#warnings.data.warnings.0.alert_code#}}"