Skip to content

Instantly share code, notes, and snippets.

@ashishnegi
Created May 1, 2015 12:07
Show Gist options
  • Save ashishnegi/eb8dc210482b930a1a89 to your computer and use it in GitHub Desktop.
Save ashishnegi/eb8dc210482b930a1a89 to your computer and use it in GitHub Desktop.
Cluster the reported incidents by their locations and category-id. *Not well tested.*
/*
* Fetch the data from public api.
* categorize the incidents in groups of
* {
category-id : [
for-each-category-a-list-of-list-of-incidents.
A-list-of-incidents : stores some nearby incidents.
]
}
// give each category to different team.
// ask each team to take first item from their list.
// which would be list of nearby incidents.
// send a team to them. // continue.
*/
function findBestCategoryForIncident(incident) {
// currently returning the first category.
// Plan : look into keywords in description.
// ** Found that mostly, people are putting one category only..
// so this **works..
return incident.categories[0].category.id;
};
// create map of {category-id : [list of incidents of this category.]}
function categorizeIncidents (incidents) {
var incidentsByCategories = {};
var countIncidents = incidents.length;
for (var i = 0; i < countIncidents; ++i) {
var categoryId = findBestCategoryForIncident(incidents[i]);
if (undefined === incidentsByCategories[categoryId])
incidentsByCategories[categoryId] = [];
incidentsByCategories[categoryId].push(incidents[i]);
}
return incidentsByCategories;
}
function distanceBetweenPoints (p1, p2) {
// Plan : Not the best way to find pythagorus distance between
// { lat, log }. But guess it **should work** too.
var dX = p1.x - p2.x;
var dY = p1.y - p2.y;
return Math.sqrt((dX*dX) + (dY*dY));
}
function getPointFromCoordinate(coord) {
var point = {};
point.x = (coord.lon + 180) * 360;
point.y = (coord.lat + 90) * 180;
return point;
}
// for each incident add a .distance parameter computed from getPointFromCoordinate.
function addDistanceToTheCategory(incidentsByCategories, categoryId) {
// Distance is calculated from the NewDelhi, India.
// For grouping nearby-places in Nepal,
// if we take distance from a far place, difference of distance between nearby-locations
// would be smaller than far-away-locations.
// Plan : **Need to check this theory**.
var incidentArray = incidentsByCategories[categoryId],
incidentArrayLen = incidentArray.length,
newDelhiCoordinate = {lat: 24.6, lon: 77.2},
newDelhiPoint = getPointFromCoordinate(newDelhiCoordinate);
for (var i = 0; i < incidentArrayLen; i++) {
incidentArray[i].distance = distanceBetweenPoints(newDelhiPoint, getPointFromCoordinate({
lat: incidentArray[i].incident.locationlatitude,
lon: incidentArray[i].incident.locationlongitude
}));
}
}
// inicidentsByCategories is map {categoryId : [list of incidents]}.
// sort the [list incidents] by their location.
function sortByLocation (incidentsByCategories) {
for (var categoryId in incidentsByCategories) {
if (incidentsByCategories.hasOwnProperty(categoryId)) {
// for each incidentsByCategories : add the distance
// for each point from a far-awar point.
addDistanceToTheCategory(incidentsByCategories, categoryId);
// now sort all points.
incidentsByCategories[categoryId].sort(function(a, b) {
var da = a.distance, db = b.distance;
if (da < db)
return -1;
if (da > db)
return 1;
return 0;
});
}
}
return incidentsByCategories;
}
// find what is the distance-threshold that would be used to
// group together different distances.
// what we want is to group incidents together depending upon their locality.
// like [incident1, incident2] happened in xyz place, [incident3, incident4]
// happened in abc place.
function findDistanceThreshold (incidents, incidentLen, MinDisThreshold) {
// ok : first thought algo.
// find the mean of distance.
// find avg of all (distance > mean)
// take this as dividing distance threshold.
if (incidentLen === 0)
return 0;
var firstDistance = incidents[0] ? incidents[0].distance : 0;
var totalGap = 0;
var gaps = [];
// find total-distance
for (var i = 0; i < incidentLen; ++i) {
var gap = (incidents[i].distance - firstDistance);
gaps.push(gap);
totalGap += gap;
}
// find mean distance.
var meanGap = totalGap / incidentLen;
// find sum-gap > mean-distance and count of them also.
var sumBigGap = 0, countBigGap = 0;
for (var i = 1; i < incidentLen; ++i) {
if (gaps[i] > meanGap) {
sumBigGap += (gaps[i] - gaps[i-1]);
countBigGap++;
}
}
var avgBigGap = (countBigGap > 0) ? sumBigGap/countBigGap : 0;
if (avgBigGap < MinDisThreshold)
avgBigGap = 0;
// find distance-threshold.
return avgBigGap;
}
// divides a incidents array by threshold.
function partitionByGap(incidents, disThreshold) {
// partition the array whenever, you find difference in distance > disThreshold.
// Plan : is this costly work ?
// Should call the generat alarms here only ?
var groups = [];
while (incidents.length) {
var firstGroupDistance = incidents[0].distance, done = false;
for (var toGroup = 1; toGroup < incidents.length; toGroup++) {
var distanceOfToGroup = incidents[toGroup].distance - firstGroupDistance;
var distanceOfPrevToGroup = incidents[toGroup-1].distance - firstGroupDistance;
var diffGap = (distanceOfToGroup - distanceOfPrevToGroup);
if (diffGap > disThreshold) {
groups.push(incidents.splice(0, toGroup));
done = true;
}
}
if (done)
continue;
// ok we are here. so take the whole group..
groups.push(incidents.splice(0));
}
return groups;
}
// incidentsByCategories is map {category-id: [incident1, incident2, incident3, incident4]}.
// returns a map categoryIncidentGroups : {category-id : [ [incident1, incident3], [incident2, incident4]}
// groups local or near incidents together.
function groupCategoryIncidentsByNearByLocations (incidentsByCategories) {
// Important : assumes incidentsByCategories sorted on distance for each category.
var categoryIncidentGroups = {}
for (var categoryId in incidentsByCategories) {
if (incidentsByCategories.hasOwnProperty(categoryId)) {
var incidents = incidentsByCategories[categoryId];
var incidentLen = incidents.length;
if (incidentLen == 0)
continue;
var disThreshold = findDistanceThreshold(incidents, incidentLen, 5);
if (disThreshold === 0) {
categoryIncidentGroups[categoryId] = [incidents];
} else {
categoryIncidentGroups[categoryId] = partitionByGap(incidents, disThreshold);
}
}
}
return categoryIncidentGroups;
}
// sort by severity..
// prints for each..
function generateAlarms(categoryIncidentGroups) {
// sort by severity.. also try to give each one a chance.
// lets say severity is more number of incidents..
// Plan : Find number of people affected in that incidents-group..
for (var categoryId in categoryIncidentGroups) {
if (categoryIncidentGroups.hasOwnProperty(categoryId)) {
categoryIncidentGroups[categoryId].sort(function(a,b) {
if (a.length > b.length)
return -1;
if (a.length < b.length)
return 1;
return 0;
});
}
}
for (var categoryId in categoryIncidentGroups) {
if (categoryIncidentGroups.hasOwnProperty(categoryId)) {
console.log("CategoryId :" + categoryId);
console.dir(categoryIncidentGroups[categoryId]);
// trigger some alarm..
}
}
// console.log(JSON.stringify(categoryIncidentGroups));
}
var data;
var defer = $.Deferred();
// To test on real data - uncomment this line and comment out -- see below.
/*
$.getJSON("http://kathmandulivinglabs.org/earthquake/api?task=incidents", function(datajson) {
data = datajson;
})
*/
// comment this out for real world test. and uncomment above
defer.done(function(datajson){
data = datajson;
})
// upto here....
.done(function() {
// now we got incidents.
// first put each incident in its best category.
var incidentsByCategories = categorizeIncidents(data.payload.incidents);
// ok now for each category.. sort by locations
incidentsByCategories = sortByLocation(incidentsByCategories);
// now for each category.. for some local-area put these incidents together together..
var categoryIncidentGroups = groupCategoryIncidentsByNearByLocations(incidentsByCategories);
// generate alarm for these incidents.
// while generating alarms try to find "number of people affected" : not done currently.
generateAlarms(categoryIncidentGroups);
})
.fail(function() {
alert("API not working");
});
// Test data.. // can be commented..
var datajson = {"payload":{"domain":"http://kathmandulivinglabs.org/earthquake/","incidents":[{"incident":{"incidentid":"634","incidenttitle":"Rasuwa Area: rescue required for Ram, Badly wounded","incidentdescription":"From Pervinder - @anubhavsinha: Cn Sum1 in Kathmandu hlp me reach a rescue team in Rasuwa Area. I need Ram rescued +9779741186914 Badly wounded\"@MEAIndia\n\nhttps://twitter.com/Pervinder/status/592586453156175872\n\nHR84","incidentdate":"2015-04-27 00:09:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"643","locationname":"Dhunche, Rasuwa, Bagmati, Central Development Region, Nepal","locationlatitude":"28.111381","locationlongitude":"85.297632"},"categories":[{"category":{"id":13,"title":"People Trapped"}},{"category":{"id":21,"title":"Medical Evacuation"}},{"category":{"id":22,"title":"Medical Assiatance"}},{"category":{"id":23,"title":"Food/Water/Shelter"}},{"category":{"id":28,"title":"Food/Water"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"324","incidenttitle":"Ramechhap district - rescue team needed","incidentdescription":"https://www.facebook.com/Shraddha.pant/posts/10152706526685974?comment_id=1…9885974&amp;offset=0&amp;total_comments=3&amp;notif_t=feed_comment\nRescue team needed\n(HR69,r71)","incidentdate":"2015-04-26 23:47:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"330","locationname":"Ramechhap, Janakpur, Central Region, Nepal","locationlatitude":"27.536436","locationlongitude":"86.263802"},"categories":[{"category":{"id":6,"title":"Building Collapsed"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"Municipality"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"319","incidenttitle":"Gorkha district - rescue &amp; supplies needed","incidentdescription":"https://twitter.com/WVAsia/status/592580844700631040\nJUST IN: Madan Rana: staff in #Gorkha. NEED: Search &amp; rescue, food, blankets, medical treatment, clearing blocked roads. #NepalEarthquake\n(HR98,r100)","incidentdate":"2015-04-26 23:47:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"324","locationname":"Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"28.290564","locationlongitude":"84.842793"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"312","incidenttitle":"Kathmandu district - blood required for hospitals","incidentdescription":"https://twitter.com/EsraKirecci/status/592579323510530048\nKathmandu hospitals struggling after #Nepal #earthquake #AA @anadoluagency http://u.aa.com.tr/499893 We have no quantity of B+, and A+ and O+ are running low.\n(HR85,r87)","incidentdate":"2015-04-26 23:41:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"317","locationname":"Kathmandu Valley Hospitals, Gorkha, Kathmandu, Bagmati, Central Development Region, Nepal","locationlatitude":"27.700115","locationlongitude":"85.333351"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"City/village"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"317","incidenttitle":"Dolakha","incidentdescription":"25 people trapped in Upper Tamakoshi Hydro Electrical project Nepal Alive. 200 kms from Kathmandu Contact 09779844309933 Amit. \n\nhttps://twitter.com/ILoveSiliguri/status/592576426362019840\n\n(w98)","incidentdate":"2015-04-26 23:30:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"322","locationname":"Upper Tamakoshi Hydro Electrical project. Limited Lamabagar VDC, Dolakha District, Janakpur Zone, Central Development Region","locationlatitude":"27.743189","locationlongitude":"86.173241"},"categories":[{"category":{"id":13,"title":"People Trapped"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"9844309933"}}},{"incident":{"incidentid":"294","incidenttitle":"Rasuwa District (Dhunche)","incidentdescription":"My cousin+500 others stuck at Dhunche 50 kms away from Kathmandu\n\nhttps://twitter.com/pratikdawda/status/592566232492081153 (w80)","incidentdate":"2015-04-26 22:49:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"299","locationname":"Dhunche, Rasuwa, Bagmati, Central Development Region, Nepal","locationlatitude":"28.111331","locationlongitude":"85.297641"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[{"id":173,"type":4,"link":"https://twitter.com/pratikdawda/status/592566232492081153","thumb":null}],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"City/village"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"289","incidenttitle":"Kathmandu","incidentdescription":"We’ve just verified a group of 7 families need urgent help in #kathmandu.\n\nhttps://twitter.com/zaurav/status/592552579361538048 (w74)","incidentdate":"2015-04-26 21:55:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"294","locationname":"kathmandu","locationlatitude":"28.157811","locationlongitude":"85.137497"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"City/village"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"9841400843"}}},{"incident":{"incidentid":"325","incidenttitle":"Sindhupalchowk district - rescue team needed","incidentdescription":"https://www.facebook.com/Shraddha.pant/posts/10152706526685974?comment_id=1…9885974&amp;offset=0&amp;total_comments=3&amp;notif_t=feed_comment\nRescue team needed\n(hr69,r71)","incidentdate":"2015-04-26 21:51:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"331","locationname":"Sindhupalchowk, Bagmati, Central Region, Nepal","locationlatitude":"27.775623","locationlongitude":"85.711895"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"858","incidenttitle":"Gorkha - village needs tents, blankets, food","incidentdescription":"My village in Gorkha needs TENTS, Blankets and food. Plz call me 9851194247. HR119\nhttps://twitter.com/subhash580/status/592511814119755778","incidentdate":"2015-04-26 20:13:00","incidentmode":"1","incidentactive":"1","incidentverified":"1","locationid":"873","locationname":"Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"27.994658","locationlongitude":"84.628128"},"categories":[{"category":{"id":23,"title":"Food/Water/Shelter"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"9851194247"}}},{"incident":{"incidentid":"2","incidenttitle":"Building collapsed","incidentdescription":"building collapsed","incidentdate":"2015-04-26 17:36:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"2","locationname":"Baluwatar, Kathmandu","locationlatitude":"27.730769","locationlongitude":"85.329728"},"categories":[{"category":{"id":6,"title":"Building Collapsed"}}],"media":[{"id":1,"type":1,"link":"2_1_1430050409.JPG","thumb":"2_1_1430050409_t.JPG","thumb_url":"http://kathmandulivinglabs.org/earthquake/media/uploads/2_1_1430050409_t.JPG","link_url":"http://kathmandulivinglabs.org/earthquake/media/uploads/2_1_1430050409.JPG"}],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"692","incidenttitle":"Bir Hospital: Kathmandu - Urgent medicines required","incidentdescription":"These medicine are urgently needed in #Birhospital in #kathmandu, #nepal \nPicture attached\n\nhttps://twitter.com/Shah_Amit_/status/592405894450778112\n\nHR111","incidentdate":"2015-04-26 12:12:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"704","locationname":"Bir Hospital, Mahankal Marg, Bhotahity, Basantapur Durbar Square, Gorkha, काठमाडौं, Bagmati, Central Development Region, 44600, Nepal","locationlatitude":"27.705107","locationlongitude":"85.313365"},"categories":[{"category":{"id":22,"title":"Medical Assiatance"}}],"media":[{"id":293,"type":1,"link":"692_1_1430387437.jpg","thumb":"692_1_1430387437_t.jpg","thumb_url":"http://kathmandulivinglabs.org/earthquake/media/uploads/692_1_1430387437_t.jpg","link_url":"http://kathmandulivinglabs.org/earthquake/media/uploads/692_1_1430387437.jpg"}],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"Exact location"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"301","incidenttitle":"Gorkha District (Gorkha)","incidentdescription":"people in Laprak need help and no efforts have been made to reach out in this area\n\nhttps://www.facebook.com/News24nepal.tv/photos/pcb.961652403865505/961651300532282/?type=1\n(w88)","incidentdate":"2015-04-26 12:00:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"306","locationname":"Laprak, Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"28.219149","locationlongitude":"84.801399"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"VDC"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"315","incidenttitle":"Districts and areas affected","incidentdescription":"Dhading and Panuti were reported to be affected too. Dhulikhel, Nagarkot, Khabre, Langtang Area (list of areas affected being listed on FB page) (HR66) https://www.facebook.com/Shraddha.pant/posts/10152706526685974?comment_id=10152706569885974&amp;offset=0&amp;total_comments=3&amp;notif_t=feed_comment","incidentdate":"2015-04-26 11:51:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"320","locationname":"Dhading, Panuti, Dhulikhel, Nagarkot, Khabre, Langtang Area","locationlatitude":"28.157811","locationlongitude":"85.137497"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"264","incidenttitle":"Tanahun - Bandipur heavily impacted","incidentdescription":"Bandipur ( On the road between Kdu and Pokhara) poorer areas of the town heavily impacted. (in comments following main post) (HR64) https://www.facebook.com/groups/2327188993/permalink/10152822269553994/","incidentdate":"2015-04-26 09:43:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"269","locationname":"Bandipur (on road between Kdu &amp; Pokhara), Tanahun, Gandaki, Western Region, Nepal","locationlatitude":"27.929172","locationlongitude":"84.396762"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"City/village"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"262","incidenttitle":"Gorkha - people near Thalidada need help","incidentdescription":"Person was stuck in a village between Barpak and Balua in Gorkha region... in the plains. Exact location is near Thalidada village, which is also near to Mandre village. Person has been rescued, but she described area: People are homeless, no food, all houses are destroyed, many are hurt badly, some people died in front of us. (HR60) https://www.facebook.com/confessionofnepaliteenagers/photos/a.587756164672973.1073741829.507013516080572/782475165201071/?type=1","incidentdate":"2015-04-26 09:30:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"267","locationname":"Gorkha District Hospital, Gorkha-Ghyampesal Road, Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"27.994658","locationlongitude":"84.628128"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"259","incidenttitle":"Gorkha - remote villages need help","incidentdescription":"Villages in remote parts of Gorkha have catastrophic damage and no access to medical help. Areas are inaccessible due to destroyed roads. Several villages on hills completely fell off. Villagers are stranded and need medical help, food, water, shelter, and search and rescue help. People are still trapped. (HR59)","incidentdate":"2015-04-26 09:26:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"264","locationname":"Gorkha District Hospital, Gorkha-Ghyampesal Road, Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"27.994658","locationlongitude":"84.628128"},"categories":[{"category":{"id":13,"title":"People Trapped"}},{"category":{"id":14,"title":"Blocked Roads"}},{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"288","incidenttitle":"Lalitpur - food,water &amp; medical supplies needed","incidentdescription":"https://twitter.com/XMagar/status/592311934642360320\nNear chyasal,lalitpur.People need food, water and medicine one of them'v low pressure.\n(HR58,r60)","incidentdate":"2015-04-26 05:59:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"293","locationname":"IBahi, Karuna Bahi, nhulaan, Kumbheshwore Temple Complex, Patan Durbar Square, Lalitpur Municipality, Lalitpur, Bagmati, Central Development Region, 44700, Nepal","locationlatitude":"27.676749","locationlongitude":"85.327833"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"City/village"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"688","incidenttitle":"Thahity Tole: Thamel- Kathmandu :food required","incidentdescription":"From Ayon -\nAbout 100 people in thaiti, in Kathmandu don't have food call 9818272055, 9841782909 #act4quake #Kathmanduquake #Nepalquake\n\nhttps://twitter.com/AyonNepal/status/592221989311393792\n\nHR103","incidentdate":"2015-04-26 00:01:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"700","locationname":"Thahity Tole, Thamel, Kathmandu, Nepal","locationlatitude":"27.711311","locationlongitude":"85.31175"},"categories":[{"category":{"id":28,"title":"Food/Water"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"Exact location"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"9818272055"}}},{"incident":{"incidentid":"290","incidenttitle":"Gorkha - rescue team needed","incidentdescription":"http://www.saurpani.org/death-toll-in-saurpani-gorkha-nepalquake-rises-to-m…escue-team-can-not-reach-there-because-of-landslide-and-heavy-rain/\nDeath toll in #Saurpani #Gorkha #NepalQuake rises to more than 20 : rescue team can not reach there because of landslide and heavy rain.\n(HR80,r82)","incidentdate":"2015-04-26 00:00:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"295","locationname":"Jiwādanda, Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"28.119934","locationlongitude":"84.711449"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"VDC"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"293","incidenttitle":"Rautahat District (Gaur) - shelter needed","incidentdescription":"https://www.facebook.com/navaraj.adhikari.526/posts/10153343897366694?pnref=story\nPls help us with some tents at madanpur-3, 4 n 5. Otherwise we a lot of ppl will die. Pls share this message.\n(HR81,r83)","incidentdate":"2015-04-25 14:42:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"298","locationname":"Madanpur 3,4 &amp; 5. Blacksmith, Pasang Lhamu Highway, Lauke, Nuwakot, Bagmati, Central Development Region, Nepal","locationlatitude":"27.858985","locationlongitude":"85.183909"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"VDC"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"257","incidenttitle":"Gorkha - 80% of some places destroyed","incidentdescription":"\"Upto 80% of some places in #Gorkha have been flattened by the quake, search &amp; rescue &amp; medical aid urgently needed,\" CDO tells #BBC","incidentdate":"2015-04-25 11:44:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"262","locationname":"Gorkha District Hospital, Gorkha-Ghyampesal Road, Gorkha, Gandaki, Western Region, Nepal","locationlatitude":"27.994658","locationlongitude":"84.628128"},"categories":[{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"284","incidenttitle":"Khumbu (Everest Region) - rescue needed","incidentdescription":"https://twitter.com/NorthmenPK/status/592213918291886080\n#Everest 2 sherpas descended to BC through ice fall, they could here voices of climbers stranded beneath snow, need help. #NepalQuake\n(HR56,r58)","incidentdate":"2015-04-25 11:29:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"289","locationname":"Mount Everest (Southeast Ridge, Solukhumbu, Sagarmatha, Eastern Development Region, Nepal)","locationlatitude":"27.983444","locationlongitude":"86.925985"},"categories":[{"category":{"id":13,"title":"People Trapped"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"Region"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"256","incidenttitle":"Gorkha - rescue help needed","incidentdescription":"According to Gorkha Police District Office - 94 died so far in Gorkha. Rescue is going on but need more Manpower for Rescue","incidentdate":"2015-04-25 10:13:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"261","locationname":"Gorkha District, Gandaki, Western Region, Nepal","locationlatitude":"27.994658","locationlongitude":"84.628128"},"categories":[{"category":{"id":13,"title":"People Trapped"}},{"category":{"id":2,"title":"Help Wanted"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"District"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}},{"incident":{"incidentid":"207","incidenttitle":"Kathmandu - People trapped in Bijeshwori bridge","incidentdescription":"People trapped in Bijeshwori bridge near Thamel\nRescuer needed. https://twitter.com/Lacoul/status/592127679937323008 \n\nHR52","incidentdate":"2015-04-25 01:28:00","incidentmode":"1","incidentactive":"1","incidentverified":"0","locationid":"210","locationname":"Indraini Temple, Indrayeni Ghat, Bangemudha, Nayabazar, Gorkha, Kathmandu, Bagmati, Central Development Region, 8061, Nepal","locationlatitude":"27.713995","locationlongitude":"85.302626"},"categories":[{"category":{"id":13,"title":"People Trapped"}}],"media":[],"comments":[],"customfields":{"1":{"field_id":"1","form_id":"1","field_name":"Location Accuracy","field_type":"7","field_default":"Ward, VDC, Municipality, City/village, District, Region, Exact location, 100m, 500m, 1km, 5km, 50km, Other","field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":"Exact location"},"2":{"field_id":"2","form_id":"1","field_name":"Phone Number","field_type":"1","field_default":null,"field_required":"0","field_maxlength":"0","field_height":"5","field_width":"0","field_isdate":"0","field_ispublic_visible":"0","field_ispublic_submit":"0","field_response":""}}}]},"error":{"code":"0","message":"No Error"}};
defer.resolve(datajson);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment