Science Score: 46.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.2%) to scientific vocabulary
Keywords
Repository
R package for downloading OCS data
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
OCSdata 
Download Data from Open Case Studies (OCS)
OCSdata is an R package to help you access and download case study data files hosted on the OCS GitHub. The package provides several different functions to enable users to grab the data they need at different sections in the case study, as well as download the whole case study repository. All the user needs to use the package is the name of the case study repository and a file path to the directory where the data should be saved. The package relies on the GET() function from httr to access files through the GitHub API. The functions use_zip() and create_from_github() from usethis are used to clone and/or download the case study repositories.
Installation
Download the current release version from CRAN:
R
install.packages("OCSdata")
Download the current development version from GitHub:
```R
install.packages("devtools")
devtools::install_github("opencasestudies/OCSdata") ```
We are collecting data to improve the Open Case Studies. If you've used this package or any case study please take our survey!
Examples
These examples download the data files to temporary directories to avoid
overwriting local files. If you'd like to save the files elsewhere,
specify the file path to the desired download location in the outpath argument.
Or, leave the argument blank to interactively specify a directory with the R console.
```R library(OCSdata)
Starting at data import section:
raw_data("ocs-bp-opioid-rural-urban", outpath = tempdir())
for raw data in file formats that are easier to import, run:
simplerimportdata("ocs-bp-opioid-rural-urban", outpath = tempdir())
Starting at data exploration/wrangling sections:
imported_data("ocs-bp-opioid-rural-urban", outpath = tempdir())
Starting at data visualization/analysis sections:
for files in CSV format:
wrangled_csv("ocs-bp-opioid-rural-urban", outpath = tempdir())
for files in RDA format:
wrangled_rda("ocs-bp-opioid-rural-urban", outpath = tempdir())
Looking for more data on this topic:
extra_data("ocs-bp-opioid-rural-urban", outpath = tempdir())
Download repository in a zip file:
zip_ocs("ocs-bp-opioid-rural-urban", outpath = tempdir())
Clone the case study GitHub repository (requires registered PAT):
cloneocs("ocs-bp-opioid-rural-urban", outpath = tempdir(), forkrepo = TRUE)
Setting fork_repo = TRUE will fork the repo first and then clone the fork,
while FALSE will clone the repo directly from the Open Case Studies GitHub.
The default is fork_repo = NA, which will fork or clone based on your repository
permissions. This function requires your personal GitHub PAT to be registered in RStudio.
``
*Note: The default argument for*outpath` will trigger an interactive session
where the user confirms the download location.
These examples use the Opioids in United States case study, but you can use these functions with any of our case studies. Make sure to use the Case Study ID for the casestudy argument. See below to find your case study's ID:
| Case Study Name | Case Study ID |
| --------------- | ------------- |
| Exploring global patterns of obesity across rural and urban regions | ocs-bp-rural-and-urban-obesity |
| Predicting Annual Air Pollution | ocs-bp-air-pollution |
| Vaping Behaviors in American Youth | ocs-bp-vaping-case-study |
| Opioids in United States | ocs-bp-opioid-rural-urban |
| Influence of Multicollinearity on Measured Impact of Right-to-Carry Gun Laws Part 1 | ocs-bp-RTC-wrangling |
| Influence of Multicollinearity on Measured Impact of Right-to-Carry Gun Laws Part 2 | ocs-bp-RTC-analysis |
| Disparities in Youth Disconnection | ocs-bp-youth-disconnection |
| Mental Health of American Youth | ocs-bp-youth-mental-health |
| School Shootings in the United States | ocs-bp-school-shootings-dashboard |
| Exploring CO2 emissions across time | ocs-bp-co2-emissions |
| Exploring global patterns of dietary behaviors associated with health risk | ocs-bp-diet |
Why Use OCSdata?
All case study data are available in the respective OCS GitHub repositories. However, case study users new to GitHub can find it a confusing process to access data from repositories. On top of that, users then must move the downloaded data to the appropriate local directory. Overall, this process leaves room for error and acts as a barrier to introductory level students. Troubleshooting these errors can be a headache for both students and instructors and eats away at valuable learning time. OCSdata is an R package that bridges the gap from web-browser to Rstudio, allowing users to automatically download the data they need with simple functions all within R.
This package is licensed under the terms of the MIT license.
Last update: April 28, 2022
Owner
- Name: opencasestudies
- Login: opencasestudies
- Kind: organization
- Repositories: 46
- Profile: https://github.com/opencasestudies
GitHub Events
Total
Last Year
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| mbreshock | m****1@j****u | 140 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 4 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- mbreshock (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 251 last-month
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: OCSdata
Download Data from the 'Open Case Studies' Repository
- Homepage: https://github.com/opencasestudies/OCSdata
- Documentation: http://cran.r-project.org/web/packages/OCSdata/OCSdata.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.2
published over 4 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- gh >= 1.3.0 imports
- httr >= 1.4.0 imports
- purrr >= 0.3.0 imports
- usethis >= 2.0.0 imports
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat >= 3.0.0 suggests
- actions/checkout v4 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- codecov/codecov-action v4 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite