Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ajaypillarisetti's full-sized avatar

Ajay Pillarisetti ajaypillarisetti

View GitHub Profile
@ajaypillarisetti
ajaypillarisetti / GBD_scrape_all_risk.R
Created October 18, 2016 22:58
GBD Data Download
library(data.table)
library(httr)
library(plyr)
library(tools)
#get data from web - don't run every time!
urls <- read.table('GBD_links.txt')
urls <- as.data.table(urls)
urls <- grep("http", urls$V1, value=T)
@ajaypillarisetti
ajaypillarisetti / 2013_GBD_Country_Lists.txt
Created April 20, 2016 23:14
2013 GBD Country Lists URLs - 2013 Global Burden of DIsease Download URLs
Global
http://s3.healthdata.org/gbd2013results/IHME-Data-Global-Deaths.zip
http://s3.healthdata.org/gbd2013results/IHME-Data-Global-DALYs.zip
http://s3.healthdata.org/gbd2013results/IHME-Data-Global-YLDs.zip
http://s3.healthdata.org/gbd2013results/IHME-Data-Global-YLLs.zip
Developing
http://s3.healthdata.org/gbd2013results/IHME-Data-Developing-Deaths.zip
http://s3.healthdata.org/gbd2013results/IHME-Data-Developing-DALYs.zip
http://s3.healthdata.org/gbd2013results/IHME-Data-Developing-YLDs.zip

Keybase proof

I hereby claim:

  • I am ajaypillarisetti on github.
  • I am ajayp (https://keybase.io/ajayp) on keybase.
  • I have a public key whose fingerprint is CC9D 2311 287F EF61 7A20 D998 FE9F BDD1 C327 F67E

To claim this, I am signing this object:

@ajaypillarisetti
ajaypillarisetti / GBDdownload.R
Last active November 21, 2016 23:17
Download and save all Global Burden of Disease data from IHME as compressed RDS or raw CSV files. Accounts for some countries with different URLs. Updated 4/8/2015 to make downloads more flexible.
library(data.table)
library(plyr)
library(httr)
library(reshape2)
#specify the location to save download files
#pathToGBDDataStore <- "c:/path/to/main/dir"
pathToGBDDataStore <-'~/Desktop/gbd'
@ajaypillarisetti
ajaypillarisetti / global.R
Last active December 23, 2015 04:59
shiny matrixinput - no character input
#globals
scenarios <- read.csv('scenarios.csv',stringsAsFactors=F)[1:4,]
@ajaypillarisetti
ajaypillarisetti / SUMS_Cleaner.R
Created August 19, 2013 23:12
A routine to clean single iButton files. Focuses mainly on iButtons used as Stove Use Monitors (SUMS), but may be otherwise useful. Tested with 1921G, 1922T, and 1922L. 1922E testing ongoing. Does not properly process hygrocron iButtons at this time. Work in progress!
require(plyr)
require(lubridate)
#############################################################
# this is a combined routine to
# 1. resolve different date-time formats between files
# 2. convert F to C
# 3. export as RDS, CSV, or both (TSDB forthcoming)
# 4. create and update an error log
# It can toss all values in 1 file after a negative temp;
# that option is flaggable in the function.