{"action":"created","comment":{"url":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments/39011164","id":39011164,"diff_hunk":"@@ -0,0 +1,105 @@\n+# coding=utf-8\n+\"\"\"InaSAFE Disaster risk tool by Australian Aid - ITB Earthquake\n+Impact Function on Population based on a Bayesian approach.\n+\n+Contact : dynaryu@gmail.com\n+\n+.. note:: This program is free software; you can redistribute it and/or modify\n+     it under the terms of the GNU General Public License as published by\n+     the Free Software Foundation; either version 2 of the License, or\n+     (at your option) any later version.\n+\n+\"\"\"\n+\n+__author__ = 'dynaryu@gmail.com'\n+__date__ = '09/09/15'\n+__revision__ = '$Format:%H$'\n+__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '\n+                 'Disaster Reduction')\n+\n+import numpy\n+import os\n+import inspect\n+\n+from safe.common.utilities import OrderedDict\n+from safe.impact_functions.earthquake.\\\n+    itb_earthquake_fatality_model.impact_function import ITBFatalityFunction\n+from safe.impact_functions.earthquake\\\n+    .itb_bayesian_earthquake_fatality_model.metadata_definitions import \\\n+    ITBBayesianFatalityMetadata\n+\n+\n+class ITBBayesianFatalityFunction(ITBFatalityFunction):\n+    # noinspection PyUnresolvedReferences\n+    \"\"\" ITB fatality model based on a Bayesian approach\n+","path":"safe/impact_functions/earthquake/itb_bayesian_earthquake_fatality_model/impact_function.py","position":35,"original_position":35,"commit_id":"a58dda65c77eb6d792690f4f481e5fcb3fa166d2","original_commit_id":"90c718b5f06dd9041056ecdc58c93d71211af099","user":{"login":"timlinux","id":178003,"avatar_url":"https://avatars.githubusercontent.com/u/178003?v=3","gravatar_id":"","url":"https://api.github.com/users/timlinux","html_url":"https://github.com/timlinux","followers_url":"https://api.github.com/users/timlinux/followers","following_url":"https://api.github.com/users/timlinux/following{/other_user}","gists_url":"https://api.github.com/users/timlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/timlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timlinux/subscriptions","organizations_url":"https://api.github.com/users/timlinux/orgs","repos_url":"https://api.github.com/users/timlinux/repos","events_url":"https://api.github.com/users/timlinux/events{/privacy}","received_events_url":"https://api.github.com/users/timlinux/received_events","type":"User","site_admin":false},"body":".. versionadded:: 3.3","created_at":"2015-09-09T06:37:04Z","updated_at":"2015-09-09T06:37:04Z","html_url":"https://github.com/AIFDR/inasafe/pull/2350#discussion_r39011164","pull_request_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350","_links":{"self":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments/39011164"},"html":{"href":"https://github.com/AIFDR/inasafe/pull/2350#discussion_r39011164"},"pull_request":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350"}}},"pull_request":{"url":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350","id":44510567,"html_url":"https://github.com/AIFDR/inasafe/pull/2350","diff_url":"https://github.com/AIFDR/inasafe/pull/2350.diff","patch_url":"https://github.com/AIFDR/inasafe/pull/2350.patch","issue_url":"https://api.github.com/repos/AIFDR/inasafe/issues/2350","number":2350,"state":"open","locked":false,"title":"add ITB fatality model based on a Bayesian approach","user":{"login":"dynaryu","id":1694835,"avatar_url":"https://avatars.githubusercontent.com/u/1694835?v=3","gravatar_id":"","url":"https://api.github.com/users/dynaryu","html_url":"https://github.com/dynaryu","followers_url":"https://api.github.com/users/dynaryu/followers","following_url":"https://api.github.com/users/dynaryu/following{/other_user}","gists_url":"https://api.github.com/users/dynaryu/gists{/gist_id}","starred_url":"https://api.github.com/users/dynaryu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynaryu/subscriptions","organizations_url":"https://api.github.com/users/dynaryu/orgs","repos_url":"https://api.github.com/users/dynaryu/repos","events_url":"https://api.github.com/users/dynaryu/events{/privacy}","received_events_url":"https://api.github.com/users/dynaryu/received_events","type":"User","site_admin":false},"body":"Both the PAGER and ITB Bayesian fatality model can provide the probability of fatality in magnitude bin as the USGS Pager does.\r\n","created_at":"2015-09-09T04:54:55Z","updated_at":"2015-09-09T06:37:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"940d53a9f8557b8169cc4d02843706c6d6e55175","assignee":{"login":"timlinux","id":178003,"avatar_url":"https://avatars.githubusercontent.com/u/178003?v=3","gravatar_id":"","url":"https://api.github.com/users/timlinux","html_url":"https://github.com/timlinux","followers_url":"https://api.github.com/users/timlinux/followers","following_url":"https://api.github.com/users/timlinux/following{/other_user}","gists_url":"https://api.github.com/users/timlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/timlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timlinux/subscriptions","organizations_url":"https://api.github.com/users/timlinux/orgs","repos_url":"https://api.github.com/users/timlinux/repos","events_url":"https://api.github.com/users/timlinux/events{/privacy}","received_events_url":"https://api.github.com/users/timlinux/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350/commits","review_comments_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350/comments","review_comment_url":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AIFDR/inasafe/issues/2350/comments","statuses_url":"https://api.github.com/repos/AIFDR/inasafe/statuses/a58dda65c77eb6d792690f4f481e5fcb3fa166d2","head":{"label":"dynaryu:develop","ref":"develop","sha":"a58dda65c77eb6d792690f4f481e5fcb3fa166d2","user":{"login":"dynaryu","id":1694835,"avatar_url":"https://avatars.githubusercontent.com/u/1694835?v=3","gravatar_id":"","url":"https://api.github.com/users/dynaryu","html_url":"https://github.com/dynaryu","followers_url":"https://api.github.com/users/dynaryu/followers","following_url":"https://api.github.com/users/dynaryu/following{/other_user}","gists_url":"https://api.github.com/users/dynaryu/gists{/gist_id}","starred_url":"https://api.github.com/users/dynaryu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynaryu/subscriptions","organizations_url":"https://api.github.com/users/dynaryu/orgs","repos_url":"https://api.github.com/users/dynaryu/repos","events_url":"https://api.github.com/users/dynaryu/events{/privacy}","received_events_url":"https://api.github.com/users/dynaryu/received_events","type":"User","site_admin":false},"repo":{"id":35466543,"name":"inasafe","full_name":"dynaryu/inasafe","owner":{"login":"dynaryu","id":1694835,"avatar_url":"https://avatars.githubusercontent.com/u/1694835?v=3","gravatar_id":"","url":"https://api.github.com/users/dynaryu","html_url":"https://github.com/dynaryu","followers_url":"https://api.github.com/users/dynaryu/followers","following_url":"https://api.github.com/users/dynaryu/following{/other_user}","gists_url":"https://api.github.com/users/dynaryu/gists{/gist_id}","starred_url":"https://api.github.com/users/dynaryu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynaryu/subscriptions","organizations_url":"https://api.github.com/users/dynaryu/orgs","repos_url":"https://api.github.com/users/dynaryu/repos","events_url":"https://api.github.com/users/dynaryu/events{/privacy}","received_events_url":"https://api.github.com/users/dynaryu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dynaryu/inasafe","description":"InaSAFE - QGIS plugin for estimating impact from natural disasters","fork":true,"url":"https://api.github.com/repos/dynaryu/inasafe","forks_url":"https://api.github.com/repos/dynaryu/inasafe/forks","keys_url":"https://api.github.com/repos/dynaryu/inasafe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dynaryu/inasafe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dynaryu/inasafe/teams","hooks_url":"https://api.github.com/repos/dynaryu/inasafe/hooks","issue_events_url":"https://api.github.com/repos/dynaryu/inasafe/issues/events{/number}","events_url":"https://api.github.com/repos/dynaryu/inasafe/events","assignees_url":"https://api.github.com/repos/dynaryu/inasafe/assignees{/user}","branches_url":"https://api.github.com/repos/dynaryu/inasafe/branches{/branch}","tags_url":"https://api.github.com/repos/dynaryu/inasafe/tags","blobs_url":"https://api.github.com/repos/dynaryu/inasafe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dynaryu/inasafe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dynaryu/inasafe/git/refs{/sha}","trees_url":"https://api.github.com/repos/dynaryu/inasafe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dynaryu/inasafe/statuses/{sha}","languages_url":"https://api.github.com/repos/dynaryu/inasafe/languages","stargazers_url":"https://api.github.com/repos/dynaryu/inasafe/stargazers","contributors_url":"https://api.github.com/repos/dynaryu/inasafe/contributors","subscribers_url":"https://api.github.com/repos/dynaryu/inasafe/subscribers","subscription_url":"https://api.github.com/repos/dynaryu/inasafe/subscription","commits_url":"https://api.github.com/repos/dynaryu/inasafe/commits{/sha}","git_commits_url":"https://api.github.com/repos/dynaryu/inasafe/git/commits{/sha}","comments_url":"https://api.github.com/repos/dynaryu/inasafe/comments{/number}","issue_comment_url":"https://api.github.com/repos/dynaryu/inasafe/issues/comments{/number}","contents_url":"https://api.github.com/repos/dynaryu/inasafe/contents/{+path}","compare_url":"https://api.github.com/repos/dynaryu/inasafe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dynaryu/inasafe/merges","archive_url":"https://api.github.com/repos/dynaryu/inasafe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dynaryu/inasafe/downloads","issues_url":"https://api.github.com/repos/dynaryu/inasafe/issues{/number}","pulls_url":"https://api.github.com/repos/dynaryu/inasafe/pulls{/number}","milestones_url":"https://api.github.com/repos/dynaryu/inasafe/milestones{/number}","notifications_url":"https://api.github.com/repos/dynaryu/inasafe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dynaryu/inasafe/labels{/name}","releases_url":"https://api.github.com/repos/dynaryu/inasafe/releases{/id}","created_at":"2015-05-12T04:20:54Z","updated_at":"2015-05-12T04:20:57Z","pushed_at":"2015-09-09T06:36:45Z","git_url":"git://github.com/dynaryu/inasafe.git","ssh_url":"git@github.com:dynaryu/inasafe.git","clone_url":"https://github.com/dynaryu/inasafe.git","svn_url":"https://github.com/dynaryu/inasafe","homepage":"www.inasafe.org","size":138976,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"AIFDR:develop","ref":"develop","sha":"7d889134c18543f17deb83703653150299443c75","user":{"login":"AIFDR","id":582004,"avatar_url":"https://avatars.githubusercontent.com/u/582004?v=3","gravatar_id":"","url":"https://api.github.com/users/AIFDR","html_url":"https://github.com/AIFDR","followers_url":"https://api.github.com/users/AIFDR/followers","following_url":"https://api.github.com/users/AIFDR/following{/other_user}","gists_url":"https://api.github.com/users/AIFDR/gists{/gist_id}","starred_url":"https://api.github.com/users/AIFDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIFDR/subscriptions","organizations_url":"https://api.github.com/users/AIFDR/orgs","repos_url":"https://api.github.com/users/AIFDR/repos","events_url":"https://api.github.com/users/AIFDR/events{/privacy}","received_events_url":"https://api.github.com/users/AIFDR/received_events","type":"Organization","site_admin":false},"repo":{"id":3135721,"name":"inasafe","full_name":"AIFDR/inasafe","owner":{"login":"AIFDR","id":582004,"avatar_url":"https://avatars.githubusercontent.com/u/582004?v=3","gravatar_id":"","url":"https://api.github.com/users/AIFDR","html_url":"https://github.com/AIFDR","followers_url":"https://api.github.com/users/AIFDR/followers","following_url":"https://api.github.com/users/AIFDR/following{/other_user}","gists_url":"https://api.github.com/users/AIFDR/gists{/gist_id}","starred_url":"https://api.github.com/users/AIFDR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AIFDR/subscriptions","organizations_url":"https://api.github.com/users/AIFDR/orgs","repos_url":"https://api.github.com/users/AIFDR/repos","events_url":"https://api.github.com/users/AIFDR/events{/privacy}","received_events_url":"https://api.github.com/users/AIFDR/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AIFDR/inasafe","description":"InaSAFE - QGIS plugin for estimating impact from natural disasters","fork":false,"url":"https://api.github.com/repos/AIFDR/inasafe","forks_url":"https://api.github.com/repos/AIFDR/inasafe/forks","keys_url":"https://api.github.com/repos/AIFDR/inasafe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AIFDR/inasafe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AIFDR/inasafe/teams","hooks_url":"https://api.github.com/repos/AIFDR/inasafe/hooks","issue_events_url":"https://api.github.com/repos/AIFDR/inasafe/issues/events{/number}","events_url":"https://api.github.com/repos/AIFDR/inasafe/events","assignees_url":"https://api.github.com/repos/AIFDR/inasafe/assignees{/user}","branches_url":"https://api.github.com/repos/AIFDR/inasafe/branches{/branch}","tags_url":"https://api.github.com/repos/AIFDR/inasafe/tags","blobs_url":"https://api.github.com/repos/AIFDR/inasafe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AIFDR/inasafe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AIFDR/inasafe/git/refs{/sha}","trees_url":"https://api.github.com/repos/AIFDR/inasafe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AIFDR/inasafe/statuses/{sha}","languages_url":"https://api.github.com/repos/AIFDR/inasafe/languages","stargazers_url":"https://api.github.com/repos/AIFDR/inasafe/stargazers","contributors_url":"https://api.github.com/repos/AIFDR/inasafe/contributors","subscribers_url":"https://api.github.com/repos/AIFDR/inasafe/subscribers","subscription_url":"https://api.github.com/repos/AIFDR/inasafe/subscription","commits_url":"https://api.github.com/repos/AIFDR/inasafe/commits{/sha}","git_commits_url":"https://api.github.com/repos/AIFDR/inasafe/git/commits{/sha}","comments_url":"https://api.github.com/repos/AIFDR/inasafe/comments{/number}","issue_comment_url":"https://api.github.com/repos/AIFDR/inasafe/issues/comments{/number}","contents_url":"https://api.github.com/repos/AIFDR/inasafe/contents/{+path}","compare_url":"https://api.github.com/repos/AIFDR/inasafe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AIFDR/inasafe/merges","archive_url":"https://api.github.com/repos/AIFDR/inasafe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AIFDR/inasafe/downloads","issues_url":"https://api.github.com/repos/AIFDR/inasafe/issues{/number}","pulls_url":"https://api.github.com/repos/AIFDR/inasafe/pulls{/number}","milestones_url":"https://api.github.com/repos/AIFDR/inasafe/milestones{/number}","notifications_url":"https://api.github.com/repos/AIFDR/inasafe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AIFDR/inasafe/labels{/name}","releases_url":"https://api.github.com/repos/AIFDR/inasafe/releases{/id}","created_at":"2012-01-09T10:34:29Z","updated_at":"2015-09-01T14:47:06Z","pushed_at":"2015-09-09T06:36:46Z","git_url":"git://github.com/AIFDR/inasafe.git","ssh_url":"git@github.com:AIFDR/inasafe.git","clone_url":"https://github.com/AIFDR/inasafe.git","svn_url":"https://github.com/AIFDR/inasafe","homepage":"www.inasafe.org","size":164663,"stargazers_count":74,"watchers_count":74,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"open_issues_count":251,"forks":77,"open_issues":251,"watchers":74,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350"},"html":{"href":"https://github.com/AIFDR/inasafe/pull/2350"},"issue":{"href":"https://api.github.com/repos/AIFDR/inasafe/issues/2350"},"comments":{"href":"https://api.github.com/repos/AIFDR/inasafe/issues/2350/comments"},"review_comments":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350/comments"},"review_comment":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AIFDR/inasafe/pulls/2350/commits"},"statuses":{"href":"https://api.github.com/repos/AIFDR/inasafe/statuses/a58dda65c77eb6d792690f4f481e5fcb3fa166d2"}}}}