Skip to content

Instantly share code, notes, and snippets.

View mollietaylor's full-sized avatar

Shawn Mollie Taylor mollietaylor

View GitHub Profile
@mollietaylor
mollietaylor / presentations.txt
Created November 16, 2013 22:29
Govathon presentations
bus tracker
trash collection 404-620-5025
budget app http://public.tableausoftware.com/views/Expenses_2_0/DepartmentDashboard#1
innovations app
APS parent portal
form flow
votified http://votified.com/
geoincentives wordpress plugin
vendor application
municiplanner http://municiplanner.org/
@mollietaylor
mollietaylor / quickStart.html
Last active December 26, 2015 06:49
Make All Polygons the Same Shade in Leaflet
<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<title>Quick Start</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
@mollietaylor
mollietaylor / gini.R
Created January 2, 2013 04:08
Calculating a Gini Coefficients for a Number of Locales at Once in R
# generate random data:
city <- c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J")
income <- sample(1:100000,
100,
replace = TRUE)
cities <- data.frame(city, income)
# graph our data:
library(ggplot2)
ggplot(cities,
@mollietaylor
mollietaylor / sort.R
Created November 13, 2012 03:56
Sorting Within Lattice Graphics in R
library(lattice)
colors = c("#1B9E77", "#D95F02", "#7570B3")
dotplot(rownames(mtcars) ~ mpg,
data = mtcars,
col = colors[1],
pch = 1)
dotplot(reorder(rownames(mtcars), cyl) ~ mpg,
data = mtcars,
@mollietaylor
mollietaylor / palettes-in-R.R
Created October 24, 2012 03:19
Palettes in R
palette()
# it's fine for your vector to include a mixture of hex triplets and R color names:
colors <- c("#A7A7A7",
"dodgerblue",
"firebrick",
"forestgreen",
"gold")
hist(discoveries,
col = colors)
@mollietaylor
mollietaylor / reality.R
Created October 5, 2012 03:10
Random Name Generator in R
# recreating realitytvgenerator.com
# dictionary:
# define our two vectors with the names we'd like to use
first <- c("Fear", "Frontier", "Nanny", "Job", "Yard", "Airport", "Half Pint", "Commando", "Fast Food", "Basketball", "Bachelorette", "Diva", "Baggage", "College", "Octane", "Clean", "Sister", "Army", "Drama", "Backyard", "Pirate", "Shark", "Project", "Model", "Survival", "Justice", "Mom", "New York", "Jersey", "Ax", "Warrior", "Ancient", "Pawn", "Throttle", "The Great American", "Knight", "American", "Outback", "Celebrity", "Air", "Restaurant", "Bachelor", "Family", "Royal", "Surf", "Ulitmate", "Date", "Operation", "Fish Tank", "Logging", "Hollywood", "Amateur", "Craft", "Mystery", "Intervention", "Dog", "Human", "Rock", "Ice Road", "Shipping", "Modern", "Crocodile", "Farm", "Amish", "Single", "Tool", "Boot Camp", "Pioneer", "Kid", "Action", "Bounty", "Paradise", "Mega", "Love", "Style", "Teen", "Pop", "Wedding", "An American", "Treasure", "Myth", "Empire", "Motorway", "Room", "Casino", "Comedy", "Unde
@mollietaylor
mollietaylor / histdens.R
Created September 9, 2012 17:33
Histogram + Density Plot Combo in R
png("beaverhist.png")
layout(matrix(c(1:2), 2, 1,
byrow = TRUE))
hist(beaver1$temp, # histogram
col = "peachpuff", # column color
border = "black",
prob = TRUE, # show densities instead of frequencies
xlim = c(36,38.5),
xlab = "temp",
main = "Beaver #1")
@mollietaylor
mollietaylor / sectors.R
Created September 7, 2012 22:31
Map of prominent patent sectors of 50 largest U.S. cities in R
sectors <- read.table("sectors.csv", header=TRUE, sep=",")
library(maps)
library(RColorBrewer)
library(classInt)
names(sectors)
plotvar <- sectors$secnum #change this line to change data
plotclr <- brewer.pal(5,"Set1")
class <- classIntervals(plotvar, 5, 'pretty')#or pretty
colcode <- findColours(class, plotclr)
map("state", ylim=range(50, 22), col=8)
@mollietaylor
mollietaylor / codeforatlanta-material.js
Created September 27, 2015 23:01
Code for Atlanta material palettes
$mdThemingProvider.definePalette('codeForATLPrimary', {"50":"#e6eef2","100":"#b3ccd9","200":"#80aac0","300":"#558daa","400":"#2a7095","500":"#005480","600":"#004a70","700":"#003f60","800":"#003550","900":"#002a40","A100":"#b3ccd9","A200":"#80aac0","A400":"#2a7095","A700":"#003f60"});
$mdThemingProvider.definePalette('codeForATLAccent', {"50":"#fae8ec","100":"#f1bbc6","200":"#e78da0","300":"#df6780","400":"#d74161","500":"#cf1b41","600":"#b51839","700":"#9b1431","800":"#811129","900":"#680e21","A100":"#f1bbc6","A200":"#e78da0","A400":"#d74161","A700":"#9b1431"});
$mdThemingProvider.theme('default').primaryPalette('codeForATLPrimary').accentPalette('codeForATLAccent');
func newGame(token: String) {
let joinOptions: [String:AnyObject] = [
"endpoint" : "games/id",
"method" : "POST",
"body" : [