start_date | end_date | omit_times | disable_forecasts | help |
---|---|---|---|---|
2016-12-01 | 2016-12-02 | FALSE | FALSE | FALSE |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<script language="JavaScript"> | |
$(function() { | |
/* Lets the user click on the images to view them in full resolution. */ | |
$("div.figure img").wrap(function() { | |
var link = $('<a/>'); | |
link.attr('href', $(this).attr('src')); | |
link.attr('title', $(this).attr('alt')); | |
link.attr('target', '_blank'); | |
return link; | |
}); |
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
#' Manual classification of observations | |
#' | |
#' \code{classify} launches a Shiny app to manually classify a subset of observations. | |
#' | |
#' @param x A character vector. | |
#' @param btn_labels A character vector of length 2 corresponding to 0 and 1. | |
#' @return A vector of 0/1 for each element in \code{x}. | |
#' @export | |
#' @examples \dontrun{ | |
#' foo <- sprintf('%s (%.2f miles per gallon)', rownames(mtcars), mtcars$mpg) |
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
#!/bin/bash | |
# Usage: mkproj [projectname] | |
# projectname defaults to name of current directory | |
template="Version: 1.0\nRestoreWorkspace: Default\nSaveWorkspace: Default\nAlwaysSaveHistory: Default\n\nEnableCodeIndexing: Yes\nUseSpacesForTab: Yes\nNumSpacesForTab: 4\nEncoding: UTF-8\n\nRnwWeave: knitr\nLaTeX: pdfLaTeX" | |
wd=$(basename `pwd`) | |
if [ -z $1 ]; then |
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(rvest) | |
x <- "<dl> | |
<dt>Coffee</dt> | |
<dd>Black hot drink</dd> | |
<dt>Milk</dt> | |
<dd>White cold drink</dd> | |
</dl>" | |
y <- read_html(x) |
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
cocktails <- WikidataQueryServiceR::query_wikidata(' | |
SELECT DISTINCT ?cocktailLabel ?ingredientLabel ?instanceOfLabel ?subclassLabel | |
WHERE | |
{ | |
?cocktail wdt:P31/wdt:P279* wd:Q134768 . | |
?cocktail wdt:P186 ?ingredient . | |
OPTIONAL { | |
?ingredient wdt:P279 ?subclass . | |
} | |
OPTIONAL { |
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
## Script for scraping Wikipedia for data to use with the geom_flag() prototype | |
## CONTACT: Mikhail Popov (@bearloga // mikhail[at]mpopov[dot]com) | |
## URL: https://gist.github.com/bearloga/519a701a6a9bc7c3ba9f | |
# install.packages("import") | |
library(rvest) # install.packages("rvest") | |
library(magrittr) | |
import::from(dplyr, mutate, select, keep_where = filter, left_join, distinct) |
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
header <- headerPanel("Hello Shiny!") | |
header[[2]]$attribs$id = "header" | |
ui <- fluidPage( | |
tags$head( | |
tags$link(rel = "stylesheet", type = "text/css", href = "custom.css") | |
), | |
header, | |
sidebarLayout( | |
sidebarPanel(sliderInput("obs", "Number of observations:", min = 0, max = 1000, value = 500)), |