This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dexie.js Table Delete Demo</title> | |
<meta name="description" content="Add and delete storage tables in IndexedDB thru Dexie.js"> | |
<meta name="author" content="helgasoft.com"> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://unpkg.com/dexie/dist/dexie.min.js" type="text/javascript"></script> | |
<!-- |
This file contains 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
# https://gist.github.com/helgasoft/a766acbd3c0af07b9faf6e62a94f9246 | |
library(shiny) | |
library(quantmod) | |
ui <- fluidPage( | |
titlePanel("Volume inside chart_Series"), | |
mainPanel( |
This file contains 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
# dygraph workaround: how to avoid time gaps in financial data display | |
# Please add your voice for a permanent fix in the following thread: | |
# https://github.com/rstudio/dygraphs/issues/70 | |
# TODO: date+time "2017-01-25 09:00:00" - looks like the JS environment can't deal with this format !? | |
library(shiny) | |
library(dygraphs) | |
ui <- fluidPage( | |
titlePanel("Dygraph stock data"), |
This file contains 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) | |
indiv <- c('NA'=1,'STOCH'=2,'SMI'=3,'MACD'=4,'ROC'=5,'MFI'=6,'RSI'=7,'CCI'=8) | |
ui <- fluidPage( | |
titlePanel("Customize dropdown label thru Javascript"), | |
mainPanel( | |
fluidRow( selectInput(inputId="indik", label="Indicator", choices=indiv), | |
"click checkbox to reset the dropdown" | |
), |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Example github pages</title> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" |
This file contains 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
# simple echart with one symbol and line,area,point | |
library(quantmod); library(echarts4r); library(dplyr) | |
getSymbols("IBM", from='2019-01-01') | |
IBM <- as.data.frame(IBM) | |
names(IBM) <- c("open", "high", "low", "close", "volume", "adjusted") | |
df <- round(IBM, 2) %>% mutate(sym="IBM", date=row.names(IBM)) | |
ivl <- c("2019-10-03", "2020-04-03") # mark area interval | |
sset <- df %>% filter(between(as.Date(date), as.Date(ivl[1]),as.Date(ivl[2]))) | |
fit <- lm(Cl(sset) ~ c(1:nrow(sset))) # linear regression btw two dates |
This file contains 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
# Demo - using Leaflet JS plugins in R and Shiny | |
# directions from https://gist.github.com/jcheng5/c084a59717f18e947a17955007dc5f92 | |
# implementing an Opacity plugin that works for tile-layers only: | |
# https://github.com/dayjournal/Leaflet.Control.Opacity | |
# download js/css files first, see note (2) below | |
library(shiny) | |
library(leaflet) | |
library(htmlwidgets) |
This file contains 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
#' data from https://github.com/tungmilan | |
#' see Hierarchies in https://helgasoft.github.io/echarty/uc3.html | |
DF <- data.frame( | |
parents = c("Mid Stream","Mid Stream","Mid Stream","Mid Stream", | |
"Mid Stream","Mid Stream","Mid Stream","Mid Stream", | |
"Mid Stream","Mid Stream","Mid Stream","Mid Stream", | |
"Low Stream","Low Stream", | |
"Low Stream","Low Stream", | |
"Low Stream","Mac River","Mac River","Mac River", |
This file contains 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
--- | |
title: "Select Serie" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: columns | |
vertical_layout: fill | |
runtime: shiny | |
--- | |
```{r setup, include=FALSE} |
This file contains 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
#'----------------- Interactive charts with echarty and Shiny ------------------- | |
#' this code not maintained, see latest version in demo(eshiny, package='echarty') | |
library(shiny) | |
library(dplyr) | |
library(echarty) | |
base_df <- data.frame(ValX = c("A", "B", "C"), ValY = 1:3) | |
boxplot_df <- data.frame(ValX = sample(LETTERS[1:3], size = 20, replace = TRUE), | |
ValY = rnorm(20)) |
OlderNewer