{"id":46066,"name":"kewr","description":"Meant to make accessing data from one of Royal Botanic Gardenn Kew easier and to provide a consistent interface their public APIs.","url":"https://github.com/barnabywalker/kewr","last_synced_at":"2026-04-14T17:00:41.039Z","repository":{"id":45366167,"uuid":"311999178","full_name":"barnabywalker/kewr","owner":"barnabywalker","description":"R Package to Access Kew Data APIs","archived":false,"fork":false,"pushed_at":"2022-06-30T11:32:44.000Z","size":2155,"stargazers_count":21,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-06T13:02:23.271Z","etag":null,"topics":["package","r"],"latest_commit_sha":null,"homepage":"https://barnabywalker.github.io/kewr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barnabywalker.png","metadata":{},"created_at":"2020-11-11T14:44:21.000Z","updated_at":"2026-01-22T20:30:16.000Z","dependencies_parsed_at":"2022-09-01T21:03:29.023Z","dependency_job_id":null,"html_url":"https://github.com/barnabywalker/kewr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barnabywalker/kewr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barnabywalker","download_url":"https://codeload.github.com/barnabywalker/kewr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31750704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"barnabywalker","name":null,"uuid":"6917951","kind":"user","description":null,"email":"","website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/6917951?v=4","repositories_count":5,"last_synced_at":"2023-03-08T22:05:12.973Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/barnabywalker","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-18T12:00:56.017Z","updated_at":"2023-03-08T22:05:13.043Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barnabywalker","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barnabywalker/repositories"},"packages":[],"commits":{"id":1358727,"full_name":"barnabywalker/kewr","default_branch":"main","total_commits":108,"total_committers":1,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":108.0,"dds":0.0,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-14T11:54:58.011Z","last_synced_commit":"d40e2ad916c73237578b03bea5beac85099df638","created_at":"2023-09-13T08:45:44.551Z","updated_at":"2026-04-14T11:54:57.984Z","committers":[{"name":"barnabywalker","email":"barnaby.walker08@gmail.com","login":"barnabywalker","count":108}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-14T00:00:07.982Z","repositories_count":6213322,"commits_count":903403347,"contributors_count":34927206,"owners_count":1144335,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"barnabywalker/kewr","html_url":"https://github.com/barnabywalker/kewr","last_synced_at":"2025-12-15T06:07:37.824Z","status":"error","issues_count":23,"pull_requests_count":39,"avg_time_to_close_issue":5250915.555555556,"avg_time_to_close_pull_request":255.2051282051282,"issues_closed_count":18,"pull_requests_closed_count":39,"pull_request_authors_count":1,"issue_authors_count":6,"avg_comments_per_issue":0.391304347826087,"avg_comments_per_pull_request":0.02564102564102564,"merged_pull_requests_count":38,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-09-13T08:46:15.001Z","updated_at":"2025-12-15T06:07:37.824Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/barnabywalker%2Fkewr/issues","issue_labels_count":{"enhancement":15,"documentation":3},"pull_request_labels_count":{},"issue_author_associations_count":{"OWNER":18,"NONE":5},"pull_request_author_associations_count":{"OWNER":39},"issue_authors":{"barnabywalker":18,"MjGSob01":1,"jgomezd":1,"pfrombris":1,"stevespages":1,"sagesteppe":1},"pull_request_authors":{"barnabywalker":39},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-14T00:00:07.923Z","repositories_count":14259628,"issues_count":34609914,"pull_requests_count":113169222,"authors_count":11234438,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"barnabywalker","count":57,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/barnabywalker"}],"active_maintainers":[]},"events":{"total":{"WatchEvent":2},"last_year":{"WatchEvent":2}},"keywords":["package","r"],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-09-01T21:03:28.866Z","updated_at":"2022-09-01T21:03:28.866Z","repository_link":"https://github.com/barnabywalker/kewr/blob/main/DESCRIPTION","dependencies":[{"id":3548909184,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 2.10","direct":true,"kind":"depends","optional":false},{"id":3548909185,"package_name":"httr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909186,"package_name":"jsonlite","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909187,"package_name":"glue","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909188,"package_name":"tibble","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909189,"package_name":"purrr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909190,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909191,"package_name":"stringr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909192,"package_name":"rvest","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909193,"package_name":"here","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909194,"package_name":"tidyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909195,"package_name":"rlang","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909196,"package_name":"generics","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":3548909197,"package_name":"testthat","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3548909198,"package_name":"knitr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3548909199,"package_name":"rmarkdown","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3548909200,"package_name":"ggplot2","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":3548909201,"package_name":"progress","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":3.258096538021482,"created_at":"2023-09-13T08:45:11.177Z","updated_at":"2026-04-14T17:00:41.042Z","avatar_url":"https://github.com/barnabywalker.png","language":"R","category":"Biosphere","sub_category":"Plants and Vegetation","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\r\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\r\n\r\n# kewr\r\n\r\n\u003c!-- badges: start --\u003e\r\n\r\n[![R build\r\nstatus](https://github.com/barnabywalker/kewr/workflows/R-CMD-check/badge.svg)](https://github.com/barnabywalker/kewr/actions)\r\n\u003c!-- badges: end --\u003e\r\n\r\nAn R package to access data from RGB Kew’s APIs.\r\n\r\n## Overview\r\n\r\nkewr is meant to make accessing data from one of RGB Kew easier and to\r\nprovide a consistent interface their public APIs.\r\n\r\nThis package should cover:\r\n\r\n-   [x] [World Checklist of Vascular\r\n    Plants](https://wcvp.science.kew.org/)\r\n-   [x] [Plants of the World Online](http://powo.science.kew.org/)\r\n-   [x] [International Plant Names Index](https://www.ipni.org/)\r\n-   [x] [Kew Names Matching Service](http://namematch.science.kew.org/)\r\n-   [x] [Kew’s Tree of Life](https://treeoflife.kew.org)\r\n-   [x] [Kew Reconciliation\r\n    Service](http://data1.kew.org/reconciliation/about/IpniName)\r\n\r\nNew sources will be added as they come up.\r\n\r\n## Installation\r\n\r\nkewr is not on CRAN yet but you can install the latest development\r\nversion from GitHub:\r\n\r\n``` r\r\n# install.packages(\"devtools\")\r\ndevtools::install_github(\"barnabywalker/kewr\")\r\n```\r\n\r\n## Usage\r\n\r\nFunctions in this package all start with a prefix specifying what action\r\nyou want to perform and a suffix referring to the resource.\r\n\r\nFour of the resources (POWO, WCVP, IPNI, and ToL) are databases storing\r\nflora, taxonomic, nomenclatural, or genetic information. These three\r\nresources all have a `search_*` and `lookup_*`.\r\n\r\n### Retrieving records\r\n\r\nThe `lookup_` functions can be used to retrieve a particular record by\r\nits unique IPNI ID:\r\n\r\n``` r\r\nlookup_powo(\"320035-2\")\r\nlookup_wcvp(\"320035-2\")\r\nlookup_ipni(\"320035-2\")\r\n```\r\n\r\nIPNI contains records for authors and publications, which can also be\r\nretrieved using the `lookup_ipni` function:\r\n\r\n``` r\r\nlookup_ipni(\"20885-1\", type=\"author\")\r\nlookup_ipni(\"987-2\", type=\"publication\")\r\n```\r\n\r\nThe ToL uses its own ID system. These IDs can be found by first\r\nsearching the database.\r\n\r\n``` r\r\nlookup_tol(\"2717\")\r\n```\r\n\r\n### Searching databases\r\n\r\nAll four of these databases can be searched as well:\r\n\r\n``` r\r\nsearch_powo(\"Poa annua\")\r\nsearch_wcvp(\"Poa annua\")\r\nsearch_ipni(\"Poa annua\")\r\nsearch_tol(\"Poa annua\")\r\n```\r\n\r\nAnd all, except the ToL, use filters and keywords for more advanced\r\nsearches:\r\n\r\n``` r\r\nsearch_powo(list(genus=\"Poa\", distribution=\"Madagascar\"), \r\n            filters=c(\"accepted\", \"species\"))\r\nsearch_wcvp(list(genus=\"Poa\"), filters=c(\"accepted\", \"species\"))\r\nsearch_ipni(list(genus=\"Poa\", published=1920),\r\n            filters=c(\"species\"))\r\n```\r\n\r\nThe number of search results returned are determined by the `limit`\r\nkeyword:\r\n\r\n``` r\r\nsearch_powo(list(genus=\"Poa\"), limit=20)\r\nsearch_wcvp(list(genus=\"Poa\"), limit=20)\r\nsearch_ipni(list(genus=\"Poa\"), limit=20)\r\nsearch_tol(\"Poa\", limit=20)\r\n```\r\n\r\nThe next page for a set of search results can be requested using the\r\n`request_next` function:\r\n\r\n``` r\r\nresults \u003c- search_powo(list(genus=\"Poa\"))\r\nrequest_next(results)\r\n```\r\n\r\n### Loading data from ToL\r\n\r\nTree and gene data can be loaded directly from ToL into R.\r\n\r\nFor instance, you can load the whole Tree of Life.\r\n\r\n``` r\r\nload_tol()\r\n```\r\n\r\nOr a gene tree for a particular gene.\r\n\r\n``` r\r\ngene_info \u003c- lookup_tol(\"51\", type=\"gene\")\r\nload_tol(gene_info$tree_file_url)\r\n```\r\n\r\nOr a FASTA file for a specimen.\r\n\r\n``` r\r\nspecimen_info \u003c- lookup_tol(\"1296\")\r\nload_tol(specimen_info$fasta_file_url)\r\n```\r\n\r\n### Downloading from the ToL\r\n\r\nThe corresponding files can also be downloaded for use later or in other\r\nprogrammes.\r\n\r\n``` r\r\nspecimen_info \u003c- lookup_tol(\"1296\")\r\ndownload_tol(specimen_info$fasta_file_url)\r\n```\r\n\r\n### Downloading the WCVP\r\n\r\nThe whole of WCVP can be download to a directory using:\r\n\r\n``` r\r\ndownload_wcvp()\r\n```\r\n\r\n### Matching names\r\n\r\nThe KNMS resource is only used for matching names to records in\r\nPOWO/WCVP:\r\n\r\n``` r\r\nmatch_knms(c(\"Poa annua\", \"Magnolia grandifolia\", \"Bulbophyllum sp.\"))\r\n```\r\n\r\nSingle names can also be matched to IPNI using the KRS resources.\r\n\r\n``` r\r\nmatch_krs(\"Poa annua\")\r\n```\r\n\r\nKRS is slower for matching many names, as a request needs to be made for\r\neach one. But it has the advantage of allowing more complex matching:\r\n\r\n``` r\r\nmatch_krs(list(genus=\"Solanum\", species=\"sanchez-vegae\", author=\"S.Knapp\"))\r\n```\r\n\r\n### Tidying results\r\n\r\nEach function in this package returns an object that stores the original\r\nresponse as well as the content of the response parsed into a list. This\r\nis to give the user as much flexibility as possible and to make\r\ndebugging things a bit easier.\r\n\r\nBut this can be hard to use, so all the results objects can be tidied as\r\na `tibble`:\r\n\r\n``` r\r\nresults \u003c- search_powo(\"Poa annua\")\r\ntidy(results)\r\n```\r\n\r\n## Citing\r\n\r\nYou can get information about how to cite `kewr` by using:\r\n\r\n``` r\r\ncitation(\"kewr\")\r\n```\r\n\r\nYou can also get the citation to use for each data service using the\r\ndifferent results objects:\r\n\r\n    r \u003c- search_wcvp(\"Poa\")\r\n    kew_citation(r)\r\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/46066","html_url":"https://ost.ecosyste.ms/projects/46066"}