{"action":"created","comment":{"url":"https://api.github.com/repos/Code4SA/municipal-data/pulls/comments/60536848","id":60536848,"diff_hunk":"@@ -0,0 +1,19 @@\n+from wazimap.geo import GeoData as GeoDataBase\n+\n+\n+class GeoData(GeoDataBase):\n+    LEVELS = ['municipality', 'district']\n+\n+    def get_locations(self, search_term, levels=None, year=None):\n+        # ensure we're limiting levels\n+        if not levels:\n+            levels = self.LEVELS\n+        else:\n+            levels = set(levels) & set(self.LEVELS)\n+        levels = ','.join(levels)\n+\n+        return super(GeoData, self).get_locations(search_term, levels, year)\n+","path":"municipal_finance/geo.py","position":null,"original_position":16,"commit_id":"6e52441fd1b1553da34c8a71f65c60a764a29047","original_commit_id":"03097ea706d99cc5b731de36453b18c68bf1bbf5","user":{"login":"xybrnet","id":11753432,"avatar_url":"https://avatars.githubusercontent.com/u/11753432?v=3","gravatar_id":"","url":"https://api.github.com/users/xybrnet","html_url":"https://github.com/xybrnet","followers_url":"https://api.github.com/users/xybrnet/followers","following_url":"https://api.github.com/users/xybrnet/following{/other_user}","gists_url":"https://api.github.com/users/xybrnet/gists{/gist_id}","starred_url":"https://api.github.com/users/xybrnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xybrnet/subscriptions","organizations_url":"https://api.github.com/users/xybrnet/orgs","repos_url":"https://api.github.com/users/xybrnet/repos","events_url":"https://api.github.com/users/xybrnet/events{/privacy}","received_events_url":"https://api.github.com/users/xybrnet/received_events","type":"User","site_admin":false},"body":"Nice.","created_at":"2016-04-21T07:32:43Z","updated_at":"2016-04-21T07:32:43Z","html_url":"https://github.com/Code4SA/municipal-data/pull/21#discussion_r60536848","pull_request_url":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/Code4SA/municipal-data/pulls/comments/60536848"},"html":{"href":"https://github.com/Code4SA/municipal-data/pull/21#discussion_r60536848"},"pull_request":{"href":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21","id":67197087,"html_url":"https://github.com/Code4SA/municipal-data/pull/21","diff_url":"https://github.com/Code4SA/municipal-data/pull/21.diff","patch_url":"https://github.com/Code4SA/municipal-data/pull/21.patch","issue_url":"https://api.github.com/repos/Code4SA/municipal-data/issues/21","number":21,"state":"open","locked":false,"title":"Use mapit, pull in geographies","user":{"login":"longhotsummer","id":4178542,"avatar_url":"https://avatars.githubusercontent.com/u/4178542?v=3","gravatar_id":"","url":"https://api.github.com/users/longhotsummer","html_url":"https://github.com/longhotsummer","followers_url":"https://api.github.com/users/longhotsummer/followers","following_url":"https://api.github.com/users/longhotsummer/following{/other_user}","gists_url":"https://api.github.com/users/longhotsummer/gists{/gist_id}","starred_url":"https://api.github.com/users/longhotsummer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/longhotsummer/subscriptions","organizations_url":"https://api.github.com/users/longhotsummer/orgs","repos_url":"https://api.github.com/users/longhotsummer/repos","events_url":"https://api.github.com/users/longhotsummer/events{/privacy}","received_events_url":"https://api.github.com/users/longhotsummer/received_events","type":"User","site_admin":false},"body":"This has basic geo info for country, province, municipalities (local + metro) and district.\r\n\r\n@xybrnet ","created_at":"2016-04-20T14:30:58Z","updated_at":"2016-04-21T07:32:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04df82e23f47184d450deeb6b61ff0f9a6253324","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21/commits","review_comments_url":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21/comments","review_comment_url":"https://api.github.com/repos/Code4SA/municipal-data/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Code4SA/municipal-data/issues/21/comments","statuses_url":"https://api.github.com/repos/Code4SA/municipal-data/statuses/6e52441fd1b1553da34c8a71f65c60a764a29047","head":{"label":"Code4SA:geos","ref":"geos","sha":"6e52441fd1b1553da34c8a71f65c60a764a29047","user":{"login":"Code4SA","id":4387576,"avatar_url":"https://avatars.githubusercontent.com/u/4387576?v=3","gravatar_id":"","url":"https://api.github.com/users/Code4SA","html_url":"https://github.com/Code4SA","followers_url":"https://api.github.com/users/Code4SA/followers","following_url":"https://api.github.com/users/Code4SA/following{/other_user}","gists_url":"https://api.github.com/users/Code4SA/gists{/gist_id}","starred_url":"https://api.github.com/users/Code4SA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code4SA/subscriptions","organizations_url":"https://api.github.com/users/Code4SA/orgs","repos_url":"https://api.github.com/users/Code4SA/repos","events_url":"https://api.github.com/users/Code4SA/events{/privacy}","received_events_url":"https://api.github.com/users/Code4SA/received_events","type":"Organization","site_admin":false},"repo":{"id":55236579,"name":"municipal-data","full_name":"Code4SA/municipal-data","owner":{"login":"Code4SA","id":4387576,"avatar_url":"https://avatars.githubusercontent.com/u/4387576?v=3","gravatar_id":"","url":"https://api.github.com/users/Code4SA","html_url":"https://github.com/Code4SA","followers_url":"https://api.github.com/users/Code4SA/followers","following_url":"https://api.github.com/users/Code4SA/following{/other_user}","gists_url":"https://api.github.com/users/Code4SA/gists{/gist_id}","starred_url":"https://api.github.com/users/Code4SA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code4SA/subscriptions","organizations_url":"https://api.github.com/users/Code4SA/orgs","repos_url":"https://api.github.com/users/Code4SA/repos","events_url":"https://api.github.com/users/Code4SA/events{/privacy}","received_events_url":"https://api.github.com/users/Code4SA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Code4SA/municipal-data","description":"","fork":false,"url":"https://api.github.com/repos/Code4SA/municipal-data","forks_url":"https://api.github.com/repos/Code4SA/municipal-data/forks","keys_url":"https://api.github.com/repos/Code4SA/municipal-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Code4SA/municipal-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Code4SA/municipal-data/teams","hooks_url":"https://api.github.com/repos/Code4SA/municipal-data/hooks","issue_events_url":"https://api.github.com/repos/Code4SA/municipal-data/issues/events{/number}","events_url":"https://api.github.com/repos/Code4SA/municipal-data/events","assignees_url":"https://api.github.com/repos/Code4SA/municipal-data/assignees{/user}","branches_url":"https://api.github.com/repos/Code4SA/municipal-data/branches{/branch}","tags_url":"https://api.github.com/repos/Code4SA/municipal-data/tags","blobs_url":"https://api.github.com/repos/Code4SA/municipal-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Code4SA/municipal-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Code4SA/municipal-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/Code4SA/municipal-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Code4SA/municipal-data/statuses/{sha}","languages_url":"https://api.github.com/repos/Code4SA/municipal-data/languages","stargazers_url":"https://api.github.com/repos/Code4SA/municipal-data/stargazers","contributors_url":"https://api.github.com/repos/Code4SA/municipal-data/contributors","subscribers_url":"https://api.github.com/repos/Code4SA/municipal-data/subscribers","subscription_url":"https://api.github.com/repos/Code4SA/municipal-data/subscription","commits_url":"https://api.github.com/repos/Code4SA/municipal-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/Code4SA/municipal-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/Code4SA/municipal-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/Code4SA/municipal-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/Code4SA/municipal-data/contents/{+path}","compare_url":"https://api.github.com/repos/Code4SA/municipal-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Code4SA/municipal-data/merges","archive_url":"https://api.github.com/repos/Code4SA/municipal-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Code4SA/municipal-data/downloads","issues_url":"https://api.github.com/repos/Code4SA/municipal-data/issues{/number}","pulls_url":"https://api.github.com/repos/Code4SA/municipal-data/pulls{/number}","milestones_url":"https://api.github.com/repos/Code4SA/municipal-data/milestones{/number}","notifications_url":"https://api.github.com/repos/Code4SA/municipal-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Code4SA/municipal-data/labels{/name}","releases_url":"https://api.github.com/repos/Code4SA/municipal-data/releases{/id}","deployments_url":"https://api.github.com/repos/Code4SA/municipal-data/deployments","created_at":"2016-04-01T14:01:37Z","updated_at":"2016-04-18T09:03:01Z","pushed_at":"2016-04-20T14:30:58Z","git_url":"git://github.com/Code4SA/municipal-data.git","ssh_url":"git@github.com:Code4SA/municipal-data.git","clone_url":"https://github.com/Code4SA/municipal-data.git","svn_url":"https://github.com/Code4SA/municipal-data","homepage":"http://data.municipalmoney.org.za/","size":3029,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Code4SA:wazimap","ref":"wazimap","sha":"b2c094405a56c943299b93eeed786bc92f7fcedc","user":{"login":"Code4SA","id":4387576,"avatar_url":"https://avatars.githubusercontent.com/u/4387576?v=3","gravatar_id":"","url":"https://api.github.com/users/Code4SA","html_url":"https://github.com/Code4SA","followers_url":"https://api.github.com/users/Code4SA/followers","following_url":"https://api.github.com/users/Code4SA/following{/other_user}","gists_url":"https://api.github.com/users/Code4SA/gists{/gist_id}","starred_url":"https://api.github.com/users/Code4SA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code4SA/subscriptions","organizations_url":"https://api.github.com/users/Code4SA/orgs","repos_url":"https://api.github.com/users/Code4SA/repos","events_url":"https://api.github.com/users/Code4SA/events{/privacy}","received_events_url":"https://api.github.com/users/Code4SA/received_events","type":"Organization","site_admin":false},"repo":{"id":55236579,"name":"municipal-data","full_name":"Code4SA/municipal-data","owner":{"login":"Code4SA","id":4387576,"avatar_url":"https://avatars.githubusercontent.com/u/4387576?v=3","gravatar_id":"","url":"https://api.github.com/users/Code4SA","html_url":"https://github.com/Code4SA","followers_url":"https://api.github.com/users/Code4SA/followers","following_url":"https://api.github.com/users/Code4SA/following{/other_user}","gists_url":"https://api.github.com/users/Code4SA/gists{/gist_id}","starred_url":"https://api.github.com/users/Code4SA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code4SA/subscriptions","organizations_url":"https://api.github.com/users/Code4SA/orgs","repos_url":"https://api.github.com/users/Code4SA/repos","events_url":"https://api.github.com/users/Code4SA/events{/privacy}","received_events_url":"https://api.github.com/users/Code4SA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Code4SA/municipal-data","description":"","fork":false,"url":"https://api.github.com/repos/Code4SA/municipal-data","forks_url":"https://api.github.com/repos/Code4SA/municipal-data/forks","keys_url":"https://api.github.com/repos/Code4SA/municipal-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Code4SA/municipal-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Code4SA/municipal-data/teams","hooks_url":"https://api.github.com/repos/Code4SA/municipal-data/hooks","issue_events_url":"https://api.github.com/repos/Code4SA/municipal-data/issues/events{/number}","events_url":"https://api.github.com/repos/Code4SA/municipal-data/events","assignees_url":"https://api.github.com/repos/Code4SA/municipal-data/assignees{/user}","branches_url":"https://api.github.com/repos/Code4SA/municipal-data/branches{/branch}","tags_url":"https://api.github.com/repos/Code4SA/municipal-data/tags","blobs_url":"https://api.github.com/repos/Code4SA/municipal-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Code4SA/municipal-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Code4SA/municipal-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/Code4SA/municipal-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Code4SA/municipal-data/statuses/{sha}","languages_url":"https://api.github.com/repos/Code4SA/municipal-data/languages","stargazers_url":"https://api.github.com/repos/Code4SA/municipal-data/stargazers","contributors_url":"https://api.github.com/repos/Code4SA/municipal-data/contributors","subscribers_url":"https://api.github.com/repos/Code4SA/municipal-data/subscribers","subscription_url":"https://api.github.com/repos/Code4SA/municipal-data/subscription","commits_url":"https://api.github.com/repos/Code4SA/municipal-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/Code4SA/municipal-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/Code4SA/municipal-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/Code4SA/municipal-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/Code4SA/municipal-data/contents/{+path}","compare_url":"https://api.github.com/repos/Code4SA/municipal-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Code4SA/municipal-data/merges","archive_url":"https://api.github.com/repos/Code4SA/municipal-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Code4SA/municipal-data/downloads","issues_url":"https://api.github.com/repos/Code4SA/municipal-data/issues{/number}","pulls_url":"https://api.github.com/repos/Code4SA/municipal-data/pulls{/number}","milestones_url":"https://api.github.com/repos/Code4SA/municipal-data/milestones{/number}","notifications_url":"https://api.github.com/repos/Code4SA/municipal-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Code4SA/municipal-data/labels{/name}","releases_url":"https://api.github.com/repos/Code4SA/municipal-data/releases{/id}","deployments_url":"https://api.github.com/repos/Code4SA/municipal-data/deployments","created_at":"2016-04-01T14:01:37Z","updated_at":"2016-04-18T09:03:01Z","pushed_at":"2016-04-20T14:30:58Z","git_url":"git://github.com/Code4SA/municipal-data.git","ssh_url":"git@github.com:Code4SA/municipal-data.git","clone_url":"https://github.com/Code4SA/municipal-data.git","svn_url":"https://github.com/Code4SA/municipal-data","homepage":"http://data.municipalmoney.org.za/","size":3029,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21"},"html":{"href":"https://github.com/Code4SA/municipal-data/pull/21"},"issue":{"href":"https://api.github.com/repos/Code4SA/municipal-data/issues/21"},"comments":{"href":"https://api.github.com/repos/Code4SA/municipal-data/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/Code4SA/municipal-data/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Code4SA/municipal-data/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/Code4SA/municipal-data/statuses/6e52441fd1b1553da34c8a71f65c60a764a29047"}}}}