Returns the path to bundled example bibliographic files in the package's
inst/extdata directory.
Real-use fixture
Three files form a synthetic fixture shaped like a corpus that was built
from a Web of Science export of three public-service units and their
academic partners. Everything in it is invented: units, cities, people,
journals, titles and DOIs (10.9999/...). The script
data-raw/realuse-fixture.R in the package sources rebuilds the files.
example_realuse_corpus.rdsAn sm_corpus built with
sm_corpus_from_tables(): 150 works from 2016 to 2026, with authors, Web of Science style addresses (ten of them German strings with non-ASCII letters), one corresponding author per work, sources, Web of Science style cited references and keyword and category concepts. Extraworkscolumns arequartile(NAfor every 2026 work),fwci,field(the first Web of Science category),volume,first_pageandcitations_as_of;work_idholds the Web of Science accession number.citations_by_yearholds yearly citation counts shaped like OpenAlex's, dated 2026-10-17 (citations_as_of) for the works with a DOI: the years 2017 to 2026, without the years that have no citations (seesm_citation_window()).metadata$last_refreshis a numeric time stamp in seconds since 1970-01-01 UTC.example_realuse_reference.csvA reference list in the style of a publication tracker, with columns
id,doi,title,year,institution(the reporting unit) andcategory(a publication class code). It holds 120 of the corpus works and 40 items that are not in the corpus.example_realuse_affiliation_dict.csvAn affiliation dictionary in the sm_affiliation_dict format (
institution,pattern,email_domain) forsm_affiliation_match(): institutes first, the hospital patterns anchored on its city next, a generic fallback last. Its institution names are theinstitutionvalues of the reference list.
The CSV files are UTF-8 encoded.
See also
Other example:
sm_example_corpus()
Examples
sm_example_files()
#> [1] "example.bib"
#> [2] "example.ris"
#> [3] "example_affiliation_postcode.csv"
#> [4] "example_dimensions.csv"
#> [5] "example_journal_index.csv"
#> [6] "example_lens.csv"
#> [7] "example_openalex.json"
#> [8] "example_openalex_inverted.json"
#> [9] "example_pubmed.xml"
#> [10] "example_realuse_affiliation_dict.csv"
#> [11] "example_realuse_corpus.rds"
#> [12] "example_realuse_reference.csv"
#> [13] "example_ror.csv"
#> [14] "example_scopus.csv"
#> [15] "example_self_citation_corpus.rds"
#> [16] "example_sparse.bib"
#> [17] "example_wos.txt"
sm_example_files("example.bib")
#> [1] "/home/runner/work/_temp/Library/scimapR/extdata/example.bib"
# The real-use fixture
fix <- readRDS(sm_example_files("example_realuse_corpus.rds"))
ref <- readr::read_csv(sm_example_files("example_realuse_reference.csv"),
col_types = "cccicc")
dict <- readr::read_csv(
sm_example_files("example_realuse_affiliation_dict.csv"),
col_types = "ccc"
)
matched <- sm_affiliation_match(fix, dict)
#> ✔ Affiliation matching flagged 427 authorships across 4 institutions.
#> ℹ By signal: name_token: 427. See `sm_affiliation_summary()` for the full
#> breakdown.
table(matched$authorships$institution_match, useNA = "ifany")
#>
#> Federal Public Services Institute of Microbiology
#> 85
#> Public Services Hospital Northtown
#> 176
#> Sonstige Dienststellen der Gesundheitsämter
#> 56
#> Zentrales Institut des Veterinärwesens Nordstadt
#> 110
#> <NA>
#> 365