library(tidyverse)
fl_zip <- read_csv("https://raw.githubusercontent.com/gadenbuie/covid19-florida/master/data/covid-19-florida_arcgis_cases-by-zip.csv")
vec_proxy.sfc <- function(x) {
class(x) <- setdiff(class(x), "sfc")
vctrs::vec_proxy(x)
}
fl_counties <-
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(purrr) | |
# https://health.appliedxl.com/preparedness | |
covid_preparedness_score <- | |
jsonlite::read_json("https://health.appliedxl.com/jsons/health.json") %>% | |
map_dfr(~ .) |
library(tidyverse)
cvd_states <- read_csv(
"https://covidtracking.com/api/v1/states/daily.csv",
col_types = cols(
.default = col_double(),
date = col_date("%Y%m%d"),
state = col_character(),
hash = col_character(),
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Restart RStudio | |
#' | |
#' @id 6 | |
#' @interactive | |
usethis:::restart_rstudio | |
#' Go to Source File Location | |
#' | |
#' @description Navigate to current source file in Files pane | |
#' @id 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(purrr) | |
library(stringr) | |
library(rvest) | |
library(crul) | |
base_url <- "https://deploy-preview-NN--USERNAME.netlify.app/" | |
page_url <- file.path(base_url, "blog/post") | |
page <- read_html(page_url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(epoxy) # gadenbuie/epoxy | |
ui <- fluidPage( | |
h2("epoxyHTML demo"), | |
epoxyHTML( | |
'test', # output id | |
# Regular Shiny elements | |
fluidRow( | |
tags$div( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`%>%` <- magrittr::`%>%` | |
tumors <- tibble::tribble( | |
~mrn, ~sequence, ~age, ~tumor_size, ~tumor_unit, | |
289034L, 1L, 47L, 0.9, "cm", | |
289034L, 2L, 47L, 35.2, "mm", | |
290660L, 1L, 49L, 30, "mm", | |
290660L, 2L, 49L, 15.5, "mm", | |
341050L, 1L, 61L, 14.7, "mm", | |
341050L, 2L, 70L, 2.1, "cm", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
pagetitle: Inline Text Input Example | |
example: | |
title: Inline Text Input Example | |
runtime: repl | |
mode: | |
document: html | |
initial: | |
js: |- | |
let inlineInputs = document.querySelectorAll('.inline-text-input input[type="text"]') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
# remotes::install_github("gadenbuie/epoxy@shiny-inline-inputs") | |
library(epoxy) | |
# Module ------------------------------------------------------------------ | |
epoxyModTestUI <- function(id) { | |
ns <- NS(id) | |
tagList( | |
h2("Is it rainy there?"), | |
epoxyHTML( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1 ------------------------------------------------------------------ | |
# Before updating R... | |
`%>%` <- magrittr::`%>%` | |
# Thanks Chuck Powell - https://ibecav.github.io/update_libraries/ | |
package_source <- function(pkg){ | |
x <- as.character(packageDescription(pkg)$Repository) | |
if (length(x)==0) { |