Skip to content

Commit 0ec345a

Browse files
committed
Add README
1 parent eaa3c54 commit 0ec345a

File tree

2 files changed

+139
-2
lines changed

2 files changed

+139
-2
lines changed

README.Rmd

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
output: github_document
3+
---
4+
5+
<!-- README.md is generated from README.Rmd. Please edit that file -->
6+
7+
```{r, include = FALSE}
8+
knitr::opts_chunk$set(
9+
collapse = TRUE,
10+
comment = "#>",
11+
fig.path = "man/figures/README-",
12+
out.width = "100%"
13+
)
14+
```
15+
16+
# explorecourses
17+
18+
<!-- badges: start -->
19+
[![R-CMD-check](https://github.com/coatless-rpkg/explorecourses/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/explorecourses/actions/workflows/R-CMD-check.yaml)
20+
<!-- badges: end -->
21+
22+
> [!IMPORTANT]
23+
>
24+
> This package is part of a homework exercise for STATS 290 regarding data mining
25+
> and web APIs.
26+
27+
The goal of explorecourses is to automatically retrieve course information from
28+
Stanford University's ExploreCourses API.
29+
30+
## Installation
31+
32+
You can install the development version of explorecourses from [GitHub](https://github.com/) with:
33+
34+
``` r
35+
# install.packages("remotes")
36+
remotes::remotes("coatless-rpkg/explorecourses")
37+
```
38+
39+
## Usage
40+
41+
First, load the package:
42+
43+
```r
44+
library(explorecourses)
45+
```
46+
47+
The package contains three main functions:
48+
49+
1. `fetch_all_courses()`: Fetches all courses from the ExploreCourses API.
50+
2. `fetch_departments()`: Fetches the list of departments from the ExploreCourses API.
51+
3. `fetch_department_courses()`: Fetches the courses for a specific department.
52+
53+
By default, we'll retrieve all courses across all departments for the current
54+
academic year using:
55+
56+
```r
57+
all_courses <- fetch_all_courses()
58+
```
59+
60+
This information is stored in the `schedule_ay24_25` data frame.
61+
62+
For just a single department, we can use it's code to retrieve a list of all
63+
classes:
64+
65+
```r
66+
department_courses <- fetch_department_courses("STATS")
67+
```
68+
69+
To determine possible department shortcodes, we can use:
70+
71+
```r
72+
departments <- fetch_departments()
73+
```

README.md

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,66 @@
1-
# explore-courses
2-
Download, Extract, and Transform Course Data from Stanford University's ExploreCourses in R
1+
2+
<!-- README.md is generated from README.Rmd. Please edit that file -->
3+
4+
# explorecourses
5+
6+
<!-- badges: start -->
7+
8+
[![R-CMD-check](https://github.com/coatless-rpkg/explorecourses/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/explorecourses/actions/workflows/R-CMD-check.yaml)
9+
<!-- badges: end -->
10+
11+
> \[!IMPORTANT\]
12+
>
13+
> This package is part of a homework exercise for STATS 290 regarding
14+
> data mining and web APIs.
15+
16+
The goal of explorecourses is to automatically retrieve course
17+
information from Stanford University’s ExploreCourses API.
18+
19+
## Installation
20+
21+
You can install the development version of explorecourses from
22+
[GitHub](https://github.com/) with:
23+
24+
``` r
25+
# install.packages("remotes")
26+
remotes::remotes("coatless-rpkg/explorecourses")
27+
```
28+
29+
## Usage
30+
31+
First, load the package:
32+
33+
``` r
34+
library(explorecourses)
35+
```
36+
37+
The package contains three main functions:
38+
39+
1. `fetch_all_courses()`: Fetches all courses from the ExploreCourses
40+
API.
41+
2. `fetch_departments()`: Fetches the list of departments from the
42+
ExploreCourses API.
43+
3. `fetch_department_courses()`: Fetches the courses for a specific
44+
department.
45+
46+
By default, we’ll retrieve all courses across all departments for the
47+
current academic year using:
48+
49+
``` r
50+
all_courses <- fetch_all_courses()
51+
```
52+
53+
This information is stored in the `schedule_ay24_25` data frame.
54+
55+
For just a single department, we can use it’s code to retrieve a list of
56+
all classes:
57+
58+
``` r
59+
department_courses <- fetch_department_courses("STATS")
60+
```
61+
62+
To determine possible department shortcodes, we can use:
63+
64+
``` r
65+
departments <- fetch_departments()
66+
```

0 commit comments

Comments
 (0)