{"action":"created","comment":{"url":"https://api.github.com/repos/trias-project/unified-checklist/pulls/comments/222964413","pull_request_review_id":161980384,"id":222964413,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjk2NDQxMw==","diff_hunk":"@@ -189,10 +208,102 @@ Total number of taxa with valid distributions:\n nrow(checklist_taxa)\n ```\n \n+# Get backbone info\n+\n+To make decisions regarding synonyms and higher classification, we need to retrieve GBIF backbone information, if present:\n+\n+\n+```{r retrieve_taxonomic_info_backbone}\n+taxon <- checklist_taxa %>% filter(is.finite(nubKey))\n+nub_keys <- checklist_taxa %>% \n+  filter(is.finite(nubKey)) %>% \n+  distinct(nubKey)\n+progress_bar <- progress_estimated(nrow(nub_keys))\n+taxon_backbone_info <-  map_dfr(nub_keys$nubKey, ~ {\n+  progress_bar$tick()$print()\n+  rgbif::name_usage(key = ., return = \"data\")\n+  })\n+```\n+\n+We select taxonomic information we are interested to:\n+\n+```{r select_cols_backbone}\n+taxon_info <- c(\"key\", \"scientificName\", \"species\", \"genus\", \"family\", \"order\",\n+                \"class\", \"phylum\", \"kingdom\",\n+                \"rank\", \"speciesKey\", \"taxonomicStatus\", \n+                \"acceptedKey\", \"accepted\", \"issues\")\n+\n+taxon_backbone_info <- taxon_backbone_info %>%\n+  select(one_of(taxon_info))\n+```\n+\n+In case some information misses, add empty column(s):\n+\n+```{r}\n+cols_to_add <- taxon_info[!which(taxon_info %in% \n+           colnames(taxon_backbone_info))]\n+\n+taxon_backbone_info <- map(cols_to_add, \n+                           function(x) taxon_backbone_info %>% \n+                             mutate(!! sym(x) := NA)) %>% \n+  reduce(full_join, .init = taxon_backbone_info)\n+```\n+\n+Next, we unlist column `issues` and we separate them by comma (if multiple issues are present):\n+\n+```{r unlist_issues}\n+taxon_backbone_info <- taxon_backbone_info %>%","path":"src/get_taxa.Rmd","position":237,"original_position":237,"commit_id":"31f56bb1133e543d003edb9e809dd91f681d8097","original_commit_id":"31f56bb1133e543d003edb9e809dd91f681d8097","user":{"login":"peterdesmet","id":600993,"node_id":"MDQ6VXNlcjYwMDk5Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/600993?v=4","gravatar_id":"","url":"https://api.github.com/users/peterdesmet","html_url":"https://github.com/peterdesmet","followers_url":"https://api.github.com/users/peterdesmet/followers","following_url":"https://api.github.com/users/peterdesmet/following{/other_user}","gists_url":"https://api.github.com/users/peterdesmet/gists{/gist_id}","starred_url":"https://api.github.com/users/peterdesmet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterdesmet/subscriptions","organizations_url":"https://api.github.com/users/peterdesmet/orgs","repos_url":"https://api.github.com/users/peterdesmet/repos","events_url":"https://api.github.com/users/peterdesmet/events{/privacy}","received_events_url":"https://api.github.com/users/peterdesmet/received_events","type":"User","site_admin":false},"body":"Apparently not, though I did use `na_if()`","created_at":"2018-10-05T10:44:18Z","updated_at":"2018-10-05T10:44:18Z","html_url":"https://github.com/trias-project/unified-checklist/pull/10#discussion_r222964413","pull_request_url":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/trias-project/unified-checklist/pulls/comments/222964413"},"html":{"href":"https://github.com/trias-project/unified-checklist/pull/10#discussion_r222964413"},"pull_request":{"href":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10"}},"in_reply_to_id":222722077},"pull_request":{"url":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10","id":216577595,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2NTc3NTk1","html_url":"https://github.com/trias-project/unified-checklist/pull/10","diff_url":"https://github.com/trias-project/unified-checklist/pull/10.diff","patch_url":"https://github.com/trias-project/unified-checklist/pull/10.patch","issue_url":"https://api.github.com/repos/trias-project/unified-checklist/issues/10","number":10,"state":"open","locked":false,"title":"Get taxa populate spreadsheet","user":{"login":"damianooldoni","id":33662631,"node_id":"MDQ6VXNlcjMzNjYyNjMx","avatar_url":"https://avatars1.githubusercontent.com/u/33662631?v=4","gravatar_id":"","url":"https://api.github.com/users/damianooldoni","html_url":"https://github.com/damianooldoni","followers_url":"https://api.github.com/users/damianooldoni/followers","following_url":"https://api.github.com/users/damianooldoni/following{/other_user}","gists_url":"https://api.github.com/users/damianooldoni/gists{/gist_id}","starred_url":"https://api.github.com/users/damianooldoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianooldoni/subscriptions","organizations_url":"https://api.github.com/users/damianooldoni/orgs","repos_url":"https://api.github.com/users/damianooldoni/repos","events_url":"https://api.github.com/users/damianooldoni/events{/privacy}","received_events_url":"https://api.github.com/users/damianooldoni/received_events","type":"User","site_admin":false},"body":"Progresses in merging checklists have been implemented in pipelines. In particular, this PR covers points 1-11 of Google  Document [Unified checklist - pipeline](https://docs.google.com/document/d/17TpZNcokL3NW5s9hkRAgvS6hyg6OhyfSFQEZ9xf7-No`)\r\nPlease, review following this order:\r\n1. `./src/get_taxa.Rmd`\r\n2. `./src/verify_synonyms.Rmd`\r\n3. `./src/unify_info_from_checklists.Rmd`","created_at":"2018-09-19T09:47:51Z","updated_at":"2018-10-05T10:44:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca700676860826cb973e1132531126c5a357d0e4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10/commits","review_comments_url":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10/comments","review_comment_url":"https://api.github.com/repos/trias-project/unified-checklist/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trias-project/unified-checklist/issues/10/comments","statuses_url":"https://api.github.com/repos/trias-project/unified-checklist/statuses/31f56bb1133e543d003edb9e809dd91f681d8097","head":{"label":"trias-project:get_taxa_populate_spreadsheet","ref":"get_taxa_populate_spreadsheet","sha":"31f56bb1133e543d003edb9e809dd91f681d8097","user":{"login":"trias-project","id":29750687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUwNjg3","avatar_url":"https://avatars3.githubusercontent.com/u/29750687?v=4","gravatar_id":"","url":"https://api.github.com/users/trias-project","html_url":"https://github.com/trias-project","followers_url":"https://api.github.com/users/trias-project/followers","following_url":"https://api.github.com/users/trias-project/following{/other_user}","gists_url":"https://api.github.com/users/trias-project/gists{/gist_id}","starred_url":"https://api.github.com/users/trias-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trias-project/subscriptions","organizations_url":"https://api.github.com/users/trias-project/orgs","repos_url":"https://api.github.com/users/trias-project/repos","events_url":"https://api.github.com/users/trias-project/events{/privacy}","received_events_url":"https://api.github.com/users/trias-project/received_events","type":"Organization","site_admin":false},"repo":{"id":119842196,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk4NDIxOTY=","name":"unified-checklist","full_name":"trias-project/unified-checklist","private":false,"owner":{"login":"trias-project","id":29750687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUwNjg3","avatar_url":"https://avatars3.githubusercontent.com/u/29750687?v=4","gravatar_id":"","url":"https://api.github.com/users/trias-project","html_url":"https://github.com/trias-project","followers_url":"https://api.github.com/users/trias-project/followers","following_url":"https://api.github.com/users/trias-project/following{/other_user}","gists_url":"https://api.github.com/users/trias-project/gists{/gist_id}","starred_url":"https://api.github.com/users/trias-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trias-project/subscriptions","organizations_url":"https://api.github.com/users/trias-project/orgs","repos_url":"https://api.github.com/users/trias-project/repos","events_url":"https://api.github.com/users/trias-project/events{/privacy}","received_events_url":"https://api.github.com/users/trias-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/trias-project/unified-checklist","description":"🇧🇪 National, unified checklist of alien species in Belgium","fork":false,"url":"https://api.github.com/repos/trias-project/unified-checklist","forks_url":"https://api.github.com/repos/trias-project/unified-checklist/forks","keys_url":"https://api.github.com/repos/trias-project/unified-checklist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trias-project/unified-checklist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trias-project/unified-checklist/teams","hooks_url":"https://api.github.com/repos/trias-project/unified-checklist/hooks","issue_events_url":"https://api.github.com/repos/trias-project/unified-checklist/issues/events{/number}","events_url":"https://api.github.com/repos/trias-project/unified-checklist/events","assignees_url":"https://api.github.com/repos/trias-project/unified-checklist/assignees{/user}","branches_url":"https://api.github.com/repos/trias-project/unified-checklist/branches{/branch}","tags_url":"https://api.github.com/repos/trias-project/unified-checklist/tags","blobs_url":"https://api.github.com/repos/trias-project/unified-checklist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trias-project/unified-checklist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trias-project/unified-checklist/git/refs{/sha}","trees_url":"https://api.github.com/repos/trias-project/unified-checklist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trias-project/unified-checklist/statuses/{sha}","languages_url":"https://api.github.com/repos/trias-project/unified-checklist/languages","stargazers_url":"https://api.github.com/repos/trias-project/unified-checklist/stargazers","contributors_url":"https://api.github.com/repos/trias-project/unified-checklist/contributors","subscribers_url":"https://api.github.com/repos/trias-project/unified-checklist/subscribers","subscription_url":"https://api.github.com/repos/trias-project/unified-checklist/subscription","commits_url":"https://api.github.com/repos/trias-project/unified-checklist/commits{/sha}","git_commits_url":"https://api.github.com/repos/trias-project/unified-checklist/git/commits{/sha}","comments_url":"https://api.github.com/repos/trias-project/unified-checklist/comments{/number}","issue_comment_url":"https://api.github.com/repos/trias-project/unified-checklist/issues/comments{/number}","contents_url":"https://api.github.com/repos/trias-project/unified-checklist/contents/{+path}","compare_url":"https://api.github.com/repos/trias-project/unified-checklist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trias-project/unified-checklist/merges","archive_url":"https://api.github.com/repos/trias-project/unified-checklist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trias-project/unified-checklist/downloads","issues_url":"https://api.github.com/repos/trias-project/unified-checklist/issues{/number}","pulls_url":"https://api.github.com/repos/trias-project/unified-checklist/pulls{/number}","milestones_url":"https://api.github.com/repos/trias-project/unified-checklist/milestones{/number}","notifications_url":"https://api.github.com/repos/trias-project/unified-checklist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trias-project/unified-checklist/labels{/name}","releases_url":"https://api.github.com/repos/trias-project/unified-checklist/releases{/id}","deployments_url":"https://api.github.com/repos/trias-project/unified-checklist/deployments","created_at":"2018-02-01T13:51:31Z","updated_at":"2018-04-10T12:00:33Z","pushed_at":"2018-10-05T09:51:32Z","git_url":"git://github.com/trias-project/unified-checklist.git","ssh_url":"git@github.com:trias-project/unified-checklist.git","clone_url":"https://github.com/trias-project/unified-checklist.git","svn_url":"https://github.com/trias-project/unified-checklist","homepage":"","size":3010,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"trias-project:master","ref":"master","sha":"4dc19b91b309b79b8fefe8a6fe710fa1a4092393","user":{"login":"trias-project","id":29750687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUwNjg3","avatar_url":"https://avatars3.githubusercontent.com/u/29750687?v=4","gravatar_id":"","url":"https://api.github.com/users/trias-project","html_url":"https://github.com/trias-project","followers_url":"https://api.github.com/users/trias-project/followers","following_url":"https://api.github.com/users/trias-project/following{/other_user}","gists_url":"https://api.github.com/users/trias-project/gists{/gist_id}","starred_url":"https://api.github.com/users/trias-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trias-project/subscriptions","organizations_url":"https://api.github.com/users/trias-project/orgs","repos_url":"https://api.github.com/users/trias-project/repos","events_url":"https://api.github.com/users/trias-project/events{/privacy}","received_events_url":"https://api.github.com/users/trias-project/received_events","type":"Organization","site_admin":false},"repo":{"id":119842196,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk4NDIxOTY=","name":"unified-checklist","full_name":"trias-project/unified-checklist","private":false,"owner":{"login":"trias-project","id":29750687,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUwNjg3","avatar_url":"https://avatars3.githubusercontent.com/u/29750687?v=4","gravatar_id":"","url":"https://api.github.com/users/trias-project","html_url":"https://github.com/trias-project","followers_url":"https://api.github.com/users/trias-project/followers","following_url":"https://api.github.com/users/trias-project/following{/other_user}","gists_url":"https://api.github.com/users/trias-project/gists{/gist_id}","starred_url":"https://api.github.com/users/trias-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trias-project/subscriptions","organizations_url":"https://api.github.com/users/trias-project/orgs","repos_url":"https://api.github.com/users/trias-project/repos","events_url":"https://api.github.com/users/trias-project/events{/privacy}","received_events_url":"https://api.github.com/users/trias-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/trias-project/unified-checklist","description":"🇧🇪 National, unified checklist of alien species in Belgium","fork":false,"url":"https://api.github.com/repos/trias-project/unified-checklist","forks_url":"https://api.github.com/repos/trias-project/unified-checklist/forks","keys_url":"https://api.github.com/repos/trias-project/unified-checklist/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trias-project/unified-checklist/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trias-project/unified-checklist/teams","hooks_url":"https://api.github.com/repos/trias-project/unified-checklist/hooks","issue_events_url":"https://api.github.com/repos/trias-project/unified-checklist/issues/events{/number}","events_url":"https://api.github.com/repos/trias-project/unified-checklist/events","assignees_url":"https://api.github.com/repos/trias-project/unified-checklist/assignees{/user}","branches_url":"https://api.github.com/repos/trias-project/unified-checklist/branches{/branch}","tags_url":"https://api.github.com/repos/trias-project/unified-checklist/tags","blobs_url":"https://api.github.com/repos/trias-project/unified-checklist/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trias-project/unified-checklist/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trias-project/unified-checklist/git/refs{/sha}","trees_url":"https://api.github.com/repos/trias-project/unified-checklist/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trias-project/unified-checklist/statuses/{sha}","languages_url":"https://api.github.com/repos/trias-project/unified-checklist/languages","stargazers_url":"https://api.github.com/repos/trias-project/unified-checklist/stargazers","contributors_url":"https://api.github.com/repos/trias-project/unified-checklist/contributors","subscribers_url":"https://api.github.com/repos/trias-project/unified-checklist/subscribers","subscription_url":"https://api.github.com/repos/trias-project/unified-checklist/subscription","commits_url":"https://api.github.com/repos/trias-project/unified-checklist/commits{/sha}","git_commits_url":"https://api.github.com/repos/trias-project/unified-checklist/git/commits{/sha}","comments_url":"https://api.github.com/repos/trias-project/unified-checklist/comments{/number}","issue_comment_url":"https://api.github.com/repos/trias-project/unified-checklist/issues/comments{/number}","contents_url":"https://api.github.com/repos/trias-project/unified-checklist/contents/{+path}","compare_url":"https://api.github.com/repos/trias-project/unified-checklist/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trias-project/unified-checklist/merges","archive_url":"https://api.github.com/repos/trias-project/unified-checklist/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trias-project/unified-checklist/downloads","issues_url":"https://api.github.com/repos/trias-project/unified-checklist/issues{/number}","pulls_url":"https://api.github.com/repos/trias-project/unified-checklist/pulls{/number}","milestones_url":"https://api.github.com/repos/trias-project/unified-checklist/milestones{/number}","notifications_url":"https://api.github.com/repos/trias-project/unified-checklist/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trias-project/unified-checklist/labels{/name}","releases_url":"https://api.github.com/repos/trias-project/unified-checklist/releases{/id}","deployments_url":"https://api.github.com/repos/trias-project/unified-checklist/deployments","created_at":"2018-02-01T13:51:31Z","updated_at":"2018-04-10T12:00:33Z","pushed_at":"2018-10-05T09:51:32Z","git_url":"git://github.com/trias-project/unified-checklist.git","ssh_url":"git@github.com:trias-project/unified-checklist.git","clone_url":"https://github.com/trias-project/unified-checklist.git","svn_url":"https://github.com/trias-project/unified-checklist","homepage":"","size":3010,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10"},"html":{"href":"https://github.com/trias-project/unified-checklist/pull/10"},"issue":{"href":"https://api.github.com/repos/trias-project/unified-checklist/issues/10"},"comments":{"href":"https://api.github.com/repos/trias-project/unified-checklist/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/trias-project/unified-checklist/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trias-project/unified-checklist/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/trias-project/unified-checklist/statuses/31f56bb1133e543d003edb9e809dd91f681d8097"}},"author_association":"NONE"}}
{"actor":{"display_login":"peterdesmet"}}