knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

magutils

R-CMD-check

The goal of magutils is to facilitate loading and extracting data from a database with records from Microsoft Academic Graph and ProQuest Dissertations and make the functions available to co-authors and RAs. In the future, we may publish a "back-end" package to generate the database.

Installation

You can install the development version of magutils from GitHub with:

# install.packages("devtools")
devtools::install_github("f-hafner/magutils", build_vignettes = TRUE)

Example

If you do not have access to the full database, use the example database like this:

library(magutils)

db_file <- db_example("AcademicGraph.sqlite")
conn <- connect_to_db(db_file)

Then query the graduate links:

links <- get_links(conn, from = "graduates", lazy = TRUE)

Or query info on graduates:

graduates <- get_proquest(conn, from = "graduates", lazy = FALSE, limit = 3)

You can join the two together

library(magrittr)
links <- get_links(conn, from = "graduates", lazy = TRUE)
d_full <- get_proquest(conn, from = "graduates", limit = 5) %>%
  dplyr::left_join(links, by = "goid") %>%
  dplyr::collect()

At the end, do not forget to disconnect from the database:

DBI::dbDisconnect(conn)

Main functions

Extracting key tables

Suggested usage

Load the links and/or proquest data, augment them as necessary, and then collect into memory.

For more details, browseVignettes("magutils").



f-hafner/magutils documentation built on Sept. 20, 2023, 5:05 a.m.