{"action":"created","comment":{"url":"https://api.github.com/repos/Vizzuality/trase/pulls/comments/169580726","pull_request_review_id":98126953,"id":169580726,"diff_hunk":"@@ -63,15 +63,15 @@ json:\n     name: get_map_base_data\n     version: v2\n     v3_ready: true\n-    v3_url: /api/v3/contexts/1/map_groups\n+    v3_url: /api/v3/contexts/1/map_layers","path":"spec/support/gold_master_urls.yml","position":5,"original_position":5,"commit_id":"f8f73040b724d6188730a15f956178883f8de037","original_commit_id":"61c4f266e2276a72297587494cf9a01b482459da","user":{"login":"tiagojsag","id":973964,"avatar_url":"https://avatars1.githubusercontent.com/u/973964?v=4","gravatar_id":"","url":"https://api.github.com/users/tiagojsag","html_url":"https://github.com/tiagojsag","followers_url":"https://api.github.com/users/tiagojsag/followers","following_url":"https://api.github.com/users/tiagojsag/following{/other_user}","gists_url":"https://api.github.com/users/tiagojsag/gists{/gist_id}","starred_url":"https://api.github.com/users/tiagojsag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiagojsag/subscriptions","organizations_url":"https://api.github.com/users/tiagojsag/orgs","repos_url":"https://api.github.com/users/tiagojsag/repos","events_url":"https://api.github.com/users/tiagojsag/events{/privacy}","received_events_url":"https://api.github.com/users/tiagojsag/received_events","type":"User","site_admin":false},"body":"ah ok","created_at":"2018-02-21T09:44:57Z","updated_at":"2018-02-21T09:44:57Z","html_url":"https://github.com/Vizzuality/trase/pull/289#discussion_r169580726","pull_request_url":"https://api.github.com/repos/Vizzuality/trase/pulls/289","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Vizzuality/trase/pulls/comments/169580726"},"html":{"href":"https://github.com/Vizzuality/trase/pull/289#discussion_r169580726"},"pull_request":{"href":"https://api.github.com/repos/Vizzuality/trase/pulls/289"}},"in_reply_to_id":169555638},"pull_request":{"url":"https://api.github.com/repos/Vizzuality/trase/pulls/289","id":168190971,"html_url":"https://github.com/Vizzuality/trase/pull/289","diff_url":"https://github.com/Vizzuality/trase/pull/289.diff","patch_url":"https://github.com/Vizzuality/trase/pull/289.patch","issue_url":"https://api.github.com/repos/Vizzuality/trase/issues/289","number":289,"state":"open","locked":false,"title":"Added top nodes endpoint","user":{"login":"agnessa","id":134055,"avatar_url":"https://avatars1.githubusercontent.com/u/134055?v=4","gravatar_id":"","url":"https://api.github.com/users/agnessa","html_url":"https://github.com/agnessa","followers_url":"https://api.github.com/users/agnessa/followers","following_url":"https://api.github.com/users/agnessa/following{/other_user}","gists_url":"https://api.github.com/users/agnessa/gists{/gist_id}","starred_url":"https://api.github.com/users/agnessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agnessa/subscriptions","organizations_url":"https://api.github.com/users/agnessa/orgs","repos_url":"https://api.github.com/users/agnessa/repos","events_url":"https://api.github.com/users/agnessa/events{/privacy}","received_events_url":"https://api.github.com/users/agnessa/received_events","type":"User","site_admin":false},"body":"I believe both the top destination countries and top exporters visualisations can be served by this endpoint, parametrised by `context_id`, `year` and `column_id` (node type id). By default returns 10 top nodes, but can be controlled with `n_nodes` parameter.\r\n\r\nTop exporters for context:\r\n`/api/v3/contexts/1/top_nodes?year_start=2014&year_end=2015&column_id=6`\r\n\r\nTop destination countries for context:\r\n`/api/v3/contexts/1/top_nodes?year_start=2014&year_end=2015&column_id=8`\r\n\r\n```\r\n{\r\n   \"data\":{\r\n      \"context_id\":1,\r\n      \"indicator\":\"Trade volume\",\r\n      \"unit\":\"Tn\",\r\n      \"targetNodes\":[\r\n         {\r\n            \"id\":684,\r\n            \"name\":\"CHINA\",\r\n            \"height\":0.424452686663284,\r\n            \"value\":41375771.5613432\r\n         },\r\n         {\r\n            \"id\":424,\r\n            \"name\":\"BRAZIL\",\r\n            \"height\":0.2826774040085104,\r\n            \"value\":27555475.7015545\r\n         },\r\n         {\r\n            \"id\":1840,\r\n            \"name\":\"NETHERLANDS\",\r\n            \"height\":0.0402013223456854,\r\n            \"value\":3918836.61501838\r\n         },\r\n         {\r\n            \"id\":2766,\r\n            \"name\":\"SPAIN\",\r\n            \"height\":0.02792436117120467,\r\n            \"value\":2722074.86280508\r\n         },\r\n         {\r\n            \"id\":2857,\r\n            \"name\":\"THAILAND\",\r\n            \"height\":0.02705845937460778,\r\n            \"value\":2637666.50339005\r\n         },\r\n         {\r\n            \"id\":1324,\r\n            \"name\":\"INDIA\",\r\n            \"height\":0.02207863104146035,\r\n            \"value\":2152231.38658876\r\n         },\r\n         {\r\n            \"id\":1112,\r\n            \"name\":\"FRANCE\",\r\n            \"height\":0.01710709428594789,\r\n            \"value\":1667604.5351911\r\n         },\r\n         {\r\n            \"id\":1158,\r\n            \"name\":\"GERMANY\",\r\n            \"height\":0.01624610203964705,\r\n            \"value\":1583674.76016934\r\n         },\r\n         {\r\n            \"id\":2762,\r\n            \"name\":\"SOUTH KOREA\",\r\n            \"height\":0.01611762709852366,\r\n            \"value\":1571150.98547712\r\n         },\r\n         {\r\n            \"id\":1328,\r\n            \"name\":\"INDONESIA\",\r\n            \"height\":0.01597269870893941,\r\n            \"value\":1557023.32383518\r\n         }\r\n      ]\r\n   }\r\n}\r\n```\r\n\r\nColumn ids are now returned as part of the `contexts` call:\r\n\r\n```\r\n         \"worldMap\":{  \r\n            \"mapColumnId\":8,\r\n            \"listColumnId\":6\r\n         },\r\n```","created_at":"2018-02-09T09:32:06Z","updated_at":"2018-02-21T09:44:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59c317b115a4289166ef10b22c221c4638183277","assignee":{"login":"agnessa","id":134055,"avatar_url":"https://avatars1.githubusercontent.com/u/134055?v=4","gravatar_id":"","url":"https://api.github.com/users/agnessa","html_url":"https://github.com/agnessa","followers_url":"https://api.github.com/users/agnessa/followers","following_url":"https://api.github.com/users/agnessa/following{/other_user}","gists_url":"https://api.github.com/users/agnessa/gists{/gist_id}","starred_url":"https://api.github.com/users/agnessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agnessa/subscriptions","organizations_url":"https://api.github.com/users/agnessa/orgs","repos_url":"https://api.github.com/users/agnessa/repos","events_url":"https://api.github.com/users/agnessa/events{/privacy}","received_events_url":"https://api.github.com/users/agnessa/received_events","type":"User","site_admin":false},"assignees":[{"login":"agnessa","id":134055,"avatar_url":"https://avatars1.githubusercontent.com/u/134055?v=4","gravatar_id":"","url":"https://api.github.com/users/agnessa","html_url":"https://github.com/agnessa","followers_url":"https://api.github.com/users/agnessa/followers","following_url":"https://api.github.com/users/agnessa/following{/other_user}","gists_url":"https://api.github.com/users/agnessa/gists{/gist_id}","starred_url":"https://api.github.com/users/agnessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agnessa/subscriptions","organizations_url":"https://api.github.com/users/agnessa/orgs","repos_url":"https://api.github.com/users/agnessa/repos","events_url":"https://api.github.com/users/agnessa/events{/privacy}","received_events_url":"https://api.github.com/users/agnessa/received_events","type":"User","site_admin":false},{"login":"tiagojsag","id":973964,"avatar_url":"https://avatars1.githubusercontent.com/u/973964?v=4","gravatar_id":"","url":"https://api.github.com/users/tiagojsag","html_url":"https://github.com/tiagojsag","followers_url":"https://api.github.com/users/tiagojsag/followers","following_url":"https://api.github.com/users/tiagojsag/following{/other_user}","gists_url":"https://api.github.com/users/tiagojsag/gists{/gist_id}","starred_url":"https://api.github.com/users/tiagojsag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiagojsag/subscriptions","organizations_url":"https://api.github.com/users/tiagojsag/orgs","repos_url":"https://api.github.com/users/tiagojsag/repos","events_url":"https://api.github.com/users/tiagojsag/events{/privacy}","received_events_url":"https://api.github.com/users/tiagojsag/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Vizzuality/trase/pulls/289/commits","review_comments_url":"https://api.github.com/repos/Vizzuality/trase/pulls/289/comments","review_comment_url":"https://api.github.com/repos/Vizzuality/trase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vizzuality/trase/issues/289/comments","statuses_url":"https://api.github.com/repos/Vizzuality/trase/statuses/f8f73040b724d6188730a15f956178883f8de037","head":{"label":"Vizzuality:feature/world_map_endpoints","ref":"feature/world_map_endpoints","sha":"f8f73040b724d6188730a15f956178883f8de037","user":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars3.githubusercontent.com/u/305994?v=4","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"repo":{"id":82197942,"name":"trase","full_name":"Vizzuality/trase","owner":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars3.githubusercontent.com/u/305994?v=4","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vizzuality/trase","description":"Source code for Trase API and Frontend applications","fork":false,"url":"https://api.github.com/repos/Vizzuality/trase","forks_url":"https://api.github.com/repos/Vizzuality/trase/forks","keys_url":"https://api.github.com/repos/Vizzuality/trase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vizzuality/trase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vizzuality/trase/teams","hooks_url":"https://api.github.com/repos/Vizzuality/trase/hooks","issue_events_url":"https://api.github.com/repos/Vizzuality/trase/issues/events{/number}","events_url":"https://api.github.com/repos/Vizzuality/trase/events","assignees_url":"https://api.github.com/repos/Vizzuality/trase/assignees{/user}","branches_url":"https://api.github.com/repos/Vizzuality/trase/branches{/branch}","tags_url":"https://api.github.com/repos/Vizzuality/trase/tags","blobs_url":"https://api.github.com/repos/Vizzuality/trase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vizzuality/trase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vizzuality/trase/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vizzuality/trase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vizzuality/trase/statuses/{sha}","languages_url":"https://api.github.com/repos/Vizzuality/trase/languages","stargazers_url":"https://api.github.com/repos/Vizzuality/trase/stargazers","contributors_url":"https://api.github.com/repos/Vizzuality/trase/contributors","subscribers_url":"https://api.github.com/repos/Vizzuality/trase/subscribers","subscription_url":"https://api.github.com/repos/Vizzuality/trase/subscription","commits_url":"https://api.github.com/repos/Vizzuality/trase/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vizzuality/trase/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vizzuality/trase/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vizzuality/trase/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vizzuality/trase/contents/{+path}","compare_url":"https://api.github.com/repos/Vizzuality/trase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vizzuality/trase/merges","archive_url":"https://api.github.com/repos/Vizzuality/trase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vizzuality/trase/downloads","issues_url":"https://api.github.com/repos/Vizzuality/trase/issues{/number}","pulls_url":"https://api.github.com/repos/Vizzuality/trase/pulls{/number}","milestones_url":"https://api.github.com/repos/Vizzuality/trase/milestones{/number}","notifications_url":"https://api.github.com/repos/Vizzuality/trase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vizzuality/trase/labels{/name}","releases_url":"https://api.github.com/repos/Vizzuality/trase/releases{/id}","deployments_url":"https://api.github.com/repos/Vizzuality/trase/deployments","created_at":"2017-02-16T15:55:05Z","updated_at":"2017-12-20T09:17:13Z","pushed_at":"2018-02-21T09:36:14Z","git_url":"git://github.com/Vizzuality/trase.git","ssh_url":"git@github.com:Vizzuality/trase.git","clone_url":"https://github.com/Vizzuality/trase.git","svn_url":"https://github.com/Vizzuality/trase","homepage":"https://trase.earth","size":57215,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":55,"watchers":3,"default_branch":"develop"}},"base":{"label":"Vizzuality:develop","ref":"develop","sha":"e6c188ef4102d96eded0d9c1ee22e8c1fc2671eb","user":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars3.githubusercontent.com/u/305994?v=4","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"repo":{"id":82197942,"name":"trase","full_name":"Vizzuality/trase","owner":{"login":"Vizzuality","id":305994,"avatar_url":"https://avatars3.githubusercontent.com/u/305994?v=4","gravatar_id":"","url":"https://api.github.com/users/Vizzuality","html_url":"https://github.com/Vizzuality","followers_url":"https://api.github.com/users/Vizzuality/followers","following_url":"https://api.github.com/users/Vizzuality/following{/other_user}","gists_url":"https://api.github.com/users/Vizzuality/gists{/gist_id}","starred_url":"https://api.github.com/users/Vizzuality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vizzuality/subscriptions","organizations_url":"https://api.github.com/users/Vizzuality/orgs","repos_url":"https://api.github.com/users/Vizzuality/repos","events_url":"https://api.github.com/users/Vizzuality/events{/privacy}","received_events_url":"https://api.github.com/users/Vizzuality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vizzuality/trase","description":"Source code for Trase API and Frontend applications","fork":false,"url":"https://api.github.com/repos/Vizzuality/trase","forks_url":"https://api.github.com/repos/Vizzuality/trase/forks","keys_url":"https://api.github.com/repos/Vizzuality/trase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vizzuality/trase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vizzuality/trase/teams","hooks_url":"https://api.github.com/repos/Vizzuality/trase/hooks","issue_events_url":"https://api.github.com/repos/Vizzuality/trase/issues/events{/number}","events_url":"https://api.github.com/repos/Vizzuality/trase/events","assignees_url":"https://api.github.com/repos/Vizzuality/trase/assignees{/user}","branches_url":"https://api.github.com/repos/Vizzuality/trase/branches{/branch}","tags_url":"https://api.github.com/repos/Vizzuality/trase/tags","blobs_url":"https://api.github.com/repos/Vizzuality/trase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vizzuality/trase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vizzuality/trase/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vizzuality/trase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vizzuality/trase/statuses/{sha}","languages_url":"https://api.github.com/repos/Vizzuality/trase/languages","stargazers_url":"https://api.github.com/repos/Vizzuality/trase/stargazers","contributors_url":"https://api.github.com/repos/Vizzuality/trase/contributors","subscribers_url":"https://api.github.com/repos/Vizzuality/trase/subscribers","subscription_url":"https://api.github.com/repos/Vizzuality/trase/subscription","commits_url":"https://api.github.com/repos/Vizzuality/trase/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vizzuality/trase/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vizzuality/trase/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vizzuality/trase/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vizzuality/trase/contents/{+path}","compare_url":"https://api.github.com/repos/Vizzuality/trase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vizzuality/trase/merges","archive_url":"https://api.github.com/repos/Vizzuality/trase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vizzuality/trase/downloads","issues_url":"https://api.github.com/repos/Vizzuality/trase/issues{/number}","pulls_url":"https://api.github.com/repos/Vizzuality/trase/pulls{/number}","milestones_url":"https://api.github.com/repos/Vizzuality/trase/milestones{/number}","notifications_url":"https://api.github.com/repos/Vizzuality/trase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vizzuality/trase/labels{/name}","releases_url":"https://api.github.com/repos/Vizzuality/trase/releases{/id}","deployments_url":"https://api.github.com/repos/Vizzuality/trase/deployments","created_at":"2017-02-16T15:55:05Z","updated_at":"2017-12-20T09:17:13Z","pushed_at":"2018-02-21T09:36:14Z","git_url":"git://github.com/Vizzuality/trase.git","ssh_url":"git@github.com:Vizzuality/trase.git","clone_url":"https://github.com/Vizzuality/trase.git","svn_url":"https://github.com/Vizzuality/trase","homepage":"https://trase.earth","size":57215,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":55,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Vizzuality/trase/pulls/289"},"html":{"href":"https://github.com/Vizzuality/trase/pull/289"},"issue":{"href":"https://api.github.com/repos/Vizzuality/trase/issues/289"},"comments":{"href":"https://api.github.com/repos/Vizzuality/trase/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/Vizzuality/trase/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/Vizzuality/trase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vizzuality/trase/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/Vizzuality/trase/statuses/f8f73040b724d6188730a15f956178883f8de037"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tiagojsag"}}