{"id":35113978,"url":"https://github.com/bennyistanto/landslide-rainfall","last_synced_at":"2026-04-06T03:01:45.878Z","repository":{"id":142767275,"uuid":"463549601","full_name":"bennyistanto/landslide-rainfall","owner":"bennyistanto","description":"Half-hourly IMERG rainfall during landslide event","archived":false,"fork":false,"pushed_at":"2022-02-25T14:04:10.000Z","size":3631,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T17:13:07.785Z","etag":null,"topics":["earthengine","gee","imerg","landslide","rainfall"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bennyistanto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-02-25T13:49:00.000Z","updated_at":"2025-06-18T19:56:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"3aaf98c1-3295-49c7-9e83-9acac35e6086","html_url":"https://github.com/bennyistanto/landslide-rainfall","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"b48dbc5766a3a04695e67246d1511663c225b030"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bennyistanto/landslide-rainfall","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennyistanto%2Flandslide-rainfall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennyistanto%2Flandslide-rainfall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennyistanto%2Flandslide-rainfall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennyistanto%2Flandslide-rainfall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bennyistanto","download_url":"https://codeload.github.com/bennyistanto/landslide-rainfall/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bennyistanto%2Flandslide-rainfall/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31457724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["earthengine","gee","imerg","landslide","rainfall"],"created_at":"2025-12-27T20:22:37.892Z","updated_at":"2026-04-06T03:01:45.873Z","avatar_url":"https://github.com/bennyistanto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Half-hourly IMERG rainfall during landslide event\n\nThis is a fork repository from https://github.com/wfpidn/landslide-rainfall which originally developed during my service with WFP, and since I left the agency this guideline no longer maintained. So I will continue to update this at my personal Github repo.\n\n------------\n\nDuring 2018, landslide dominated natural disasters occurred in Central Java. The Regional Disaster Management Agency (BPBD) of Central Java Province recorded that there were about 2,000 landslides in this area.\n\nMost landslide is preceeded by continuous extreme rainfall for few days, as most of the area isn't located near ground weather station, therefore rainfall records are often not available.\n\nRecent development in opendata allows more access to high resolution climate/weather data and to computing platform that allows users to run geospatial analysis in the cloud. This leads to further exploration like never before.\n\nOpen access to 30 mins temporal rainfall data at [Google Earth Engine](https://earthengine.google.com/) platform provided detail information on rainfall intensity prior to the landslide. Such information help advancing research on rainfall model or identification of threshold for extreme rainfall that could trigger a landslide.\n\n\n## Data Source\n\nHalf hourly IMERG at Earth Engine Data Catalogue - [https://developers.google.com/earth-engine/datasets/catalog/NASA_GPM_L3_IMERG_V06](https://developers.google.com/earth-engine/datasets/catalog/NASA_GPM_L3_IMERG_V06)\n\nLandslide event in Magelang, Central Java - Indonesia during 2018. Compiled by Department of Environmental Geography, Faculty of Geography - Universitas Gadjah Mada. Available in CSV format with column structure: ID, Lon, Lat, Day, DD, MM, YYYY, TimeWIB. Link: [Landslide](./data/idn_nhr_ls_3308_magelang_2018_p_example.csv)\n\n\n## Script\n\n### Multipoint simulation\n\nThe script below describe how to extract 30-minute rainfall from NASA [GPM-IMERG](https://gpm.nasa.gov/GPM), based on points location and convert it into CSV file using Google Earth Engine code editor.\n\n``` js\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Script to extract 30-minute rainfall from NASA GPM IMERG, based on points location and convert it into CSV file. \n//\n// Application: Extract 30-minute rainfall in the last 10-days before landslide occurs in certain point. The data\n// will use to develop a model or rainfall threshold  for extreme rainfall that could trigger a landslide.\n//\n// Benny Istanto and Ridwan Mulyadi\n// Vulnerability Analysis and Mapping (VAM) unit, WFP Indonesia\n// \n// Guruh Samodra\n// Department of Environmental Geography, Faculty of Geography, Universitas Gadjah Mada. \n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// List of coordinates from Landslide events\nvar LS = ee.FeatureCollection(\"users/bennyistanto/datasets/table/idn_nhr_ls_3308_magelang_2018_p_example\");\n// LS = LS.filter(ee.Filter.lte('ID', 2)); // lite version\n\n// Load table to layer\nMap.addLayer(LS, {color: \"#ff0000\"}, \"Landlside location\", true);\nMap.centerObject(LS, 11);\n\n// Import NASA GPM IMERG 30 minute data \nvar imerg = ee.ImageCollection('NASA/GPM_L3/IMERG_V06');\n\n// Parsing date from CSV\nfunction parseDate(p) {\n  var d = p.getNumber('DD');\n  var m = p.getNumber('MM');\n  var y = p.getNumber('YYYY');\n  var dt = y.format('%d')\n    .cat('-').cat(m.format('%02d'))\n    .cat('-').cat(d.format('%02d'));\n  return ee.Date(dt);\n}\n\nvar result = LS.map(function(p) {\n  var id = p.getNumber('ID');\n  var point = p.geometry();\n  var coord = point.coordinates();\n  var dt = parseDate(p);\n  var start = dt.advance(-10, 'days'); // 10-days before\n  var end = dt.advance(1, 'days'); // 1-day after\n  var precipHH = imerg.filterBounds(point)\n    .filterDate(start, end)\n    .select('precipitationCal');\n  var timeSeries = precipHH.map(function(image) {\n    var date = image.date().format('yyyy-MM-dd hh:mm');\n    var value = image\n      .clip(point)\n      .reduceRegion({\n        reducer: ee.Reducer.mean(),\n        scale: 30\n      }).get('precipitationCal'); \n    return ee.Feature(null, { \n      coord_id: id, \n      lon: coord.get(0), \n      lat: coord.get(1),\n      date: date, \n      value: value\n    });\n  });\n  return timeSeries;\n});\n\nvar flatResult = ee.FeatureCollection(result).flatten();\n\n// Export the result as CSV in Google Drive\nExport.table.toDrive({\n  collection: flatResult,\n  description:'landslide_rainfall',\n  folder:'GEE',\n  selectors: 'coord_id, lon, lat, date, value', \n  fileFormat: 'CSV'\n});\n```\n\nGEE [link](https://code.earthengine.google.com/b7ccc8291d23770301e96a22bd1be2c8)\n\n![GEE](./img/landslide_rainfall_gee_multi.png)\n\n### Single point simulation\n\nGEE script for 1 point simulation also have been developed. You need to fill coordinate (line 12) and set the landslide date (line 16)\n\n```js\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Script to extract 30-minute rainfall from NASA GPM IMERG, based on point location and convert it into CSV file. \n//\n// Application: Extract 30-minute rainfall in the last 10-days before landslide occurs in certain point. The data\n// will use to develop a model or rainfall threshold  for extreme rainfall that could trigger a landslide.\n//\n// Benny Istanto, Earth Observation and Climate Analyst\n// Vulnerability Analysis and Mapping (VAM) unit, WFP Indonesia | Email: benny.istanto@wfp.org\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n// Define a point of interest as a landslide location.\nvar POI = ee.Geometry.Point(109.719792, -7.279643); // Adjust the coordinate - Banjarnegara 12 Dec 2014\nMap.centerObject(POI, 9);\n\n// Date when landslide occurs\nvar lsevent = new Date('2014-12-12'); // Adjust date period with landslide event\nvar start = new Date(lsevent.getTime() - 10*24*60*60*1000); // 10-days before\nvar end = new Date(lsevent.getTime() + 1*24*60*60*1000); // 1-day after\nprint(start);\nprint(end);\n\n// Import NASA GPM IMERG 30 minute data and calculate accumulation for 10days.\nvar imerg = ee.ImageCollection('NASA/GPM_L3/IMERG_V06');\nvar imergHH = imerg.filterBounds(POI).filterDate(start, end).select('precipitationCal');\nvar precip = imergHH.select('precipitationCal').sum();\n\n// Create a function that takes an image, calculates the mean over a geometry and returns the value and the corresponding date as a feature.\n// Timeseries data\nvar timeSeries = imergHH.map(function (image) {\n  var imergdate1 = image.date().format('yyyy-MM-dd hh:mm');\n  var value = image\n    .clip(POI)\n    .reduceRegion({\n      reducer: ee.Reducer.mean(),\n      scale: 30\n    }).get('precipitationCal');\n  return ee.Feature(null, {value: value, date: imergdate1});\n});\n\n// Accumulation data\n// Based on input from Daniel Wiell via GIS StackExchange\n// https://gis.stackexchange.com/questions/360611/extract-time-series-rainfall-from-multiple-point-with-date-information/\nvar days = ee.Date(end).difference(ee.Date(start), 'days');\nvar dayOffsets = ee.List.sequence(1, days);\nvar accumulation = dayOffsets.map(\n  function (dayOffset) {\n    var endDate = ee.Date(start).advance(ee.Number(dayOffset), 'days');\n    var image = imergHH.filterDate(start, endDate).sum();\n    var date = endDate.advance(-1, 'days').format('yyyy-MM-dd');\n    var value = image\n      .clip(POI)\n      .reduceRegion({\n        reducer: ee.Reducer.mean(),\n        geometry: POI,\n        scale: 30\n      }).get('precipitationCal');\n    return ee.Feature(null, {value: value, date: date});\n  });\n\n\n// Create a graph of the time-series.\nvar graphTS = ui.Chart.feature.byFeature(timeSeries,'date', ['value']);\nprint(graphTS.setChartType(\"LineChart\")\n           .setOptions({title: 'NASA GPM IMERG 30-minute rainfall time-series',\n                        vAxis: {title: 'Rainfall estimates (mm)'},\n                        hAxis: {title: 'Date'}}));\n\n// Create a graph of the accumulation.\nvar graphAcc = ui.Chart.feature.byFeature(accumulation,'date', ['value']);\nprint(graphAcc.setChartType(\"LineChart\")\n           .setOptions({title: 'NASA GPM IMERG 30-minute rainfall accumulation',\n                        vAxis: {title: 'Rainfall estimates (mm)'},\n                        hAxis: {title: 'Date'}}));\n\n\n// Rainfall vis parameter\nvar palette = [\n  '000096','0064ff', '00b4ff', '33db80', '9beb4a',\n  'ffeb00', 'ffb300', 'ff6400', 'eb1e00', 'af0000'\n];\nvar precipVis = {min: 0.0, max: 1000.0, palette: palette, opacity:0.5};\n\n\n// Add layer into canvas\nMap.addLayer(precip, precipVis, \"10-days rainfall\", false);\nMap.addLayer(POI, {color: \"#ff0000\"}, \"Landlside location\", true);\n\n\n// Export the result to Google Drive as a CSV.\nExport.table.toDrive({\n  collection: timeSeries,\n  description:'LS_69421',\n  folder:'GEE',\n  selectors: 'date, value', \n  fileFormat: 'CSV'\n});\n\n// End of script\n```\n\nGEE [link](https://code.earthengine.google.com/47dede746d68d7d1a603d49540aa4805)\n\n![GEE](./img/landslide_rainfall_gee_single.png)\n\n## Output\n\n30-minutes of rainfall that occurred 10-days before landslide. Generated using GEE, link: [Landslide Rainfall](./data/landslide_rainfall.csv)\n\n\n## About\n\nThis is part of research and development of threshold for extreme rainfall that could trigger a landslide event in Indonesia. Reference: [https://bennyistanto.github.io/ERM/ls/#extreme-rainfall-triggered-landslide-alert](https://bennyistanto.github.io/ERM/ls/#extreme-rainfall-triggered-landslide-alert)\n\nDeveloped with my former colleague Ridwan Mulyadi at WFP, and Guruh Samodra, Dr. Eng. from Department of Environmental Geography, Faculty of Geography, Universitas Gadjah Mada.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennyistanto%2Flandslide-rainfall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbennyistanto%2Flandslide-rainfall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbennyistanto%2Flandslide-rainfall/lists"}