Learn R Programming

databraryr

Overview

databraryr is a wrapper for the Databrary data library’s application programming interface (API). The package can be used to create reproducible data wrangling, analysis, and visualization pipelines from data stored and shared on Databrary.

Installation

# The easiest way to install databraryr is from CRAN
install.packages("databraryr")

# The development release can be installed from GitHub
install.packages("pak")
pak::pak("databrary/databraryr")

Usage

Databrary (databrary.org) is a restricted-access research data library specialized for storing and sharing video with capabilities of storing other types of associated data. Access to restricted data requires registration and formal approval by an institution. The registration process involves the creation of an (email-account-based) user account and secure password. Once institutional authorization has been granted, a user may gain access to shared video, audio, and other data. See https://databrary.org/about.html for more information about gaining access to restricted data.

However, many commands in the databraryr package return meaningful results without or prior to formal authorization. These commands access public data or metadata.

library(databraryr)
#> Welcome to the databraryr package.

get_db_stats()
#> # A tibble: 1 × 9
#>   date                investigators affiliates institutions datasets_total
#>   <dttm>                      <int>      <int>        <int>          <int>
#> 1 2024-03-29 14:38:54          1740        680          784           1670
#> # ℹ 4 more variables: datasets_shared <int>, n_files <int>, hours <dbl>,
#> #   TB <dbl>

list_volume_assets() |> 
  head()
#>   asset_id asset_format_id asset_duration                 asset_name
#> 1     9826            -800         335883               Introduction
#> 2     9830            -800        4277835         Databrary 1.0 plan
#> 3     9832            -800        3107147                    Datavyu
#> 4    22412               6             NA                     Slides
#> 5     9828            -800        4425483             Databrary demo
#> 6     9834            -800        4964011 Overview and Policy Update
#>   asset_permission asset_size session_id session_date session_release
#> 1                1   88610655       6256   2013-10-28               3
#> 2                1  899912341       6256   2013-10-28               3
#> 3                1  764340542       6256   2013-10-28               3
#> 4                1    4573426       6256   2013-10-28               3
#> 5                1  917124852       6256   2013-10-28               3
#> 6                1 1301079971       6257   2014-04-07               3
#>   format_mimetype format_extension       format_name
#> 1       video/mp4              mp4      MPEG-4 video
#> 2       video/mp4              mp4      MPEG-4 video
#> 3       video/mp4              mp4      MPEG-4 video
#> 4 application/pdf              pdf Portable document
#> 5       video/mp4              mp4      MPEG-4 video
#> 6       video/mp4              mp4      MPEG-4 video

Lifecycle

Rick Gilmore has been using experimental versions of databraryr for many years, but the package was only released to CRAN in the fall of 2023. Some new features are on the roadmap, but the package is largely stable.

Copy Link

Version

Install

install.packages('databraryr')

Monthly Downloads

79

Version

0.6.6

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Rick O. Gilmore

Last Published

July 15th, 2024

Functions in databraryr (0.6.6)

get_session_by_id

Get Session (Slot) Data From A Databrary Volume
get_supported_file_types

Extracts File Types Supported by Databrary.
logout_db

Log Out of Databrary.org.
list_party_volumes

List Volumes A Party Has Access To
list_volume_links

Retrieves URL Links From A Databrary Volume.
get_assets_from_session

Helper function for list_volume_assets
download_session_asset

Download Asset From Databrary.
get_session_by_name

Get Session (Slot) Data From A Databrary Volume By Session Name.
search_for_tags

Search For Tags on Volumes or Sessions.
get_permission_levels

Extract Databrary Permission Levels.
list_session_activity

List Activity History in Databrary Session.
download_session_assets_fr_df

Download Asset From A Databrary Session.
list_volume_owners

List Owners of a Databrary Volume.
make_default_request

Set default httr request parameters.
get_release_levels

Show Databrary Release Levels
options

databraryr Options
get_volume_by_id

Get Data From A Databrary Volume
API_CONSTANTS

Load Package-wide Constants into Local Environment
make_fn_portable

Make Portable File Names
get_party_by_id

Download Information About a Party on Databrary as JSON
make_login_client

Log In To Databrary.org.
list_authorized_investigators

List Authorized Investigators at Institution
list_volume_activity

List Activity In A Databrary Volume
check_ssl_certs

Check SSL Certificates For nyu.databary.org.
get_db_stats

Get Stats About Databrary.
download_volume_zip

Download Zip Archive of All Data in a Volume.
list_volume_assets

List Assets in Databrary Volume.
assign_constants

Download Databrary Constants From API.
list_volume_excerpts

List Image or Video Excerpts On A Databrary Volume.
download_party_avatar

Returns the Avatar(s) (images) for Authorized User(s).
get_file_duration

Get Duration (In ms) Of A File.
HHMMSSmmm_to_ms

Convert Timestamp String To ms.
list_party_affiliates

List Affiliates For A Party
is_institution

Is This Party An Institution?
%>%

Pipe operator
download_session_csv

Download Session Spreadsheet As CSV
list_volume_funding

Lists Funders Associated With a Databrary Volume.
list_sponsors

List Sponsors For A Party
databraryr-package

databraryr: Interact with the 'Databrary.org' API
list_party_sponsors

List Sponsors For A Party
download_video

Download Video From Databrary.
login_db

Log In To Databrary.org.
list_volume_tags

Lists Keywords And Tags For A Volume.
download_single_session_asset_fr_df

Download Single Asset From Databrary
list_session_assets

List Assets in a Databrary Session.
download_session_zip

Download Zip Archive From Databrary Session.
list_asset_formats

List Stored Assets (Files) By Type.
get_asset_segment_range

Get Time Range For An Asset.
search_for_keywords

Search For Keywords in Databrary Volumes.
search_for_funder

Report Information About A Funder.
is_person

Is This Party A Person?
list_volume_sessions

List Sessions in Databrary Volume.
list_volume_session_assets

List Assets in a Session from a Databrary volume.