| Type: | Package | 
| Title: | R Interface to the 'Deutsche Nationalbibliothek (German National Library) API' | 
| Version: | 0.1-5 | 
| Date: | 2022-05-12 | 
| Author: | Christian Graul [aut, cre] | 
| Maintainer: | Christian Graul <christian.graul@gmail.com> | 
| Description: | A wrapper for the 'Deutsche Nationalbibliothek (German National Library) API', available at https://www.dnb.de/EN/Home/home_node.html. The German National Library is the German central archival library, collecting, archiving, bibliographically classifying all German and German-language publications, foreign publications about Germany, translations of German works, and the works of German-speaking emigrants published abroad between 1933 and 1945. | 
| URL: | https://github.com/chgrl/rdnb | 
| BugReports: | https://github.com/chgrl/rdnb/issues | 
| License: | MIT + file LICENSE | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Imports: | brew, grDevices, httr, methods, utils, stats, stringr, xml2 | 
| Suggests: | knitr, markdown | 
| RoxygenNote: | 7.1.2 | 
| Packaged: | 2022-05-12 19:46:31 UTC; SauerGraul | 
| Repository: | CRAN | 
| Date/Publication: | 2022-05-12 21:00:02 UTC | 
R Interface to the Deutsche Nationalbibliothek (German National Library) API
Description
A wrapper for the Deutsche Nationalbibliothek (German National Library) API, available at https://www.dnb.de/EN/Home/home_node.html. The German National Library is the German central archival library, collecting, archiving, bibliographically classifying all German and German-language publications, foreign publications about Germany, translations of German works, and the works of German-speaking emigrants published abroad between 1933 and 1945.
Details
All bibliographic data of the German National Library are provided free of charge and can be freely re-used under "Creative Commons Zero" (CC0 1.0) terms. The metadata and online interfaces are provided with no guarantee of their being continuous, punctual, error-free or complete, or of their not infringing the rights of third parties (e.g. personal rights and copyright).
References
About the DNB: https://www.dnb.de/EN/Ueber-uns/ueberUns_node.html; about the interface: https://www.dnb.de/EN/Professionell/Metadatendienste/Datenbezug/SRU/sru_node.html
View changes notes.
Description
changes brings up the NEWS file of the package.
Usage
changes(pkg = "rdnb")
Arguments
| pkg | Set to the default "rdnb". Other packages make no sense. | 
Examples
## Not run: 
changes()
## End(Not run)
Search the DNB catalogue - advanced search
Description
dnb_search exposes a search in the DNB catalogue, expressed in the DNB query language.
Usage
dnb_advanced(query, limit = 10, clean = TRUE, print = FALSE)
Arguments
| query | the search query, expressed in the DNB query language; single string value. | 
| limit | number and (optional) starting point of results returned; single integer value (number of results), vector of two integer values (number of results and first result, >=1) or  | 
| clean | if  | 
| print | if  | 
Details
Cleaning of results
To harmonise the results, some clutter is deleted and abbreviations frequently used in the dnb catalogue are replaced by full words. Here is a list of all replacements:
| Variable | Searched | Replaced by | 
| complete dataset | \u0098 | [deleted] | 
| complete dataset | \u009c | [deleted] | 
| complete dataset | ,, | , | 
| complete dataset | .. | . | 
| complete dataset | ;; | ; | 
| year | [string] | [numeric] | 
| pages | S. | [deleted] | 
| pages | Seiten | [deleted] | 
| pages | [ | [deleted] | 
| pages | ] | [deleted] | 
| publisher | Verl. | Verlag | 
| publisher | verl. | verlag | 
| publisher | [ | [deleted] | 
| publisher | ] | [deleted] | 
| edition | Aufl. | Auflage | 
| edition | aufl. | auflage | 
| edition | Orig. | Original | 
| edition | Ed. | Edition | 
| edition | ed. | edition | 
| edition | Ausg. | Ausgabe | 
| edition | ausg. | ausgabe | 
| edition | Nachdr. | Nachdruck | 
| edition | Bibliogr. | Bibliografie | 
| edition | [ | [deleted] | 
| edition | ] | [deleted] | 
| edition | [x]., | [x]. | 
| price | kart. | Kartoniert | 
| price | Gb. | Gebunden | 
| price | Spiralb. | Spiralbindung | 
| price | Pb. | Paperback | 
Value
A data.frame of results with metadata.
Examples
## Not run: 
# german books titled with 'cat' (male or female), 
# excluding titles containing dogs, since the year 2001
cats <- dnb_advanced("(tit=katze OR tit=kater NOT tit=hund) AND jhr>2000 AND mat=books AND spr=ger")
## End(Not run)
Search the DNB catalogue - simple search
Description
dnb_search exposes a search in the DNB catalogue.
Usage
dnb_search(
  title,
  author,
  year,
  publisher,
  keyword,
  type,
  language,
  limit = 10,
  clean = TRUE,
  print = FALSE
)
Arguments
| title | the title (including subtitle, short title, volume title, etc.); optional single string value or vector of strings. | 
| author | the author(s); optional single string value or vector of strings. | 
| year | the year of publishing; optional single integer value or vector of integers. | 
| publisher | the publisher (publisher name and/or location); optional single string value or vector of strings. | 
| keyword | one or a set of keywords describing the work (subjects, persons, locations, organisations, etc.); optional single string value or vector of strings. | 
| type | the type of publication (optional), one or a vector of  | 
| language | the language of the work by ISO 639-2/B code (https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes); single string value or vector of strings. | 
| limit | number and (optional) starting point of results returned; single integer value (number of results), vector of two integer values (number of results and first result, >=1) or  | 
| clean | if  | 
| print | if  | 
Details
to do
Value
A list of results with metadata.
Examples
## Not run: 
# title search
single.title <- dnb_search(title="katze")
multi.title <- dnb_search(title=c("katze", "kater", "+maus", "-hund"))
# author search
single.author <- dnb_search(author="kern")
author.or.author <- dnb_search(author=c("kern", "locke"))
author.and.author <- dnb_search(author=c("kern", "+locke"))
author.not.author <- dnb_search(author=c("kern", "-locke"))
# publication year 
single.year <- dnb_search(title="katze", year=2015)
sequence.of.years <- dnb_search(title="katze", year=2010:2015)
set.of.years <- dnb_search(title="katze", year=c(2010:2013, 2015))
# publisher search
single.publisher <- dnb_search(title="katze", publisher="kiepenheuer")
set.of.publishers <- dnb_search(title="katze", publisher=c("kiepenheuer", "piper"))
# keyword search
single.keyword <- dnb_search(author="kern")
keyword.or.keyword <- dnb_search(keyword=c("katze", "hund"))
keyword.and.keyword <- dnb_search(keyword=c("katze", "+hund"))
keyword.not.keyword <- dnb_search(keyword=c("katze", "-hund"))
# type search
single.type <- dnb_search(title="katze", type="books")
set.of.types <- dnb_search(title="katze", type=c("books", "articles", "online"))
# language search
single.language <- dnb_search(title="cat", language="eng")
set.of.languages <- dnb_search(title=c("cat", "katze"), language=c("eng", "ger"))
# change limit of results
first.result <- dnb_search(title="katze", limit=1)
5.results.starting.with.the.21st <- dnb_search(title="katze", limit=c(5, 21))
all.results <- dnb_search(title="katze", limit="all")
## End(Not run)
Number of records
Description
n_rec returns the number of items in a list of records returned by a DNB-search.
Usage
n_rec(dnb_obj)
Arguments
| dnb_obj | the DNB-search object returned  | 
Value
Number of records found.
Examples
## Not run: 
dnb.srch <- dnb_search(title="katze")
n_rec(dnb.srch)
## End(Not run)
Print search query
Description
print_query prints out the query used for a DNB-search request.
Usage
print_query(dnb_obj)
Arguments
| dnb_obj | the DNB-serch object returned by  | 
Value
Query string.
Examples
## Not run: 
dnb.srch <- dnb_search(title="katze")
print_query(dnb.srch)
## End(Not run)