{"id":348962,"name":"rinat","description":"R wrapper for iNaturalist APIs for accessing the observations.","url":"https://github.com/ropensci/rinat","last_synced_at":"2026-04-12T11:30:15.534Z","repository":{"id":49780679,"uuid":"13307553","full_name":"ropensci/rinat","owner":"ropensci","description":"A programmatic interface to iNaturalist","archived":false,"fork":false,"pushed_at":"2025-08-30T16:29:07.000Z","size":5056,"stargazers_count":67,"open_issues_count":14,"forks_count":19,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-03-30T05:48:20.633Z","etag":null,"topics":["inaturalist","r","r-package","rstats","spocc"],"latest_commit_sha":null,"homepage":"https://docs.ropensci.org/rinat","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/ropensci.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-10-03T19:26:27.000Z","updated_at":"2026-03-18T01:55:50.000Z","dependencies_parsed_at":"2026-03-30T05:00:52.942Z","dependency_job_id":null,"html_url":"https://github.com/ropensci/rinat","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ropensci/rinat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","download_url":"https://codeload.github.com/ropensci/rinat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31268586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T05:46:55.838Z","status":"ssl_error","status_checked_at":"2026-04-01T05:46:47.827Z","response_time":53,"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":"ropensci","name":"rOpenSci","uuid":"1200269","kind":"organization","description":"","email":"info@ropensci.org","website":"https://ropensci.org/","location":"Berkeley, CA","twitter":"rOpenSci","company":null,"icon_url":"https://avatars.githubusercontent.com/u/1200269?v=4","repositories_count":307,"last_synced_at":"2023-03-10T20:30:59.242Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/ropensci","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-02T19:23:08.224Z","updated_at":"2023-03-10T20:30:59.305Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci/repositories"},"packages":[],"commits":{"id":1369814,"full_name":"ropensci/rinat","default_branch":"master","total_commits":158,"total_committers":12,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":13.166666666666666,"dds":0.6012658227848101,"past_year_total_commits":8,"past_year_total_committers":2,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":4.0,"past_year_dds":0.125,"last_synced_at":"2026-04-09T10:28:20.198Z","last_synced_commit":"44c9f1c892765e40948b2a286a53f302328ccf03","created_at":"2023-09-13T14:59:22.881Z","updated_at":"2026-04-09T10:28:09.185Z","committers":[{"name":"Stéphane Guillou","email":"stephane.guillou@member.fsf.org","login":"stragu","count":63},{"name":"Edmund Hart","email":"edmund.m.hart@gmail.com","login":"emhart","count":38},{"name":"LDalby","email":"lars.dalby@gmail.com","login":"LDalby","count":19},{"name":"Scott Chamberlain","email":"myrmecocystus@gmail.com","login":"sckott","count":17},{"name":"VijayBarve","email":"vjaybarve@rediffmail.com","login":"vijaybarve","count":6},{"name":"Edmund Hart","email":"edmundhart@Edmunds-MacBook-Pro.local","login":null,"count":5},{"name":"steven2249","email":"stevenysw@berkeley.edu","login":"stevenysw","count":3},{"name":"Martin-Jung","email":"martinjung@zoho.com","login":"Martin-Jung","count":3},{"name":"beausoleilmo","email":"beausoleilmo@gmail.com","login":"beausoleilmo","count":1},{"name":"Maëlle Salmon","email":"maelle.salmon@yahoo.se","login":"maelle","count":1},{"name":"Karthik Ram","email":"karthik.ram@gmail.com","login":"karthik","count":1},{"name":"Jeroen Ooms","email":"jeroenooms@gmail.com","login":"jeroen","count":1}],"past_year_committers":[{"name":"Stéphane Guillou","email":"stephane.guillou@member.fsf.org","login":"stragu","count":7},{"name":"beausoleilmo","email":"beausoleilmo@gmail.com","login":"beausoleilmo","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:23.197Z","repositories_count":6212606,"commits_count":905126127,"contributors_count":34959241,"owners_count":1143601,"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":"ropensci/rinat","html_url":"https://github.com/ropensci/rinat","last_synced_at":"2026-03-22T01:00:45.883Z","status":"active","issues_count":48,"pull_requests_count":15,"avg_time_to_close_issue":16584113.5,"avg_time_to_close_pull_request":7273298.357142857,"issues_closed_count":34,"pull_requests_closed_count":14,"pull_request_authors_count":9,"issue_authors_count":28,"avg_comments_per_issue":2.3541666666666665,"avg_comments_per_pull_request":0.7333333333333333,"merged_pull_requests_count":11,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":2,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":1421700.0,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":1,"past_year_pull_request_authors_count":2,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":1,"created_at":"2023-09-13T14:59:34.190Z","updated_at":"2026-03-22T01:00:45.883Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Frinat/issues","issue_labels_count":{"bug":3,"enhancement":2,"good first issue":1,"API v1":1,"high priority":1},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":22,"CONTRIBUTOR":19,"COLLABORATOR":6,"MEMBER":1},"pull_request_author_associations_count":{"CONTRIBUTOR":9,"NONE":5,"MEMBER":1},"issue_authors":{"sckott":8,"emhart":6,"stragu":6,"philippi":2,"LDalby":2,"vijaybarve":2,"sgdrewry":1,"lbourgeaud":1,"Martin-Jung":1,"Cactusolo":1,"fischhoff":1,"bomeara":1,"bjornekstrom":1,"TlaskalV":1,"ZekeMarshall":1,"kang37":1,"jbohenek":1,"abichat":1,"aph82":1,"miistakis":1,"sastoudt":1,"azizka":1,"enjieli":1,"stst42":1,"maelle":1,"julian-wittische":1,"tphilippi":1,"rsh249":1},"pull_request_authors":{"LDalby":5,"Rishi0812":2,"vijaybarve":2,"maelle":1,"sastoudt":1,"Martin-Jung":1,"abichat":1,"beausoleilmo":1,"stevenysw":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:10.509Z","repositories_count":14202855,"issues_count":34661405,"pull_requests_count":113271142,"authors_count":11232236,"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":{"NONE":1},"past_year_pull_request_author_associations_count":{"NONE":2},"past_year_issue_authors":{"abichat":1},"past_year_pull_request_authors":{"abichat":1,"beausoleilmo":1},"maintainers":[{"login":"stragu","count":6,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/stragu"},{"login":"maelle","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/maelle"}],"active_maintainers":[]},"events":{"total":{"ReleaseEvent":1,"PullRequestEvent":1,"IssuesEvent":2,"WatchEvent":9,"IssueCommentEvent":6,"PushEvent":4},"last_year":{"ReleaseEvent":1,"PullRequestEvent":1,"WatchEvent":4,"IssueCommentEvent":2,"PushEvent":4}},"keywords":["inaturalist","r","r-package","rstats","spocc"],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-09-18T07:23:38.310Z","updated_at":"2022-09-18T07:23:38.310Z","repository_link":"https://github.com/ropensci/rinat/blob/master/DESCRIPTION","dependencies":[{"id":5245526177,"package_name":"httr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526178,"package_name":"curl","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526179,"package_name":"plyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526180,"package_name":"jsonlite","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526181,"package_name":"ggplot2","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526182,"package_name":"maps","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526183,"package_name":"sp","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":5245526184,"package_name":"knitr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526185,"package_name":"rmarkdown","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526186,"package_name":"testthat","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526187,"package_name":"sf","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526188,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526189,"package_name":"lubridate","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526190,"package_name":"ggforce","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526191,"package_name":"stringr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":5245526192,"package_name":"purrr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":6.87935580446044,"created_at":"2026-03-20T00:12:51.230Z","updated_at":"2026-04-12T11:30:15.544Z","avatar_url":"https://github.com/ropensci.png","language":"R","category":"Biosphere","sub_category":"Biodiversity Data Access and Management","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"---\ntitle: \"rinat: Access iNaturalist data with R\"\nauthor: Edmund Hart, Stéphane Guillou\noutput: github_document\n---\n\n```{r setup, include=FALSE}\nknitr::opts_chunk$set(echo = TRUE, warning = FALSE)\n```\n\n[![Build status](https://ci.appveyor.com/api/projects/status/gv7s9um107bep4na/branch/master)](https://ci.appveyor.com/project/sckott/rinat/branch/master)\n[![](https://cranlogs.r-pkg.org/badges/rinat)](https://CRAN.R-project.org/package=rinat)\n\nR wrapper for iNaturalist APIs for accessing the observations. The detailed documentation of the API is available on the [iNaturalist website](https://www.inaturalist.org/pages/api+reference) and is part of our larger species occurrence searching packages [SPOCC](https://github.com/ropensci/spocc).\n\n\n## Installation\n\nYou can install the latest version available on CRAN with:\n\n```{r eval=FALSE}\ninstall.packages(\"rinat\")\n```\n\nAlternatively, you can install the development version from Github with:\n\n```{r eval=FALSE}\nremotes::install_github(\"ropensci/rinat\")\n```\n\n## Usage\n\n### Get observations\n\n`get_inat_obs()` is the primary function that retrieves observations from iNaturalist. The text or taxon search can be refined by observation date, record quality and location.\n\n\u003e It is recommended to set the `quality` argument to `\"research\"` in order to get more reliable data that has been validated by several contributors.\n\n#### Taxon search\n\nTo return only records of a specific species or taxonomic group, use the `taxon_name` argument. For example, to return observations of anything from the Nymphalidae family, and restricting the search to the year 2015:\n\n```{r}\nlibrary(rinat)\nnymphalidae \u003c- get_inat_obs(taxon_name  = \"Nymphalidae\", year = 2015)\n# how many unique taxa?\nlength(unique(nymphalidae$scientific_name))\n```\n\n\u003e Note that `get_inat_obs()` will return 100 observations by default. This can be controlled with the `maxresults` argument.\n\n#### Text search\n\nYou can also search observations with any string. It will search the entire iNaturalist database, so the search below will return all entries that _mention_ Monarch butterflies, not just Monarch observations.\n\n```{r}\nmonarchs \u003c- get_inat_obs(query = \"Monarch Butterfly\", year = 2021)\n# which taxa were returned?\nunique(monarchs$scientific_name)\n```\n\nYou can combine the fuzzy search with the precise taxon search. For example, to get Monarch butterfly observations that also mention the term \"chrysalis\":\n\n```{r}\nmonarch_chrysalis \u003c- get_inat_obs(taxon_name = \"Danaus plexippus\", query = \"chrysalis\")\n```\n\n#### Bounding box search\n\nYou can also search within a bounding box by giving a simple set of coordinates.\n\n```{r}\n## Search by area\nbounds \u003c- c(38.44047, -125, 40.86652, -121.837)\ndeer \u003c- get_inat_obs(query = \"Mule Deer\", bounds = bounds)\nplot(deer$longitude, deer$latitude)\n```\n\n\n### Other functions\n\nMore functions are available, notably to access:\n\n* observations in a project with `get_inat_obs_project()`\n* details of a single observation with `get_inat_obs_id()`\n* observations from a single user with `get_inat_obs_user()`\n* taxa statistics with `get_inat_taxon_stats()`\n* user statistics with `get_inat_user_stats()`\n\nMore detailed examples are included in the vignette:\n\n```{r eval=FALSE}\nvignette(\"rinat-intro\", package = \"rinat\")\n```\n\n\n#### Mapping\n\nBasic maps can be created with the `inat_map()` function to quickly visualize search results. The `plot = FALSE` option can be used to avoid displaying the initial plot when further customising it with ggplot2 functions.\n\n```{r fig.width=7, fig.height=4, fig.retina=3}\nlibrary(ggplot2)\n\n## Map 100 spotted salamanders\na_mac \u003c- get_inat_obs(taxon_name = \"Ambystoma maculatum\", year = 2021)\nsalamander_map \u003c- inat_map(a_mac, plot = FALSE)\n\n### Further customise the returned ggplot object\nsalamander_map + borders(\"state\") + theme_bw()\n```\n\n`inat_map()` is useful for quickly mapping single-species data obtained with rinat. However, more complicated plots are best made from scratch. Here is an example of customised map that does not make use of it. (Note the use of `quality = \"research\"` to restrict the search to the more reliable observations.)\n\n```{r fig.width=7, fig.height=7, fig.retina=3}\n## A more elaborate map of Colibri sp.\ncolibri \u003c- get_inat_obs(taxon_name = \"Colibri\",\n                        quality = \"research\",\n                        maxresults = 500)\nggplot(data = colibri, aes(x = longitude,\n                         y = latitude,\n                         colour = scientific_name)) +\n  geom_polygon(data = map_data(\"world\"),\n                   aes(x = long, y = lat, group = group),\n                   fill = \"grey95\",\n                   color = \"gray40\",\n                   size = 0.1) +\n  geom_point(size = 0.7, alpha = 0.5) +\n  coord_fixed(xlim = range(colibri$longitude, na.rm = TRUE),\n              ylim = range(colibri$latitude, na.rm = TRUE)) +\n  theme_bw()\n```\n\n\n---\n\n[![](http://ropensci.org/public_images/github_footer.png)](https://ropensci.org/)\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["routes","cycle","biology","biodiversity","gbif","species","oscibio","lifewatch","taxonomy","taxize"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/348962","html_url":"https://ost.ecosyste.ms/projects/348962"}