Spaces:
Running
Running
Update app.R
Browse files
app.R
CHANGED
|
@@ -1883,17 +1883,20 @@ observe({
|
|
| 1883 |
NULL
|
| 1884 |
}
|
| 1885 |
}, error = function(e) { NULL })
|
| 1886 |
-
|
| 1887 |
-
scrape_status_msg("Processing data...")
|
| 1888 |
|
| 1889 |
-
|
| 1890 |
-
|
| 1891 |
-
|
| 1892 |
-
|
| 1893 |
-
|
| 1894 |
-
|
| 1895 |
-
|
| 1896 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1897 |
|
| 1898 |
scraped_data(data)
|
| 1899 |
scrape_status_msg(paste0("Done! ", nrow(data), " rows × ", ncol(data), " columns."))
|
|
|
|
| 1883 |
NULL
|
| 1884 |
}
|
| 1885 |
}, error = function(e) { NULL })
|
| 1886 |
+
if (!is.null(data) && nrow(data) > 0) {
|
|
|
|
| 1887 |
|
| 1888 |
+
if (input$scrape_source == "pbp") {
|
| 1889 |
+
scrape_status_msg("Processing data...")
|
| 1890 |
+
|
| 1891 |
+
data <- tryCatch({
|
| 1892 |
+
d <- clean_college_data(data)
|
| 1893 |
+
d <- predict_stuffplus(d)
|
| 1894 |
+
d
|
| 1895 |
+
}, error = function(e) {
|
| 1896 |
+
scrape_status_msg(paste("Processing error:", e$message))
|
| 1897 |
+
data
|
| 1898 |
+
})
|
| 1899 |
+
}
|
| 1900 |
|
| 1901 |
scraped_data(data)
|
| 1902 |
scrape_status_msg(paste0("Done! ", nrow(data), " rows × ", ncol(data), " columns."))
|