{"action":"created","comment":{"url":"https://api.github.com/repos/satellogic/telluric/pulls/comments/201759713","pull_request_review_id":136323295,"id":201759713,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTc1OTcxMw==","diff_hunk":"@@ -343,50 +343,3 @@ def test_feature_collection_with_dates_serializes_correctly():\n         assert fc.schema == schema\n         assert fc[0].geometry == feature.geometry\n         assert fc[0].attributes == expected_attributes\n-\n-\n-def test_get_tile_that_returend_257():","path":"tests/test_collections.py","position":6,"original_position":6,"commit_id":"d1cd013708e46ca08cfc549ab7b75d1edee4f956","original_commit_id":"d1cd013708e46ca08cfc549ab7b75d1edee4f956","user":{"login":"Juanlu001","id":316517,"node_id":"MDQ6VXNlcjMxNjUxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/316517?v=4","gravatar_id":"","url":"https://api.github.com/users/Juanlu001","html_url":"https://github.com/Juanlu001","followers_url":"https://api.github.com/users/Juanlu001/followers","following_url":"https://api.github.com/users/Juanlu001/following{/other_user}","gists_url":"https://api.github.com/users/Juanlu001/gists{/gist_id}","starred_url":"https://api.github.com/users/Juanlu001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juanlu001/subscriptions","organizations_url":"https://api.github.com/users/Juanlu001/orgs","repos_url":"https://api.github.com/users/Juanlu001/repos","events_url":"https://api.github.com/users/Juanlu001/events{/privacy}","received_events_url":"https://api.github.com/users/Juanlu001/received_events","type":"User","site_admin":false},"body":"These tests were testing `get_tile`, so I'm removing them as well with the hope that we move them somewhere else.","created_at":"2018-07-11T16:30:37Z","updated_at":"2018-07-11T16:30:37Z","html_url":"https://github.com/satellogic/telluric/pull/77#discussion_r201759713","pull_request_url":"https://api.github.com/repos/satellogic/telluric/pulls/77","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/satellogic/telluric/pulls/comments/201759713"},"html":{"href":"https://github.com/satellogic/telluric/pull/77#discussion_r201759713"},"pull_request":{"href":"https://api.github.com/repos/satellogic/telluric/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/satellogic/telluric/pulls/77","id":200189040,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMTg5MDQw","html_url":"https://github.com/satellogic/telluric/pull/77","diff_url":"https://github.com/satellogic/telluric/pull/77.diff","patch_url":"https://github.com/satellogic/telluric/pull/77.patch","issue_url":"https://api.github.com/repos/satellogic/telluric/issues/77","number":77,"state":"open","locked":false,"title":"WIP: Add groupby and dissolve functionality","user":{"login":"Juanlu001","id":316517,"node_id":"MDQ6VXNlcjMxNjUxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/316517?v=4","gravatar_id":"","url":"https://api.github.com/users/Juanlu001","html_url":"https://github.com/Juanlu001","followers_url":"https://api.github.com/users/Juanlu001/followers","following_url":"https://api.github.com/users/Juanlu001/following{/other_user}","gists_url":"https://api.github.com/users/Juanlu001/gists{/gist_id}","starred_url":"https://api.github.com/users/Juanlu001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juanlu001/subscriptions","organizations_url":"https://api.github.com/users/Juanlu001/orgs","repos_url":"https://api.github.com/users/Juanlu001/repos","events_url":"https://api.github.com/users/Juanlu001/events{/privacy}","received_events_url":"https://api.github.com/users/Juanlu001/received_events","type":"User","site_admin":false},"body":"Tests missing. This adds new `groupby` and `dissolve` methods to `FeatureCollection` inspired by pandas and GeoPandas:\r\n\r\n```python\r\nIn [4]: fc = tl.FeatureCollection([\r\n   ...:     tl.GeoFeature(tl.GeoVector.from_bounds(xmin=0, ymin=2, xmax=2, ymax=4, crs=WEB_MERCATOR_CRS), {'show': 'yes', 'a': 1}),\r\n   ...:     tl.GeoFeature(tl.GeoVector.from_bounds(xmin=1, ymin=1, xmax=3, ymax=3, crs=WEB_MERCATOR_CRS), {'show': 'yes', 'a': 2}),\r\n   ...:     tl.GeoFeature(tl.GeoVector.from_bounds(xmin=2, ymin=0, xmax=4, ymax=2, crs=WEB_MERCATOR_CRS), {'show': 'no', 'a': 3}),\r\n   ...: ])\r\n\r\nIn [5]: def first(fc):\r\n   ...:     return fc[0]\r\n   ...: \r\n\r\nIn [7]: list(fc.groupby(\"show\").agg(first))\r\nOut[7]: \r\n[GeoFeature(Polygon, {'show': 'yes', 'a': 1}),\r\n GeoFeature(Polygon, {'show': 'no', 'a': 3})]\r\n```\r\n\r\nOne can iterate the intermediate groups:\r\n\r\n```python\r\nIn [8]: for name, group in fc.groupby(\"show\"):    \r\n   ...:     print(name)\r\n   ...:     print(list(group))\r\n   ...:     \r\nyes\r\n[GeoFeature(Polygon, {'show': 'yes', 'a': 1}), GeoFeature(Polygon, {'show': 'yes', 'a': 2})]\r\nno\r\n[GeoFeature(Polygon, {'show': 'no', 'a': 3})]\r\n```\r\n\r\nAnd also do subset of attributes, in a similar way as pandas:\r\n\r\n```python\r\nIn [9]: fc.groupby(\"show\")\r\nOut[9]: <telluric.collections._CollectionGroupBy at 0x7f15b806aa58>\r\n\r\nIn [10]: fc.groupby(\"show\")['a']\r\nOut[10]: <telluric.collections._CollectionGroupBy at 0x7f15b808c668>\r\n\r\nIn [11]: for name, group in fc.groupby(\"show\")['a']:\r\n    ...:     print(name)\r\n    ...:     print(list(group))\r\n    ...:     \r\nyes\r\n[GeoFeature(Polygon, {'a': 1}), GeoFeature(Polygon, {'a': 2})]\r\nno\r\n[GeoFeature(Polygon, {'a': 3})]\r\n```\r\n\r\nFinally, a new method `dissolve`, inspired by GeoPandas, has been added as well:\r\n\r\n```python\r\nIn [13]: list(fc.dissolve(\"show\"))\r\nOut[13]: [GeoFeature(Polygon, {}), GeoFeature(Polygon, {})]\r\n\r\nIn [14]: list(fc.dissolve(\"show\", sum))\r\nOut[14]: \r\n[GeoFeature(Polygon, {'show': None, 'a': 3}),\r\n GeoFeature(Polygon, {'show': None, 'a': 3})]\r\n\r\nIn [15]: list(fc.dissolve())\r\nOut[15]: [GeoFeature(Polygon, {})]\r\n```\r\n\r\nAll the above examples have been made with pure FeatureCollections, but collections containing rasters (`raster_url`) work as well. In this case, `fc.dissolve` merges the rasters and produces a `GeoFeature` with the final footprint.\r\n\r\nNotice that there is a major rough edge in this implementation: as we keep on mixing rasters and geometries, we have to introduce special code paths (`if 'raster_url' in collection.attribute_names`) and there's no clean way to produce a `GeoFeature` with a raster coming from an in-memory calculation (hence the use of `tempfile`). However, I trimmed down this pull request to its simplest form to simplify the review process and postpone the discussion about the data model to a future stage.\r\n\r\nWhen the API is validated, I will write the corresponding tests.","created_at":"2018-07-09T18:55:09Z","updated_at":"2018-07-11T16:30:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32e407a38624457766fb4d1bfff0f48e905fd6cd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/satellogic/telluric/pulls/77/commits","review_comments_url":"https://api.github.com/repos/satellogic/telluric/pulls/77/comments","review_comment_url":"https://api.github.com/repos/satellogic/telluric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/satellogic/telluric/issues/77/comments","statuses_url":"https://api.github.com/repos/satellogic/telluric/statuses/d1cd013708e46ca08cfc549ab7b75d1edee4f956","head":{"label":"Juanlu001:groupby-api","ref":"groupby-api","sha":"d1cd013708e46ca08cfc549ab7b75d1edee4f956","user":{"login":"Juanlu001","id":316517,"node_id":"MDQ6VXNlcjMxNjUxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/316517?v=4","gravatar_id":"","url":"https://api.github.com/users/Juanlu001","html_url":"https://github.com/Juanlu001","followers_url":"https://api.github.com/users/Juanlu001/followers","following_url":"https://api.github.com/users/Juanlu001/following{/other_user}","gists_url":"https://api.github.com/users/Juanlu001/gists{/gist_id}","starred_url":"https://api.github.com/users/Juanlu001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juanlu001/subscriptions","organizations_url":"https://api.github.com/users/Juanlu001/orgs","repos_url":"https://api.github.com/users/Juanlu001/repos","events_url":"https://api.github.com/users/Juanlu001/events{/privacy}","received_events_url":"https://api.github.com/users/Juanlu001/received_events","type":"User","site_admin":false},"repo":{"id":128917215,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg5MTcyMTU=","name":"telluric","full_name":"Juanlu001/telluric","owner":{"login":"Juanlu001","id":316517,"node_id":"MDQ6VXNlcjMxNjUxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/316517?v=4","gravatar_id":"","url":"https://api.github.com/users/Juanlu001","html_url":"https://github.com/Juanlu001","followers_url":"https://api.github.com/users/Juanlu001/followers","following_url":"https://api.github.com/users/Juanlu001/following{/other_user}","gists_url":"https://api.github.com/users/Juanlu001/gists{/gist_id}","starred_url":"https://api.github.com/users/Juanlu001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Juanlu001/subscriptions","organizations_url":"https://api.github.com/users/Juanlu001/orgs","repos_url":"https://api.github.com/users/Juanlu001/repos","events_url":"https://api.github.com/users/Juanlu001/events{/privacy}","received_events_url":"https://api.github.com/users/Juanlu001/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Juanlu001/telluric","description":"telluric is a Python library to manage vector and raster geospatial data in an interactive and easy way","fork":true,"url":"https://api.github.com/repos/Juanlu001/telluric","forks_url":"https://api.github.com/repos/Juanlu001/telluric/forks","keys_url":"https://api.github.com/repos/Juanlu001/telluric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Juanlu001/telluric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Juanlu001/telluric/teams","hooks_url":"https://api.github.com/repos/Juanlu001/telluric/hooks","issue_events_url":"https://api.github.com/repos/Juanlu001/telluric/issues/events{/number}","events_url":"https://api.github.com/repos/Juanlu001/telluric/events","assignees_url":"https://api.github.com/repos/Juanlu001/telluric/assignees{/user}","branches_url":"https://api.github.com/repos/Juanlu001/telluric/branches{/branch}","tags_url":"https://api.github.com/repos/Juanlu001/telluric/tags","blobs_url":"https://api.github.com/repos/Juanlu001/telluric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Juanlu001/telluric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Juanlu001/telluric/git/refs{/sha}","trees_url":"https://api.github.com/repos/Juanlu001/telluric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Juanlu001/telluric/statuses/{sha}","languages_url":"https://api.github.com/repos/Juanlu001/telluric/languages","stargazers_url":"https://api.github.com/repos/Juanlu001/telluric/stargazers","contributors_url":"https://api.github.com/repos/Juanlu001/telluric/contributors","subscribers_url":"https://api.github.com/repos/Juanlu001/telluric/subscribers","subscription_url":"https://api.github.com/repos/Juanlu001/telluric/subscription","commits_url":"https://api.github.com/repos/Juanlu001/telluric/commits{/sha}","git_commits_url":"https://api.github.com/repos/Juanlu001/telluric/git/commits{/sha}","comments_url":"https://api.github.com/repos/Juanlu001/telluric/comments{/number}","issue_comment_url":"https://api.github.com/repos/Juanlu001/telluric/issues/comments{/number}","contents_url":"https://api.github.com/repos/Juanlu001/telluric/contents/{+path}","compare_url":"https://api.github.com/repos/Juanlu001/telluric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Juanlu001/telluric/merges","archive_url":"https://api.github.com/repos/Juanlu001/telluric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Juanlu001/telluric/downloads","issues_url":"https://api.github.com/repos/Juanlu001/telluric/issues{/number}","pulls_url":"https://api.github.com/repos/Juanlu001/telluric/pulls{/number}","milestones_url":"https://api.github.com/repos/Juanlu001/telluric/milestones{/number}","notifications_url":"https://api.github.com/repos/Juanlu001/telluric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Juanlu001/telluric/labels{/name}","releases_url":"https://api.github.com/repos/Juanlu001/telluric/releases{/id}","deployments_url":"https://api.github.com/repos/Juanlu001/telluric/deployments","created_at":"2018-04-10T10:44:29Z","updated_at":"2018-07-02T14:10:54Z","pushed_at":"2018-07-11T16:24:30Z","git_url":"git://github.com/Juanlu001/telluric.git","ssh_url":"git@github.com:Juanlu001/telluric.git","clone_url":"https://github.com/Juanlu001/telluric.git","svn_url":"https://github.com/Juanlu001/telluric","homepage":null,"size":21529,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","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":"satellogic:master","ref":"master","sha":"f9cb3427504081859df58c79f9748cb558af6717","user":{"login":"satellogic","id":5545050,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NDUwNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/5545050?v=4","gravatar_id":"","url":"https://api.github.com/users/satellogic","html_url":"https://github.com/satellogic","followers_url":"https://api.github.com/users/satellogic/followers","following_url":"https://api.github.com/users/satellogic/following{/other_user}","gists_url":"https://api.github.com/users/satellogic/gists{/gist_id}","starred_url":"https://api.github.com/users/satellogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satellogic/subscriptions","organizations_url":"https://api.github.com/users/satellogic/orgs","repos_url":"https://api.github.com/users/satellogic/repos","events_url":"https://api.github.com/users/satellogic/events{/privacy}","received_events_url":"https://api.github.com/users/satellogic/received_events","type":"Organization","site_admin":false},"repo":{"id":128917083,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg5MTcwODM=","name":"telluric","full_name":"satellogic/telluric","owner":{"login":"satellogic","id":5545050,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1NDUwNTA=","avatar_url":"https://avatars2.githubusercontent.com/u/5545050?v=4","gravatar_id":"","url":"https://api.github.com/users/satellogic","html_url":"https://github.com/satellogic","followers_url":"https://api.github.com/users/satellogic/followers","following_url":"https://api.github.com/users/satellogic/following{/other_user}","gists_url":"https://api.github.com/users/satellogic/gists{/gist_id}","starred_url":"https://api.github.com/users/satellogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satellogic/subscriptions","organizations_url":"https://api.github.com/users/satellogic/orgs","repos_url":"https://api.github.com/users/satellogic/repos","events_url":"https://api.github.com/users/satellogic/events{/privacy}","received_events_url":"https://api.github.com/users/satellogic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/satellogic/telluric","description":"telluric is a Python library to manage vector and raster geospatial data in an interactive and easy way","fork":false,"url":"https://api.github.com/repos/satellogic/telluric","forks_url":"https://api.github.com/repos/satellogic/telluric/forks","keys_url":"https://api.github.com/repos/satellogic/telluric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/satellogic/telluric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/satellogic/telluric/teams","hooks_url":"https://api.github.com/repos/satellogic/telluric/hooks","issue_events_url":"https://api.github.com/repos/satellogic/telluric/issues/events{/number}","events_url":"https://api.github.com/repos/satellogic/telluric/events","assignees_url":"https://api.github.com/repos/satellogic/telluric/assignees{/user}","branches_url":"https://api.github.com/repos/satellogic/telluric/branches{/branch}","tags_url":"https://api.github.com/repos/satellogic/telluric/tags","blobs_url":"https://api.github.com/repos/satellogic/telluric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/satellogic/telluric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/satellogic/telluric/git/refs{/sha}","trees_url":"https://api.github.com/repos/satellogic/telluric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/satellogic/telluric/statuses/{sha}","languages_url":"https://api.github.com/repos/satellogic/telluric/languages","stargazers_url":"https://api.github.com/repos/satellogic/telluric/stargazers","contributors_url":"https://api.github.com/repos/satellogic/telluric/contributors","subscribers_url":"https://api.github.com/repos/satellogic/telluric/subscribers","subscription_url":"https://api.github.com/repos/satellogic/telluric/subscription","commits_url":"https://api.github.com/repos/satellogic/telluric/commits{/sha}","git_commits_url":"https://api.github.com/repos/satellogic/telluric/git/commits{/sha}","comments_url":"https://api.github.com/repos/satellogic/telluric/comments{/number}","issue_comment_url":"https://api.github.com/repos/satellogic/telluric/issues/comments{/number}","contents_url":"https://api.github.com/repos/satellogic/telluric/contents/{+path}","compare_url":"https://api.github.com/repos/satellogic/telluric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/satellogic/telluric/merges","archive_url":"https://api.github.com/repos/satellogic/telluric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/satellogic/telluric/downloads","issues_url":"https://api.github.com/repos/satellogic/telluric/issues{/number}","pulls_url":"https://api.github.com/repos/satellogic/telluric/pulls{/number}","milestones_url":"https://api.github.com/repos/satellogic/telluric/milestones{/number}","notifications_url":"https://api.github.com/repos/satellogic/telluric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/satellogic/telluric/labels{/name}","releases_url":"https://api.github.com/repos/satellogic/telluric/releases{/id}","deployments_url":"https://api.github.com/repos/satellogic/telluric/deployments","created_at":"2018-04-10T10:43:15Z","updated_at":"2018-07-10T09:09:49Z","pushed_at":"2018-07-11T16:24:31Z","git_url":"git://github.com/satellogic/telluric.git","ssh_url":"git@github.com:satellogic/telluric.git","clone_url":"https://github.com/satellogic/telluric.git","svn_url":"https://github.com/satellogic/telluric","homepage":null,"size":21839,"stargazers_count":20,"watchers_count":20,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":22,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/satellogic/telluric/pulls/77"},"html":{"href":"https://github.com/satellogic/telluric/pull/77"},"issue":{"href":"https://api.github.com/repos/satellogic/telluric/issues/77"},"comments":{"href":"https://api.github.com/repos/satellogic/telluric/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/satellogic/telluric/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/satellogic/telluric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/satellogic/telluric/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/satellogic/telluric/statuses/d1cd013708e46ca08cfc549ab7b75d1edee4f956"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Juanlu001"}}