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
#global.R | |
#This is the set up of the data files for use in the Map DRG 100 example | |
# We create the master data file which will be subsetted by the Shiny application. The data file is in the working directory for the app | |
# Kevin Little, Ph.D., 13 June 2013 klittle@iecodesign.com | |
# app requires ggplot2 and googleVis packages | |
#example from CMS requires package ggplot2 | |
d1<-read.csv("CMSexample.csv", colClasses="character") | |
summary(d1) | |
for(i in 9:11){ |
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
### r-installation-debain-wheezy | |
#### setup commands to setup R, RStudio and OpenCPU on a Google Compute Engine Wheezy instance | |
#### Mark Edmondson 29 June 2014 | |
## | |
## No original work, all taken from these sources: | |
## https://github.com/jeroenooms/opencpu-deb/blob/master/build-on-debian.md | |
## https://support.rstudio.com/hc/communities/public/questions/200651456-RStudio-server-not-installable-on-Debian-Wheezy-just-released-this-week- | |
## http://cran.r-project.org/bin/linux/debian/README.html | |
# need to be sudo for all below |
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(httr) | |
library(XML) | |
library(googleAnalyticsR) | |
library(googleAuthR) | |
gwt_site_url <- "https://www.example.co.uk/" | |
html <- GET(gwt_site_url) | |
doc <- htmlParse(html) |
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(idbr) # devtools::install_github('walkerke/idbr') | |
library(ggplot2) | |
library(animation) | |
library(dplyr) | |
library(ggthemes) | |
idb_api_key("Your Census API key goes here") | |
male <- idb1('JA', 2010:2050, sex = 'male') %>% | |
mutate(POP = POP * -1, |
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(tidygraph) | |
library(particles) | |
library(jsonlite) | |
library(magick) | |
# Prepare text polygons | |
text <- read_json('text.json') | |
par_text <- text$layers[[3]]$paths | |
on_text <- text$layers[[2]]$paths | |
cran_text <- text$layers[[1]]$paths |
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: "Host image files on Google Cloud storage" | |
author: "Michael Whitaker" | |
date: "January 12, 2017" | |
output: | |
html_document: | |
self_contained: false | |
--- | |
```{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
(function() { | |
//first we will find the current width and height and declare a few variables that we'll use later | |
var vW = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); | |
var vH = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); | |
var orientation = null; | |
var viewRange = null; | |
//enter the pixel values that trigger your responsive design | |
var breakpoints = [480, 992, 1200]; |
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
# Add this to your .Rprofile | |
options( | |
error = quote(rlang::entrace()), | |
rlang__backtrace_on_error = "collapse" # or "branch" or "full" | |
) |
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(ggraph) | |
library(gganimate) | |
library(igraph) | |
# Data from http://konect.uni-koblenz.de/networks/sociopatterns-infectious | |
infect <- read.table('out.sociopatterns-infectious', skip = 2, sep = ' ', stringsAsFactors = FALSE) | |
infect$V3 <- NULL | |
names(infect) <- c('from', 'to', 'time') | |
infect$timebins <- as.numeric(cut(infect$time, breaks = 100)) | |
# We want that nice fading effect so we need to add extra data for the trailing |
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
<?php | |
/** | |
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or | |
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below). | |
* | |
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/ | |
* | |
* INSTRUCTIONS: | |
* 1. Edit the variables below | |
* 2. Upload this script to your server somewhere it can be publicly accessed |
OlderNewer