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
# Notes from Julia Workshop: From Installed to Productive | |
# 2014-11-15 | |
# http://www.meetup.com/JuliaChicago/events/216950712/ | |
println("hello world") # => hello world | |
x = 5 | |
## IF statements |
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
{ | |
"default_extend_env":{"PATH":"{PATH};C:\\Users\\user_name\\Documents\\R\\R-2.14.1\\bin\\x64"} | |
} |
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
// Characters that are considered to separate words – does not include periods. | |
// Place comma at the end of the line if there are multiple keybindings. | |
{"word_separators": "/\\()\"‘-:,;~!@#$%^&*|+=[]{}`~?"} |
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 | |
$q=$_GET['q']; | |
$con = mysql_connect('mysql.tomschenkjr.net', 'tsjr_visitor', 'tsjr_visitor_password'); | |
if(!$con){ | |
die('Could not connect: ' . mysql_error()); | |
} | |
mysql_select_db("tsjr_sandy", $con); |
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
# LOAD UP GGPLOT2 | |
library(ggplot2) | |
# PROPER TIME SERIES DATA | |
str(economics) # Explore the economics data set that comes with ggplot2. | |
# PLOT THE RELATIONSHIP OF UNEMPLOYMENT AND TIME | |
p <- ggplot(economics, aes(x = date, y = unemploy)) | |
p + geom_line() |
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
# Let's customize our plot outputs. First, load the library. | |
library(ggplot2) | |
# Plot something simple | |
p <- ggplot(mtcars, aes(x=cyl, y=mpg)) + geom_point(aes(color=qsec, size=wt)) | |
# Change axis | |
p + scale_y_continuous(limits=c(0,40)) |
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
CoefficientPlot <- function(models, alpha = 0.05, modelnames = ""){ | |
# models must be a list() | |
Multiplier <- qnorm(1 - alpha / 2) | |
CoefficientTables <- lapply(models, function(x){summary(x)$coef}) | |
TableRows <- unlist(lapply(CoefficientTables, nrow)) | |
if(modelnames[1] == ""){ | |
ModelNameLabels <- rep(paste("Model", 1:length(TableRows)), TableRows) | |
} else { |
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
City of Chicago | |
Individual Contributor License Agreement ("Agreement") | |
====================================================== | |
Thank you for your interest in [Project Name] by the City of Chicago (the "City"), | |
a municipal corporation and home rule unit of local government existing under the | |
Constitution of the State of Illinois. In order to clarify the intellectual property | |
license granted with Contributions from any person or entity, the City must have a | |
Contributor License Agreement ("CLA") on file that has been signed by each Contributor, | |
indicating agreement to the license terms below. This license is for your protection |
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
[ | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column Phone Number using expression grel:value.replace(\" -\",\"\")", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "Phone Number", | |
"expression": "grel:value.replace(\" -\",\"\")", |
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
# A note on how to geocode using R, since I always forget | |
library(tigris) # also loads 'sp' | |
library(RSocrata) | |
# Obtain data | |
d <- read.socrata("https://data.cityofchicago.org/Education/Connect-Chicago-Locations/bmus-hp7e") | |
ccgeo <- tracts(state = '17', county = c('031'), cb = T) ## cb=T means smaller file | |
# Data organization |
OlderNewer