knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", message = FALSE )
openlibraryR is an R package that provides a simple wrapper for the Open Library API.
Open Library is an initiative of the Internet Archive, a 501(c)(3) non-profit, building a digital library of Internet sites and other cultural artifacts in digital form.
Hex sticker icon by mangsaabguru.
You can install the development version of openlibraryR from Github:
devtools::install_github("walkerkq/openlibraryR")
You do not need an account or key to access the Open Library API. There is only method provided which returns book details from an ISBN (International Standard Book Number).
my_book <- openlibraryR::get_books(book_id = '0486282112') str(my_book)
Use tidyr::unnest
to access the various nested data.
library(dplyr) my_book %>% select(authors) %>% tidyr::unnest(authors, names_sep = '_') my_book %>% select(identifiers) %>% tidyr::unnest(identifiers) my_book %>% select(subject_people) %>% tidyr::unnest(subject_people, names_sep = '_')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.