https://github.com/data-edu/dataedu
An R package associated with the Data Science in Education Using R book
Science Score: 26.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
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.7%) to scientific vocabulary
Keywords
education
k12
k12education
r
Last synced: 6 months ago
·
JSON representation
Repository
An R package associated with the Data Science in Education Using R book
Basic Info
- Host: GitHub
- Owner: data-edu
- License: cc-by-4.0
- Language: R
- Default Branch: master
- Homepage: https://data-edu.github.io/dataedu/
- Size: 23.5 MB
Statistics
- Stars: 75
- Watchers: 10
- Forks: 12
- Open Issues: 3
- Releases: 0
Topics
education
k12
k12education
r
Created over 6 years ago
· Last pushed 12 months ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
dep <- as.vector(read.dcf('DESCRIPTION')[, 'Depends'])
```
# dataedu
[](https://codecov.io/gh/data-edu/dataedu?branch=master)
[](https://cran.r-project.org/)
[)`-yellowgreen.svg)](https://github.com/data-edu/dataedu/commits/master)
[](https://github.com/data-edu/dataedu/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/data-edu/dataedu)
The goal of {dataedu} is to provide readers of [Data Science in Education Using R](https://github.com/data-edu/data-science-in-education) with a package with useful functions, data, and references from the book.
* [ Installation ](#installation)
* [ Package Contents ](#package-contents)
* [ Contact ](#contact)
## Installation
### 1. Install {pak}
First, let's install {pak}. If you already have {pak} installed, you can move on to the next step.
``` r
install.packages("pak")
```
### 2. Install {dataedu}
You can install the development version of {dataedu} by running this in your RStudio console:
``` r
pak::pak("data-edu/dataedu")
```
#### Important Notes on Installation
* {dataedu} requires R 3.6 or above to be installed.
* {dataedu} has other packages that it needs to be able to run. You can see the full list under "Imports" (imported when downloading the package) and "Suggests" (we think you should include these too!) in the [DESCRIPTION file](https://github.com/data-edu/dataedu/blob/master/DESCRIPTION#L34).
* **We recommend first checking to see if your packages are all up-to-date if you are running into issues with installation.** If you have installed the imported/suggested packages previously and have not updated them in a while, RStudio may prompt you to update them. You can choose to (1) ignore this prompt, (2) exit the prompt and update your packages, or (3) try to update your packages through the prompt. It's usually easier to exit and update your packages outside the prompt (one way to do this is to go to the RStudio Packages pane and click Update, then select the packages you'd like to update).
### 3. Call the Package
Before you can use the package, make sure to call it using `library()`:
```{r}
library(dataedu)
```
## Package Contents
We created this package to provide our readers an opportunity to jump into R however they see fit.
1. [Mass installation of all the packages used in the book](#mass-installation-of-packages)
2. [Reproducible code for the walkthroughs](#reproducible-code-for-walkthroughs)
3. [Access to the data used in each of the walkthroughs](#accessing-the-walkthrough-data)
4. [The dataedu theme and color palette for reuse](#using-the-dataedu-theme-and-palette)
### Mass Installation of Packages
We strived to use packages that we use in our daily work when creating the walkthroughs in the book. Because we covered a variety of subjects, that means we used a lot of packages! As described in the Foundational Skills chapter, you can install the packages individually as they suit your needs.
However, if you want to get started quickly and download all the packages at once, please use `install_dataedu()`.
``` r
dataedu::install_dataedu()
```
To see the packages used in the book, run:
```{r}
dataedu::dataedu_packages
```
**A special note on {tabulapdf}:** One of the walkthroughs uses [tabulapdf](https://docs.ropensci.org/tabulapdf/index.html), created by ROpenSci to read PDFs. {tabulapdf} requires the installation of [RJava](https://cran.r-project.org/web/packages/rJava/index.html), which can be a tricky process. {tabulapdf} is not included in `install_dataedu()` and we recommend reading through the notes on its Github repo if installing.
### Accessing the Walkthrough Data
To get the data, run `dataedu::` then the dataset as it is named in the book:
``` r
dataedu::course_data
```
To see all the datasets available in the package, run `data(package = "dataedu")`.
```{r}
# this is to print the results for the README
# only `data(package = "dataedu")` is needed to see this list
a <- data(package = "dataedu")
a$result[ , 3:4]
```
If you would like to download the data in non-`.Rds` (RData) format, the CSV and JSON formats are available under [`inst/extdata`](https://github.com/data-edu/dataedu/tree/master/inst/extdata). Please note that `all_files` and `oulad_interactions_filtered` are not included because of their size.
### Using the {dataedu} Theme and Palette
Add the theme and palette to ggplot2-based plots using `theme_dataedu()` and `scale_*_dataedu()`.
* **Note:** The DataEdu theme uses {showtext} to render the font. If you would like to use it in an R markdown chunk, please ensure that the chunk lists `fig.showtext = TRUE`. If you would like to use it in a standalone R script, then you will need to use a differnet graphic device. More information is available in the documentation [here](https://cran.rstudio.com/web/packages/showtext/vignettes/introduction.html).
```{r, fig.align = "center", dpi = 300, message = FALSE, warning = FALSE, fig.showtext = TRUE}
library(ggplot2)
library(dataedu)
ggplot(midwest, aes(x = area, y = popdensity, color = state)) +
geom_point() +
theme_dataedu() +
scale_color_dataedu()
```
The font for the DSIEUR graphs is Cabin and available [here](https://fonts.google.com/specimen/Cabin). The code to load the font with the package is heavily based on the code from Guangchuang Yu's [extrafont](https://github.com/GuangchuangYu/emojifont) package - thank you!
## Contact
* Please report ideas or issues on the [Issues page](https://github.com/data-edu/dataedu/issues). If possible, make your post reproducible using the [{reprex}](https://github.com/tidyverse/reprex) package.
* Send any pull requests on the [Github repository](https://github.com/data-edu/dataedu).
Owner
- Name: DataEDU
- Login: data-edu
- Kind: organization
- Repositories: 2
- Profile: https://github.com/data-edu
GitHub Events
Total
- Issues event: 2
- Watch event: 1
- Issue comment event: 2
- Push event: 10
Last Year
- Issues event: 2
- Watch event: 1
- Issue comment event: 2
- Push event: 10
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 2
- Total pull requests: 0
- Average time to close issues: almost 3 years
- Average time to close pull requests: N/A
- Total issue authors: 2
- Total pull request authors: 0
- Average comments per issue: 2.0
- Average comments per pull request: 0
- Merged pull requests: 0
- 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
- gvelasq (1)
- fornelas1 (1)
- prei007 (1)