• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    R
  • Created about 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

R Interface to the Better BiBTex Zotero Connector

rbbt

R build status

The goal of rbbt is to connect R to the Better Bibtex for Zotero connector. This allows the insertion of in-text citations (pandoc or LaTex style) and BibLaTex bibliography items directly into the RStudio editor using the RStudio addin, or to the console otherwise.

Installation

You can install rbbt from GitHub with:

remotes::install_github("paleolimbot/rbbt")
library(rbbt)

You will also need Zotero installed and running, and the Better BibTeX for Zotero add-on installed.

RStudio Addin

This package is most useful for the RStudio addins that insert citations and references into the editor. The “Insert Zotero Citation” will pop up a zotero search where you can search for a reference to add to your writing (Markdown, RMarkdown, or LaTeX). The “Insert Zotero Bibliography” addin inserts the bibliographical information corresponding to the selected item in the Zotero window. Finally, “Update bibliography for current document” runs bbt_update_bib() to update the bibliography based on the .Rmd file currently in the editor window. You can bind either of these to keyboard shortcuts in RStudio. The addins may behave differently depending on which file you have open (e.g., if you have a .bib file open, it will use the biblatex translator)…if you need more fine-grained control, try one of the console functions (like bbt_bib()!).

knitr + rmarkdown integration

To make this work seamlessly with knitr and rmarkdown, use the “Update bibliography for current document” addin to write your bibliography file based on the citations in the currently selected document. You can use bbt_update_bib("some_file.Rmd") to detect citations and write your bibliography file from the console.

Programmatically fetch bibliography info

Fetch bibliography text using a list of Better BibTex citation keys:

# uses the citation keys you've defined with Better BibTeX
rbbt::bbt_bib("dunnington_etal18", translator = "biblatex", .action = bbt_print)

@article{dunnington_etal18,
  title = {Anthropogenic Activity in the {{Halifax}} Region, {{Nova Scotia}}, {{Canada}}, as Recorded by Bulk Geochemistry of Lake Sediments},
  author = {Dunnington, Dewey W. and Spooner, I. S. and Krkošek, Wendy H. and Gagnon, Graham A. and Cornett, R. Jack and White, Chris E. and Misiuk, Benjamin and Tymstra, Drake},
  date = {2018-06-18},
  journaltitle = {Lake and Reservoir Management},
  volume = {34},
  number = {4},
  pages = {334--348},
  doi = {10.1080/10402381.2018.1461715},
  abstract = {Separating the timing and effects of multiple watershed disturbances is critical to a comprehensive understanding of lakes, which is required to effectively manage lacustrine systems that may be experiencing adverse water quality changes. Advances in X-ray fluorescence (XRF) technology has led to the availability of high-resolution, high-quality bulk geochemical data for aquatic sediments, which in combination with carbon, nitrogen, δ13C, and δ15N have the potential to identify watershed-scale disturbance in lake sediment cores. We integrated documented anthropogenic disturbances and changes in bulk geochemical parameters at 8 lakes within the Halifax Regional Municipality (HRM), Nova Scotia, Canada, 6 of which serve as drinking water sources. These data reflect more than 2 centuries of anthropogenic disturbance in the HRM that included deforestation, urbanization and related development, and water-level change. Deforestation activity was documented at Lake Major and Pockwock Lake by large increases in Ti, Zr, K, and Rb (50–300\%), and moderate increases in C/N ({$>$}10\%). Urbanization was resolved at Lake Fletcher, Lake Lemont, and First Lake by increases in Ti, Zr, K, and Rb (10–300\%), decreases in C/N ({$>$}10\%), and increases in δ15N ({$>$}2.0‰). These data broadly agree with previous paleolimnological bioproxy data, in some cases identifying disturbances that were not previously identified. Collectively these data suggest that bulk geochemical parameters and lake sediment archives are a useful method for lake managers to identify causal mechanisms for possible water quality changes resulting from watershed-scale disturbance.}
}

Fetch bibliography text from selected items in Zotero:

# uses whatever is currently selected in the zotero window
rbbt::bbt_bib_selected(translator = "biblatex", .action = bbt_print)

@article{dunnington_spooner18,
  title = {Using a Linked Table-Based Structure to Encode Self-Describing Multiparameter Spatiotemporal Data},
  author = {Dunnington, Dewey W. and Spooner, Ian S.},
  date = {2018-03-18},
  journaltitle = {FACETS},
  volume = {3},
  number = {1},
  pages = {326--337},
  doi = {10.1139/facets-2017-0026},
  abstract = {Multiparameter data with both spatial and temporal components are critical to advancing the state of environmental science. These data and data collected in the future are most useful when compared with each other and analyzed together, which is often inhibited by inconsistent data formats and a lack of structured documentation provided by researchers and (or) data repositories. In this paper we describe a linked table-based structure that encodes multiparameter spatiotemporal data and their documentation that is both flexible (able to store a wide variety of data sets) and usable (can easily be viewed, edited, and converted to plottable formats). The format is a collection of five tables (Data, Locations, Params, Data Sets, and Columns), on which restrictions are placed to ensure data are represented consistently from multiple sources. These tables can be stored in a variety of ways including spreadsheet files, comma-separated value (CSV) files, JavaScript object notation (JSON) files, databases, or objects in a software environment such as R or Python. A toolkit for users of R statistical software was also developed to facilitate converting data to and from the data format. We have used this format to combine data from multiple sources with minimal metadata loss and to effectively archive and communicate the results of spatiotemporal studies. We believe that this format and associated discussion of data and data storage will facilitate increased synergies between past, present, and future data sets in the environmental science community.}
}

More Repositories

1

ggspatial

Enhancing spatial visualization in ggplot2
R
353
star
2

geoarrow

Extension types for geospatial data for use with 'Arrow'
C
124
star
3

geos

Open Source Geometry Engine ('GEOS') R API
R
60
star
4

wk

Lightweight Well-Known Geometry Parsing
R
43
star
5

exifr

Read EXIF data in R using ExifTool
R
33
star
6

tidypaleo

Tidy tools for paleoenvironmental archives
R
32
star
7

narrow

An R interface to the 'Apache Arrow' C API
C
30
star
8

s2geography

Simple features (ish) for s2geometry
C++
27
star
9

geovctrs

Common Classes and Data Structures for Geometry Vectors
R
25
star
10

mudata2

Interchange Tools for Multi-Parameter Spatiotemporal Data
R
24
star
11

rosm

Plot Open Street Map and Other Tiles in R
R
24
star
12

prettymapr

Scale Bar, North Arrow, and Pretty Margins in R
R
22
star
13

CanadaWeather

Canadian Weather from Environment Canada for Android
Java
20
star
14

tidyphreeqc

Tidy geochemical modeling using PHREEQC
R
20
star
15

libgeos

Open Source Geometry Engine (GEOS) C API
C++
18
star
16

rclimateca

An R Package to fetch climate data from Environment Canada
R
16
star
17

chemr

data structures for chemistry in R
R
16
star
18

libproj

Generic Coordinate Transformation Library ('PROJ') C API
C
16
star
19

crs2crs

Generic Coordinate System Transforms
R
14
star
20

shp

Read Shapefiles
C
11
star
21

geoarrow-data

R
11
star
22

ggr6

An Implementation of the Grammar of Graphics in R6
R
11
star
23

s2plot

Plot spatial objects on a sphere
R
10
star
24

JupyterQt

Python
10
star
25

grd

Raster and Grid Geometry
R
9
star
26

gpkg

Proof of Concept 'GeoPackage' to Arrow Converter
C
9
star
27

ggdebug

Debug functions and ggproto methods in ggplot2
R
8
star
28

tf

'TensorFlow' C API Wrapper
R
8
star
29

rcanvec

Access and plot CanVec and CanVec+ data for rapid basemap creation in Canada
R
8
star
30

geoarrow-cpp-old

C++
8
star
31

xrftools

XRF tools for R
HTML
8
star
32

pb210

Lead-210 dating utilities
R
7
star
33

pkd

Compact Integer and Float Vectors
R
7
star
34

carbon14

Tidy Radiocarbon Dating Tools
R
7
star
35

rstudioconf2020

Source + slides for rstudio::conf(2020) presentation
R
7
star
36

rtree

Experimental 'RTree' Spatial Indexing
C++
7
star
37

r4transform2021

7
star
38

metal

See If We Can Use Apple Metal In R
C++
6
star
39

datafusion

Experimental R Bindings to Datafusion
Rust
6
star
40

dflite

Lightweight DataFrame for data science.
Python
6
star
41

geocrs

Create and Validate Coordinate Reference System Definitions
R
6
star
42

physical-geology

A bookdown version of "Physical Geology" by Karla Panchuk and Steven Earle
HTML
6
star
43

grib

Read Gridded Binary ('GRIB') Files
C
5
star
44

wkutils

Utilities for Well-Known Geometry Vectors
C++
5
star
45

minimal-thesis-bookdown

TeX
5
star
46

demoadbcplyr

Demonstrate 'dbplyr' through 'ADBC' via FlightSQL
R
5
star
47

rlibpal

Label placement using libpal
C++
5
star
48

rfc86

Tests GDAL RFC 86 Columnar API
R
5
star
49

easyphreeqc

A slightly easier R interface to phreeqc modeling
R
4
star
50

radbc

Experiments with ADBC
C
4
star
51

nanoarrow

Helpers for Arrow C Data & Arrow C Stream interfaces
C
4
star
52

ggoce

Plot 'oce' objects using 'ggplot2'
R
4
star
53

electionca

Canadian Elections Data
R
4
star
54

tidystats

Tidy data port of the stats package
R
4
star
55

geoproj

Low-level Access to the PROJ Library
C++
4
star
56

ggpy

python ggplot without matplotlib
Python
3
star
57

ggverbs

Verbifying noun functions in the ggplot2 package
R
3
star
58

r2d3globe

Intractive Globes for 'Rmarkdown' and 'shiny' using 'D3'
HTML
3
star
59

shinyex_enfr

R
3
star
60

r4ags

Workshop materials for the R+ggplot2 for geoscience course
3
star
61

rparquet

(Experiment) Read and Write 'Parquet' Files
Rust
3
star
62

rproj

Generic Coordinate Transformation Library ('PROJ') R API
R
3
star
63

sbe

Process and Convert Files Created by 'Seabird' Products
R
2
star
64

2021-04-30_dfo-git

2
star
65

hydatr

An R interface to the HYDAT database
R
2
star
66

JavaUnits

Flexible java unit library
Java
2
star
67

anrpackageusingc

Demonstrates Calling 'C' Code
R
2
star
68

r4paleolim

R for Paleolimnology
TeX
2
star
69

minigpkg

Proof-of-concept minimal GeoPackage IO
C
1
star
70

oceandf

Read 'ODF' (Ocean Data File) Files
R
1
star
71

pyosmroute

Python
1
star
72

plotwp

Wordpress Plugin to attach data to posts
PHP
1
star
73

2021-10-27_dfo-gh-actions

1
star
74

qosm

OpenStreetMaps tiles for QGIS
Python
1
star
75

ggstereo

Stereonets in R
R
1
star
76

dfoxaringan

Provides a DFO 'rmarkdown' template for 'xaringan' presentations
CSS
1
star
77

arce00

Read E00 Files
C
1
star
78

docker-images

Dockerfile
1
star
79

landsatutils

R package with convenience functions for Landsat workflows
R
1
star
80

testpackageusingarrowcpp

Experimenting With Various Ways to Do Stuff With 'Arrow'
R
1
star
81

swmm

Cross-platform access to the USEPA Stormwater Management Model (SWMM) in R
C
1
star
82

edwards97

Implementation of a Langmuir Semi-Empirical Coagulation Model
R
1
star
83

cwrs_poster_template

CSS
1
star
84

bsrto

Access Data from the Barrow Strait Real Time Observatory
R
1
star
85

2023-11-21_arrow-over-http-scratchpad

Python
1
star
86

nmea

Parse 'NMEA' Sentences
R
1
star