Graphrt

BMKG Weather & Earthquakes

Gempa terbaru, gempa M5.0+ dan gempa dirasakan beserta shakemap, prakiraan cuaca 3 hari per desa berdasarkan kode adm4, peringatan cuaca nowcast (cantumkan BMKG sebagai sumber)

Stabil v0.1.0 Node.js 7 aksi
Pakai di Graphrt Desktop

Tentang

Plugin Graphrt untuk data terbuka BMKG (Badan Meteorologi, Klimatologi, dan Geofisika). Plugin ini mengembalikan gempa terbaru, 15 gempa M5.0+ dan gempa dirasakan terakhir, prakiraan cuaca 3 hari per kelurahan atau desa (kode adm4 Kemendagri) dan peringatan cuaca nowcast yang sedang aktif. Tidak perlu akun atau API key. Setiap operasi adalah node workflow dan tool agent.

Yang bisa dilakukan

  • 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)

Aksi

Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.

  • 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

Pengaturan

Plugin ini tidak butuh pengaturan.

Cara memakainya

Di Graphrt Desktop

  1. Buka Plugins dan cari BMKG Weather & Earthquakes.
  2. Klik Install lalu setujui.
  3. Ikuti langkah setup di halaman plugin.
  4. Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Plugin di Graphrt Desktop

Dengan 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#}}"
Plugin di docs