forked from sol-eng/bike_predict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocument.qmd
141 lines (106 loc) · 2.99 KB
/
document.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
title: "Bike Predict - App - Connect Widgets"
format:
html:
pagetitle: "End-to-End Data Science with RStudio Connect: Bike Share"
description-meta: "ETL, model serving, and app deployment--powered by RStudio Connect."
twitter-card: true
image: https://github.com/sol-eng/bike_predict/raw/main/img/arrows.drawio.png
image-alt: "Diagram of flow from scheduled jobs to apps"
---
::: {.column-screen}
`r gitlink::ribbon_css("https://github.com/sol-eng/bike_predict", text="View on GitHub")`
```{css, echo=FALSE}
.jumbotron {
color: white;
background-image: url("https://source.unsplash.com/zbUH21c9ARk/1920x1080");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
height: 30vh;
padding-top: 0px;
margin-top: 0px;
}
.jumbotron-title {
margin-left: 25px;
margin-right: 25px;
}
.quarto-title {
display: none;
}
```
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-3 jumbotron-title" color="#f0f0f0">Bike Share</h1>
<p class="lead jumbotron-title">End-to-End Data Science with RStudio Connect</p>
</div>
</div>
:::
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE)
library(connectwidgets)
library(dplyr)
library(stringr)
client <- connect()
all_content <- client %>% content()
bikeshare <- all_content %>%
by_tag("Bike Predict") %>%
by_tag("R")
```
<br>
## Background
This project illustrates using RStudio Connect to deploy a data science project featuring:
![](https://github.com/sol-eng/bike_predict/raw/main/img/arrows.drawio.png)
### Scheduled jobs
- Fetching and cleaning data from a continuously updating web source
- Pushing cleaned data to a relational database
- Creating intermediate datasets for subsequent use
### Pins
- Serving intermediate datasets and model objects for use in apps, APIs, and other jobs
### APIs / Vetiver
- Serving model predictions via HTTP requests deployed using vetiver
### Development and Production Apps
- Exposing model predictions to end-users through Shiny and Dash apps
- Using git-backed deployment to keep a stable version of the application available from the main branch while doing development work on another branch
### Private Packages
- Encapsulate re-usable logic in an R package, and distribute with Package Manager (see <https://github.com/sol-eng/bikeHelpR>)
## Content
Explore the deployed items below:
### Scheduled Jobs
::: {.panel-tabset}
#### ETL
```{r}
bikeshare %>%
by_tag("ETL") %>%
filter(str_detect(title, "Step 1|Step 2")) %>%
arrange(title) %>%
rsc_card()
```
#### Modeling
```{r}
bikeshare %>%
by_tag("Model") %>%
filter(str_detect(title, "Step 1|Step 2|Step 3")) %>%
arrange(title) %>%
rsc_card()
```
:::
### Pins
```{r}
bikeshare %>%
filter(str_detect(tolower(title), "pinned")) %>%
rsc_table()
```
### APIs
```{r}
bikeshare %>%
by_tag("Model") %>%
filter(str_detect(title, "API")) %>%
rsc_card()
```
### Apps
```{r}
bikeshare %>%
by_tag("App") %>%
rsc_card()
```