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(xml2) | |
library(rvest) | |
out_dir <- '~/Downloads/IPEDS/' | |
years <- 2023:1980 | |
ipeds_base <- 'https://nces.ed.gov/ipeds/datacenter/' | |
ipeds_url <- 'https://nces.ed.gov/ipeds/datacenter/DataFiles.aspx?year=' |
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
# This script is modified by Jason Bryer ([email protected]) from Huidong Tian's | |
# original script. The blog post describing the method is here: | |
# http://withr.me/authentication-of-shiny-server-application-using-a-simple-method/ | |
# The original R script is located here: https://gist.github.com/withr/9001831 | |
# | |
# This script adds two new features: 1. Render a logout button, and 2. provide | |
# the ability for visitors to create a new account. | |
# | |
# Within your server.R file, be sure to use: source('Login.R', local=TRUE) | |
# |
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(tidyverse) | |
library(reshape2) | |
library(lubridate) | |
library(rnoaa) | |
token <- '' # Get token here: https://www.ncdc.noaa.gov//cdo-web/token | |
options(noaakey = token) | |
marathon_dates <- c('2021-01-10','2020-01-12','2019-01-13', | |
'2018-01-07','2017-01-08','2016-01-10','2015-01-11','2014-01-12', |
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
# Run the App on a Shiny Server | |
library(shiny) | |
source('shiny_param_test.R') | |
shiny::shinyApp(ui = shiny_ui, | |
server = shiny_server) |
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(ggplot2) | |
library(reshape2) | |
weather <- read.csv('DisneyMarathonWeather.csv') | |
weather.melt <- melt(weather[,c('Year', 'Low', 'High', 'Wind', 'StartHumidity', 'Sky')], | |
id.vars = c('Year', 'Wind', 'StartHumidity', 'Sky')) | |
ggplot(weather.melt, aes(x = Year)) + | |
geom_ribbon(data = weather, aes(ymin = Low, ymax = High), alpha = 0.3, fill = 'skyblue') + | |
geom_path(aes(y = value, group = variable)) + |
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
# This script is modified by Jason Bryer ([email protected]) from Huidong Tian's | |
# original script. The blog post describing the method is here: | |
# http://withr.me/authentication-of-shiny-server-application-using-a-simple-method/ | |
# The original R script is located here: https://gist.github.com/withr/9001831 | |
# | |
# This script adds two new features: 1. Render a logout button, and 2. provide | |
# the ability for visitors to create a new account. | |
# | |
# Within your server.R file, be sure to use: | |
# |
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
From San Francisco to New York to Paris, city governments, high-class restaurants, | |
schools, and religious groups are ditching bottled water in favor of what comes out of the | |
faucet. With people no longer content to pay 1,000 times as much for bottled water, a | |
product no better than water from the tap, a backlash against bottled water is growing. | |
(5) The U.S. Conference of Mayors, which represents some 1,100 American cities, | |
discussed at its June 2007 meeting the irony of purchasing bottled water for city employees | |
and for city functions while at the same time touting1 the quality of municipal water. The | |
group passed a resolution sponsored by Mayors Gavin Newsom of San Francisco, Rocky | |
Anderson of Salt Lake City, and R. T. Rybak of Minneapolis that called for the examination | |
(10) of bottled water’s environmental impact. The resolution noted that with $43 billion a year |
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
require(ipeds) | |
require(ggplot2) | |
require(reshape2) | |
require(scales) | |
data(surveys) | |
View(surveys) | |
# Directory | |
ipedsHelp('HD', 2012) |
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
#' Creates a \code{data.frame} version of the str function for data.frames. | |
#' | |
#' Note that this function only works with \code{data.frames}. The function | |
#' will throw an error for any other object types. | |
#' | |
#' @param n the first n element to show | |
#' @param width maximum width in characters for the examples to show | |
#' @param n.levels the first n levels of a factor to show. | |
#' @param width.levels maximum width in characters for the number of levels to show. | |
#' @param factor.values function defining how factor examples should be printed. |
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
require(knitr) | |
#' Initializes a new Gitbook. | |
#' | |
#' This will initalize a new Gitbook in the given directory. When done, it will | |
#' also change the working directory. | |
#' | |
#' @author Jason Bryer <[email protected]> | |
newGitbook <- function(dir) { | |
.Deprecated('This function has been moved to the gitbook R package. See http://jason.bryer.org/Rgitbook for more information') |
NewerOlder