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

bibliomatrix

R build status R-CMD-check

The goal of bibliomatrix is to provide a common set of functionality for the Annual Bibliometric Monitoring efforts from the Bibliometrics team at the KTH Library.

Contact

If you have queries related to the content, functionality or methods used, please send an email to the KTH Library at biblioteket@kth.se. For technical queries or feature requests, please open an issue on this repository.

Installation

You can install the latest released version of bibliomatrix from GitHub with:

# install.packages("devtools")
devtools::install_github("KTH-Library/bibliomatrix")

For the latest development version, use the code below. Note that this version may contain errors and experimental features.

devtools::install_github("KTH-Library/bibliomatrix@devel")

Public data

The package includes data from the KTH Annual Bibliometric Monitoring (ABM) public part.

library(bibliomatrix)
library(dplyr)

# Simple example showing some KTH units for which ABM results are public
abm_public_kth$meta %>%
  select(unit_code, unit_long_en) %>%
  head() %>%
  knitr::kable(format = "pipe")

# KTH is level 0, schools level 1 and departments level 2.
# Some basic information about KTH schools:
abm_public_kth$meta %>%
  filter(org_level == 1) %>%
  select(Diva_org_id, unit_code, unit_short, unit_long_en) %>%
  knitr::kable(format = "pipe")

# Get ABM results for KTH
kth_abm_tables <- abm_public_kth$units$KTH

# Show parts of ABM table 1 for KTH
kth_abm_tables[[1]] %>%
  select(Publication_Type_DiVA, P_frac, WoS_coverage) %>%
  filter(P_frac > 50) %>%
  knitr::kable(format = "pipe")

Development

To further develop or change the package, please refer to instructions at http://r-pkgs.org/, then fork this repo, clone it, make the changes and whe done, submit a PR with the changes.

If you wish to work from the CLI, you can use this approach:

https://github.com/KTH-Library/kontarion#contributions

For a concrete example - to make a change with regards to adding tests, follow instructions for how to add a test and add it in test/testthat/ making sure that it verifies expected results, then do the Ctrl+Shift+{D,T,E} steps (if using keyboard shortcuts) and then use git to commit and push the changes to your fork, then issue a PR.

Releasing a stable version

Before making a stable release from the master branch, ensure all tests are successful and that any issues identified from deployments in the staging/reference environment have been resolved.

Then agree with the team on semantic versioning number for the stable release. Normally given a format such as "1.0.0", this would mean to bump the third (last) number for a patch/bugfix, to bump the second number for a minor update, such as when adding non-breaking functionality, and to bump the first number for any major update that might involve potentially backwards-compatibility breaking major refactorings or rewrites.

To release a stable version, use the following steps:

This versioned release can now be used elsewhere, such as in the kontarion repo when making a versioned release there where the tagged bibliomatrix release for this specific version can be explicitly specified.



KTH-Library/bibliomatrix documentation built on Feb. 29, 2024, 5:54 a.m.