Skip to content

Instantly share code, notes, and snippets.

🤔
Programming programs that others use to program programs that write programs

Carson Sievert cpsievert

🤔
Programming programs that others use to program programs that write programs
Block or report user

Report or block cpsievert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _site.yml
name: "site"
output:
html_document:
theme: sketchy
bootstrap_version: 4
theme_variables:
primary: pink
font-size-base: 1.5rem
navbar:
title: "My Website"
View scatter-to-density.R
library(shiny)
mtcars$.key <- row.names(mtcars)
ui <- fluidPage(
  plotlyOutput("scatter"),
  plotlyOutput("bars")
)
server <- function(input, output, session) {
View us-states.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View leaflet-subapp.Rmd
---
title: "Subapp test"
output: html_document
runtime: shiny
---
Check your JS console for errors
```{r}
library(shiny)
View flex-shiny-session.Rmd
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
```{r setup, include=FALSE}
View proxy-dashboard.Rmd
---
title: "dash"
output: flexdashboard::flex_dashboard
runtime: shiny_prerendered
---
```{r setup, include=FALSE}
library(tidyverse)
library(plotly)
View plotly-proxy-rmd.Rmd
---
title: "Untitled"
output: html_document
runtime: shiny_prerendered
---
```{r}
library(plotly)
plotlyOutput("p")
```
View leaflet-proxy-rmd.Rmd
---
title: "Untitled"
output: html_document
runtime: shiny_prerendered
---
```{r}
library(leaflet)
leafletOutput("map")
```
View index.html
<head>
<!-- Plotly.js -->
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
</head>
<body>
<div id="graph"></div>
<script>
var dat = [{
"x": [1,2,3,4,5],
@cpsievert
cpsievert / line-on-brush.R
Created Feb 9, 2018
Draw line shapes outlining brush
View line-on-brush.R
library(plotly)
library(crosstalk)
library(htmlwidgets)
mtcars %>%
SharedData$new() %>%
plot_ly(x = ~wt, y = ~mpg) %>%
highlight("plotly_selected", dynamic = TRUE) %>%
onRender(
"function(el, x) {
You can’t perform that action at this time.