Skip to content

Instantly share code, notes, and snippets.

View scottcame's full-sized avatar

Scott Came scottcame

  • data.world
  • Olympia, Washington, USA
  • X @scottcame
View GitHub Profile
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"values":[
{
"x": "X1",
"y": "Y1",
"n": 10
},
{
@scottcame
scottcame / Dockerfile
Last active January 28, 2018 15:10
Simple Saiku Dockerfile
FROM openjdk:8
WORKDIR /tmp
RUN curl -LO http://meteorite.bi/downloads/saiku-latest.zip && \
unzip saiku-latest.zip && rm saiku-latest.zip
RUN sed -i "s/sh startup.sh/\/tmp\/saiku-server\/tomcat\/bin\/catalina.sh run/g" /tmp/saiku-server/start-saiku.sh
CMD ["/tmp/saiku-server/start-saiku.sh"]
@scottcame
scottcame / cn.json
Created January 24, 2018 20:25
Call Nature Vega Lite gist
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"description": "A simple bar chart with embedded data.",
"width": 200,
"data": {
"values": [
{
"CallNatureTypeDescription": "Domestic Violence",
"Incident Count": 1137
},
@scottcame
scottcame / ois-vl-viz.json
Created December 22, 2017 20:08
Example OIS Viz in Vega-Lite
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"description": "OIS by Month",
"data": {
"values": [
{"month": "01-01-2017","count": 1},
{"month": "02-01-2017","count": 4},
{"month": "03-01-2017","count": 2},
{"month": "04-01-2017","count": 2},
{"month": "05-01-2017","count": 5},
@scottcame
scottcame / WashingtonPopChange.R
Last active May 9, 2018 20:04
ACS Population Change Demo
library(jsonlite)
library(tidyverse)
library(rgdal)
library(broom)
library(scales)
library(sp)
library(rgeos)
library(ggmap)
pop2016 <- fromJSON(
library(tabulizer)
library(tidyverse)
library(lubridate)
library(scales)
library(ggthemes)
# download dataset from: https://www.uscis.gov/sites/default/files/USCIS/Resources/Reports%20and%20Studies/Immigration%20Forms%20Data/All%20Form%20Types/DACA/2017-11-02_DACA_Renewal_Status_With_Denials_rounded_to_nearest_10.pdf
dacaStatusDf <- extract_tables('/opt/data/daca/2017-11-02_DACA_Renewal_Status_With_Denials_rounded_to_nearest_10.pdf',
method='data.frame') %>% .[[1]] %>%

Keybase proof

I hereby claim:

  • I am scottcame on github.
  • I am scottcame (https://keybase.io/scottcame) on keybase.
  • I have a public key ASDjg_iDmw-rFZQKWjMzsGon_X35CfUpNQgYs3IWkvwnVQo

To claim this, I am signing this object:

@scottcame
scottcame / Rearrest.R
Created June 8, 2016 15:02
R Code to compute rearrest rates
# Input consists of two spreadsheets (additional can be included as desired), with the following columns:
# Arrest Date, Case Type, Suspect Last Name, Suspect First Name, Suspect DOB
library(openxlsx)
library(dplyr)
library(digest)
library(lubridate)
computeRecidivism <- function(df) {