Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rstudio/bike_predict
Browse files Browse the repository at this point in the history
  • Loading branch information
akgold committed Dec 9, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
skorfmann Sebastian Korfmann
2 parents 3cfa331 + 1f6e39e commit 4e7f87d
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions API/plumber.R
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ library(lubridate)

pins::board_register_rsconnect(server = "https://colorado.rstudio.com/rsc",
key = Sys.getenv("RSTUDIOCONNECT_API_KEY"))
mods <- list(rxgb = pins::pin_get("alex.gold/bike_model_rxgb", board = "rsconnect"))
mods <- list(r_xgb = pins::pin_get("alex.gold/bike_model_rxgb", board = "rsconnect"))
stats <- pins::pin_get("alex.gold/bike_station_info", board = "rsconnect")


@@ -19,7 +19,7 @@ stats <- pins::pin_get("alex.gold/bike_station_info", board = "rsconnect")
#* @param interval prediction interval
#* @param which which model, defaults to rxgb
#* @get /pred
function(station_id, max_time = 86400, interval = 600, which = "rxgb") {
function(station_id, max_time = 86400, interval = 600, which = "r_xgb") {
# sanitize inputs
station_id <- as.numeric(station_id)
if (!all(station_id %in% stats$station_id)) stop("That station does not exist.")
4 changes: 2 additions & 2 deletions App/model_performance/app.R
Original file line number Diff line number Diff line change
@@ -68,12 +68,12 @@ server <- function(input, output, session) {
filter(mod == input$mod, train_date == input$train_date) %>%
select(-train_date, -mod)


stats <- glue::glue("{names(dat)}: \n\t {dat}") %>%
paste(collapse = "\n\t")

glue::glue(
"Performance Metrics for {input$mod}: {stats}")
"Performance Metrics for {input$mod}:
{stats}")
})

output$qq <- renderPlot(
2 changes: 1 addition & 1 deletion pkg/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: bikeHelpR
Type: Package
Title: Package of Helper Functions for the Bike Prediction Asset
Version: 0.2.0
Version: 0.2.1
Authors@R: person("Alex", "Gold", email = "alex.gold@rstudio.com",
role = c("aut", "cre"))
Description: Helpful functions for bike prediction.

0 comments on commit 4e7f87d

Please sign in to comment.