{"action":"created","comment":{"url":"https://api.github.com/repos/python-visualization/folium/pulls/comments/195610842","pull_request_review_id":129015998,"id":195610842,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTYxMDg0Mg==","diff_hunk":"@@ -652,6 +674,63 @@ def __init__(self, html=None, icon_size=None, icon_anchor=None,\n         self.className = class_name\n \n \n+class Tooltip:\n+    \"\"\"\n+Creates a Tooltip object for adding to features to display text as a property a Map by executing a javascript function when hovering the cursor over each feature.\n+\n+Parameters\n+----------\n+    fields: list or tuple.\n+        list or tuple of labels of the GeoJson 'properties' or GeoPandas GeodataFrame columns you'd like to display.\n+    aliases: list or tuple \n+        list or tuple of optional 'aliases' you'd like to display the each field name as, to describe the data in the tooltip.\n+        *Must consist of strings, and be of the same length as fields.\n+    text: str\n+        Pass the same string as a tooltip for every value in the GeoJson object, I.e. \"Click for more info.\"\n+        *May not be passed if fields is not None\n+    labels: boolean True or False\n+        True or False value indicating if you'd like the the field names or aliases to display to the left of the value, in bold.\n+        *Defaults to True.\n+    sticky: boolean True or False\n+        True or False value indicating if you'd like the tooltip to 'sticky' with the mouse cursor as it moves.\n+        *If False, the tooltip will place statically in the centroid of the feature.\n+        *Defaults to True\n+    toLocaleString: boolean True or False\n+        This will use JavaScript's .toLocaleString() to format 'clean' values as strings for the user's location; i.e. 1,000,000.00 comma separators, float truncation for the US, etc.\n+        *Available for most of JavaScript's primitive types (any data you'll serve into the template)\n+\n+Examples\n+--------\n+# Provide fields and aliases\n+>>> Tooltip(fields=['CNTY_NM','census-pop-2015','census-md-income-2015'], aliases=['County','2015 Census Population','2015 Median Income'], labels=True, sticky=False, toLocaleString=True)\n+# Provide fields, with labels off, and sticky True.\n+>>> Tooltip(fields=('CNTY_NM',), labels=False, sticky=True)\n+# Provide only text.\n+>>> Tooltip(text=\"Click for more info.\", sticky=True)\n+\"\"\"\n+    def __init__(self, fields=None, text=None, aliases=None, labels=True, sticky=True, toLocaleString=False):\n+        if fields:\n+            assert isinstance(fields, (list, tuple)), \"Please pass a list or tuple to Fields.\"\n+        if bool(fields) & bool(aliases):\n+            assert isinstance(aliases,(list,tuple))\n+            assert len(fields)==len(aliases), \"Fields and Aliases must have the same length.\"\n+        assert isinstance(labels,bool), \"This field requires a boolean True or False value.\"\n+        assert isinstance(sticky,bool), \"This field requires a boolean True or False value.\"\n+        assert not all((fields,text)), \"Please choose either fields or text.\"\n+        assert any((fields,text)), \"Please choose either fields or text.\"","path":"folium/features.py","position":86,"original_position":86,"commit_id":"287ac3685622644bf35ac7f4e571801612b54c52","original_commit_id":"287ac3685622644bf35ac7f4e571801612b54c52","user":{"login":"stickler-ci","id":16011037,"node_id":"MDQ6VXNlcjE2MDExMDM3","avatar_url":"https://avatars3.githubusercontent.com/u/16011037?v=4","gravatar_id":"","url":"https://api.github.com/users/stickler-ci","html_url":"https://github.com/stickler-ci","followers_url":"https://api.github.com/users/stickler-ci/followers","following_url":"https://api.github.com/users/stickler-ci/following{/other_user}","gists_url":"https://api.github.com/users/stickler-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/stickler-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickler-ci/subscriptions","organizations_url":"https://api.github.com/users/stickler-ci/orgs","repos_url":"https://api.github.com/users/stickler-ci/repos","events_url":"https://api.github.com/users/stickler-ci/events{/privacy}","received_events_url":"https://api.github.com/users/stickler-ci/received_events","type":"User","site_admin":false},"body":"E231 missing whitespace after ','","created_at":"2018-06-15T00:50:27Z","updated_at":"2018-06-15T00:50:29Z","html_url":"https://github.com/python-visualization/folium/pull/883#discussion_r195610842","pull_request_url":"https://api.github.com/repos/python-visualization/folium/pulls/883","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/python-visualization/folium/pulls/comments/195610842"},"html":{"href":"https://github.com/python-visualization/folium/pull/883#discussion_r195610842"},"pull_request":{"href":"https://api.github.com/repos/python-visualization/folium/pulls/883"}}},"pull_request":{"url":"https://api.github.com/repos/python-visualization/folium/pulls/883","id":195053526,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDUzNTI2","html_url":"https://github.com/python-visualization/folium/pull/883","diff_url":"https://github.com/python-visualization/folium/pull/883.diff","patch_url":"https://github.com/python-visualization/folium/pull/883.patch","issue_url":"https://api.github.com/repos/python-visualization/folium/issues/883","number":883,"state":"open","locked":false,"title":"Update features.py","user":{"login":"jtbaker","id":25542515,"node_id":"MDQ6VXNlcjI1NTQyNTE1","avatar_url":"https://avatars2.githubusercontent.com/u/25542515?v=4","gravatar_id":"","url":"https://api.github.com/users/jtbaker","html_url":"https://github.com/jtbaker","followers_url":"https://api.github.com/users/jtbaker/followers","following_url":"https://api.github.com/users/jtbaker/following{/other_user}","gists_url":"https://api.github.com/users/jtbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/jtbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtbaker/subscriptions","organizations_url":"https://api.github.com/users/jtbaker/orgs","repos_url":"https://api.github.com/users/jtbaker/repos","events_url":"https://api.github.com/users/jtbaker/events{/privacy}","received_events_url":"https://api.github.com/users/jtbaker/received_events","type":"User","site_admin":false},"body":"Added a new Tooltip class to reference GeoJson feature properties, with tests, documentation, and examples. It's flexible, and can take field names, aliases, that can be turned on/off with the 'labels' boolean, a 'sticky' property, and can incorporate Javascript's .toLocaleString() functionality if desired. The same string can be passed for each object with the 'text' variable as well if you'd rather not use the 'fields'.\r\n\r\nAlso updated the GeoJson JS template to reference this Tooltip object, and added a test to make sure that the values passed exist in the properties.","created_at":"2018-06-15T00:50:03Z","updated_at":"2018-06-15T00:50:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69f20bb90a6b6f5523180a6d872d4c9b20f15cdd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/python-visualization/folium/pulls/883/commits","review_comments_url":"https://api.github.com/repos/python-visualization/folium/pulls/883/comments","review_comment_url":"https://api.github.com/repos/python-visualization/folium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python-visualization/folium/issues/883/comments","statuses_url":"https://api.github.com/repos/python-visualization/folium/statuses/287ac3685622644bf35ac7f4e571801612b54c52","head":{"label":"jtbaker:patch-2","ref":"patch-2","sha":"287ac3685622644bf35ac7f4e571801612b54c52","user":{"login":"jtbaker","id":25542515,"node_id":"MDQ6VXNlcjI1NTQyNTE1","avatar_url":"https://avatars2.githubusercontent.com/u/25542515?v=4","gravatar_id":"","url":"https://api.github.com/users/jtbaker","html_url":"https://github.com/jtbaker","followers_url":"https://api.github.com/users/jtbaker/followers","following_url":"https://api.github.com/users/jtbaker/following{/other_user}","gists_url":"https://api.github.com/users/jtbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/jtbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtbaker/subscriptions","organizations_url":"https://api.github.com/users/jtbaker/orgs","repos_url":"https://api.github.com/users/jtbaker/repos","events_url":"https://api.github.com/users/jtbaker/events{/privacy}","received_events_url":"https://api.github.com/users/jtbaker/received_events","type":"User","site_admin":false},"repo":{"id":134014685,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQwMTQ2ODU=","name":"folium","full_name":"jtbaker/folium","owner":{"login":"jtbaker","id":25542515,"node_id":"MDQ6VXNlcjI1NTQyNTE1","avatar_url":"https://avatars2.githubusercontent.com/u/25542515?v=4","gravatar_id":"","url":"https://api.github.com/users/jtbaker","html_url":"https://github.com/jtbaker","followers_url":"https://api.github.com/users/jtbaker/followers","following_url":"https://api.github.com/users/jtbaker/following{/other_user}","gists_url":"https://api.github.com/users/jtbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/jtbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtbaker/subscriptions","organizations_url":"https://api.github.com/users/jtbaker/orgs","repos_url":"https://api.github.com/users/jtbaker/repos","events_url":"https://api.github.com/users/jtbaker/events{/privacy}","received_events_url":"https://api.github.com/users/jtbaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jtbaker/folium","description":"Python Data. Leaflet.js Maps. ","fork":true,"url":"https://api.github.com/repos/jtbaker/folium","forks_url":"https://api.github.com/repos/jtbaker/folium/forks","keys_url":"https://api.github.com/repos/jtbaker/folium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jtbaker/folium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jtbaker/folium/teams","hooks_url":"https://api.github.com/repos/jtbaker/folium/hooks","issue_events_url":"https://api.github.com/repos/jtbaker/folium/issues/events{/number}","events_url":"https://api.github.com/repos/jtbaker/folium/events","assignees_url":"https://api.github.com/repos/jtbaker/folium/assignees{/user}","branches_url":"https://api.github.com/repos/jtbaker/folium/branches{/branch}","tags_url":"https://api.github.com/repos/jtbaker/folium/tags","blobs_url":"https://api.github.com/repos/jtbaker/folium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jtbaker/folium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jtbaker/folium/git/refs{/sha}","trees_url":"https://api.github.com/repos/jtbaker/folium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jtbaker/folium/statuses/{sha}","languages_url":"https://api.github.com/repos/jtbaker/folium/languages","stargazers_url":"https://api.github.com/repos/jtbaker/folium/stargazers","contributors_url":"https://api.github.com/repos/jtbaker/folium/contributors","subscribers_url":"https://api.github.com/repos/jtbaker/folium/subscribers","subscription_url":"https://api.github.com/repos/jtbaker/folium/subscription","commits_url":"https://api.github.com/repos/jtbaker/folium/commits{/sha}","git_commits_url":"https://api.github.com/repos/jtbaker/folium/git/commits{/sha}","comments_url":"https://api.github.com/repos/jtbaker/folium/comments{/number}","issue_comment_url":"https://api.github.com/repos/jtbaker/folium/issues/comments{/number}","contents_url":"https://api.github.com/repos/jtbaker/folium/contents/{+path}","compare_url":"https://api.github.com/repos/jtbaker/folium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jtbaker/folium/merges","archive_url":"https://api.github.com/repos/jtbaker/folium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jtbaker/folium/downloads","issues_url":"https://api.github.com/repos/jtbaker/folium/issues{/number}","pulls_url":"https://api.github.com/repos/jtbaker/folium/pulls{/number}","milestones_url":"https://api.github.com/repos/jtbaker/folium/milestones{/number}","notifications_url":"https://api.github.com/repos/jtbaker/folium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jtbaker/folium/labels{/name}","releases_url":"https://api.github.com/repos/jtbaker/folium/releases{/id}","deployments_url":"https://api.github.com/repos/jtbaker/folium/deployments","created_at":"2018-05-19T00:01:50Z","updated_at":"2018-05-19T00:01:53Z","pushed_at":"2018-06-15T00:49:52Z","git_url":"git://github.com/jtbaker/folium.git","ssh_url":"git@github.com:jtbaker/folium.git","clone_url":"https://github.com/jtbaker/folium.git","svn_url":"https://github.com/jtbaker/folium","homepage":"http://python-visualization.github.io/folium/","size":71890,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"python-visualization:master","ref":"master","sha":"5bcb7b93e57965104d9044355969359c7dd9ec4b","user":{"login":"python-visualization","id":9969242,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NjkyNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/9969242?v=4","gravatar_id":"","url":"https://api.github.com/users/python-visualization","html_url":"https://github.com/python-visualization","followers_url":"https://api.github.com/users/python-visualization/followers","following_url":"https://api.github.com/users/python-visualization/following{/other_user}","gists_url":"https://api.github.com/users/python-visualization/gists{/gist_id}","starred_url":"https://api.github.com/users/python-visualization/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-visualization/subscriptions","organizations_url":"https://api.github.com/users/python-visualization/orgs","repos_url":"https://api.github.com/users/python-visualization/repos","events_url":"https://api.github.com/users/python-visualization/events{/privacy}","received_events_url":"https://api.github.com/users/python-visualization/received_events","type":"Organization","site_admin":false},"repo":{"id":9952134,"node_id":"MDEwOlJlcG9zaXRvcnk5OTUyMTM0","name":"folium","full_name":"python-visualization/folium","owner":{"login":"python-visualization","id":9969242,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NjkyNDI=","avatar_url":"https://avatars2.githubusercontent.com/u/9969242?v=4","gravatar_id":"","url":"https://api.github.com/users/python-visualization","html_url":"https://github.com/python-visualization","followers_url":"https://api.github.com/users/python-visualization/followers","following_url":"https://api.github.com/users/python-visualization/following{/other_user}","gists_url":"https://api.github.com/users/python-visualization/gists{/gist_id}","starred_url":"https://api.github.com/users/python-visualization/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-visualization/subscriptions","organizations_url":"https://api.github.com/users/python-visualization/orgs","repos_url":"https://api.github.com/users/python-visualization/repos","events_url":"https://api.github.com/users/python-visualization/events{/privacy}","received_events_url":"https://api.github.com/users/python-visualization/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python-visualization/folium","description":"Python Data. Leaflet.js Maps. ","fork":false,"url":"https://api.github.com/repos/python-visualization/folium","forks_url":"https://api.github.com/repos/python-visualization/folium/forks","keys_url":"https://api.github.com/repos/python-visualization/folium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python-visualization/folium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python-visualization/folium/teams","hooks_url":"https://api.github.com/repos/python-visualization/folium/hooks","issue_events_url":"https://api.github.com/repos/python-visualization/folium/issues/events{/number}","events_url":"https://api.github.com/repos/python-visualization/folium/events","assignees_url":"https://api.github.com/repos/python-visualization/folium/assignees{/user}","branches_url":"https://api.github.com/repos/python-visualization/folium/branches{/branch}","tags_url":"https://api.github.com/repos/python-visualization/folium/tags","blobs_url":"https://api.github.com/repos/python-visualization/folium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python-visualization/folium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python-visualization/folium/git/refs{/sha}","trees_url":"https://api.github.com/repos/python-visualization/folium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python-visualization/folium/statuses/{sha}","languages_url":"https://api.github.com/repos/python-visualization/folium/languages","stargazers_url":"https://api.github.com/repos/python-visualization/folium/stargazers","contributors_url":"https://api.github.com/repos/python-visualization/folium/contributors","subscribers_url":"https://api.github.com/repos/python-visualization/folium/subscribers","subscription_url":"https://api.github.com/repos/python-visualization/folium/subscription","commits_url":"https://api.github.com/repos/python-visualization/folium/commits{/sha}","git_commits_url":"https://api.github.com/repos/python-visualization/folium/git/commits{/sha}","comments_url":"https://api.github.com/repos/python-visualization/folium/comments{/number}","issue_comment_url":"https://api.github.com/repos/python-visualization/folium/issues/comments{/number}","contents_url":"https://api.github.com/repos/python-visualization/folium/contents/{+path}","compare_url":"https://api.github.com/repos/python-visualization/folium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python-visualization/folium/merges","archive_url":"https://api.github.com/repos/python-visualization/folium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python-visualization/folium/downloads","issues_url":"https://api.github.com/repos/python-visualization/folium/issues{/number}","pulls_url":"https://api.github.com/repos/python-visualization/folium/pulls{/number}","milestones_url":"https://api.github.com/repos/python-visualization/folium/milestones{/number}","notifications_url":"https://api.github.com/repos/python-visualization/folium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python-visualization/folium/labels{/name}","releases_url":"https://api.github.com/repos/python-visualization/folium/releases{/id}","deployments_url":"https://api.github.com/repos/python-visualization/folium/deployments","created_at":"2013-05-09T04:21:35Z","updated_at":"2018-06-14T07:30:44Z","pushed_at":"2018-06-15T00:50:04Z","git_url":"git://github.com/python-visualization/folium.git","ssh_url":"git@github.com:python-visualization/folium.git","clone_url":"https://github.com/python-visualization/folium.git","svn_url":"https://github.com/python-visualization/folium","homepage":"http://python-visualization.github.io/folium/","size":76114,"stargazers_count":3064,"watchers_count":3064,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":761,"mirror_url":null,"archived":false,"open_issues_count":71,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":761,"open_issues":71,"watchers":3064,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python-visualization/folium/pulls/883"},"html":{"href":"https://github.com/python-visualization/folium/pull/883"},"issue":{"href":"https://api.github.com/repos/python-visualization/folium/issues/883"},"comments":{"href":"https://api.github.com/repos/python-visualization/folium/issues/883/comments"},"review_comments":{"href":"https://api.github.com/repos/python-visualization/folium/pulls/883/comments"},"review_comment":{"href":"https://api.github.com/repos/python-visualization/folium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python-visualization/folium/pulls/883/commits"},"statuses":{"href":"https://api.github.com/repos/python-visualization/folium/statuses/287ac3685622644bf35ac7f4e571801612b54c52"}},"author_association":"NONE"}}
{"actor":{"display_login":"stickler-ci"}}