I hereby claim:
- I am conorsg on github.
- I am conorsg (https://keybase.io/conorsg) on keybase.
- I have a public key ASDz1RwKfxO36GRiJBb_QV0_uPU3Uh6Nlk1oP3gOpQbUKQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Pulls EBRSO warrant list from https://www.ebrso.org/PUBLICTOOLS/WarrantListModule.aspx | |
# Written by Conor Gaffney (conorsg) in 2019 | |
# | |
from bs4 import BeautifulSoup | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
import csv | |
import requests | |
import pandas as pd |
#!/usr/bin/python | |
import json | |
import urllib3 | |
import certifi | |
from datetime import datetime, date, timedelta | |
from time import strftime | |
simple_data = [] | |
record = [] |
#!/usr/bin/python | |
# gets sheriff's sale data from http://www.civilsheriff.com/RealEstateSales.asp | |
# | |
# example of URL that returns sales: | |
# http://www.civilsheriff.com/RealEstate/RealEstateBody.asp?MYSaleDate=11/6/2014 | |
# | |
# | |
# the good people at http://www.notrs.com/ who made the sheriff's website could use a lesson or two in web development | |
from bs4 import BeautifulSoup |
buildChart <- function(p) { | |
gt <- ggplot_gtable(ggplot_build(p)) | |
t <- gtable_filter(gt, "title")[[1]] | |
l <- gtable_filter(gt, "guide-box")[[1]] | |
p <- p + theme(legend.position = "none", plot.title = element_blank()) |
#dedup | |
require(dplyr) | |
require(lubridate) | |
d <- read.csv("FILE") | |
names(d)[1] <- "id" | |
names(d)[2] <- "date" | |
names(d)[5] <- "first" | |
names(d)[7] <- "last" | |
names(d)[8] <- "social" |
#!usr/bin/Rscript | |
require(lubridate) | |
require(dplyr) | |
require(jsonlite) | |
require(RCurl) | |
require(stringr) | |
require(xtermStyle) | |
#fns |
#!/usr/bin/Rscript | |
library(lubridate) | |
#utility functions | |
action <- c("RTF", "NAT", "NAT71", "NATC", "NATM", "NATT", "RTFC", "RTFM", "RTFT") | |
noaction <- c("UNF", "VOI", "GOA") #remaining dispositions, like TEST and UKN are disregarded | |
catAct <- function(disp) { | |
if(disp %in% action) { |
source('calendarHeat.R') | |
PropTypes <- c("67P", "55", "67F", "67A", "67", "56", "62", "67S", "62C", "62R", "67B", "56D", "62B", "65", "67E", "67C", "65P", "65J") | |
ViolTypes <- c("35D", "35", "34", "34S", "37", "34D", "34C", "37D", "60", "38D") | |
HomicideTypes <- c("30", "30S", "30C", "30D") | |
RapeTypes <- c("42", "43") | |
GunTypes <- c("64G", "94", "95", "95G") | |
df <- read.csv('FILE', sep=',', header=T) | |
df.violent <- df[df$Type_ %in% ViolTypes, ] |
#!/usr/bin/env python | |
import json | |
import urllib2 | |
import csv | |
api_key = 'YOUR_API_KEY' | |
with open('FILE.csv', 'rU') as f: | |
reader = csv.reader(f) |