This R package provides tools to extract and analyse textual annotation fields from the British Library ESTC library catalogue. Summaries of the ESTC data analysis are linked at the README file
Your contributions, bug reports and feedback are welcome!
We assume you have installed R. If you use RStudio, change the default encoding to UTF-8.
Installing the development version in R:
library(devtools) install_github("ropengov/estc")
Load the ESTC tools
library(estc)
Set UTF-8 encoding
Sys.setlocale(locale="UTF-8")
For further help with R, see this page
The ESTC data collection is not publicly available at the moment. The examples assume you have access to this data.
We use MARCdata parser to pick selected fields from the source XML files and convert these into a CSV file.
To repeat the analysis, run main.R. This will execute the complete analysis from raw data to the final summary documents. It has two main parts:
preprocessing.R loads and preprocesses the parsed SQL data tables. It cleans up the raw data fields with the support of various synonyme and mapping lists, and publicly available data sources (check the source code for full details). This produces the final preprocessed data matrix that can be used for further analysis. This data is confidential so we cannot share it here.
analysis.R reads and analyzes the final preprocessed data table, and produces the final statistical summaries and visualizations of the data. These include several markdown (.md) files listed in the README file.
Some examples of the ESTC-specific analysis tools provided in this package are listed below.
Harmonize publisher information:
polish_publisher(c("printed by John Marshall, at No. 4, Bow-Lane", "printed and sold by John Marshall, Aldermary Church Yard"))
Mapping places to countries
get_country(c("Middelburg", "Newcastle"))
Gender information
gendermap <- read_mapping(system.file("extdata/gendermap.csv", package = "bibliographica"), sep = "\t", from = "name", to = "gender") get_gender(c("margaret"), gendermapp)
Whereas this package focuses on the ESTC data, it utilizes additional tools from the more generic bibliographica and many other R packages.
This work can be freely used, modified and distributed under the Two-clause BSD license.
citation("estc")
This vignette was created with
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.