Skip to content

Instantly share code, notes, and snippets.

View Keareys's full-sized avatar

Kearey Smith Keareys

View GitHub Profile
@Keareys
Keareys / ACS_2011_2015_Home_Value.sql
Last active February 8, 2017 02:39
ACS 2011 - 2015 Median Household Income to Home Value Ratio by County and Urban Areas. Uses ESRI 2016 FeatureClasses for Counties and Urban Areas as defined by the Census.
Go
create view Analysis.Income_to_HomeValue_Urban_Areas as
SELECT
Top 50000
hv.OBJECTID,
--hv.Id,
hv.Id2,
--hv.Geography,
c.STATE_FIPS as StateFips,
c.NAME as CountyName,
@dmarcelinobr
dmarcelinobr / looping_files.R
Created January 2, 2014 22:00
This piece loops text files, read them, merge them, and write back a file.
path = "~/Documents/My Data/BRAZIL/Elections/"
out.file<-""
file.names <- dir(path, pattern =".txt")
for(i in 1:length(file.names)){
file <- read.table(file.names[i],header=TRUE, sep=";", stringsAsFactors=FALSE)
out.file <- rbind(out.file, file)
}
write.table(out.file, file = "cand_Brazil.txt",sep=";",
row.names = FALSE, qmethod = "double",fileEncoding="windows-1252")