This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA512 | |
Name: Tom Fish | |
DOB: YYYYMMDD | |
ID: NNNNNN | |
Issuing Country: United States of America | |
Issuing Group: Centers for Disease Control and Prevention | |
-----BEGIN PGP SIGNATURE----- | |
Version: Keybase OpenPGP v2.1.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(PL94171) | |
library(tigris) | |
library(rgdal) | |
library(dplyr) | |
# Simplifed Rename function | |
renameColums <- function(dat){ | |
a <- rename_with(dat, ~gsub(".x", "_2020", .x)) | |
a <- rename_with(a, ~gsub(".y", "_2010", .x)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(PL94171) | |
library(tigris) | |
library(rgdal) | |
library(dplyr) | |
va_raw_2020 <- pl_read(pl_url("VA", 2020)) | |
va_2020 <- pl_subset(va_raw_2020, sumlev="140") | |
va_fin_2020 <- pl_select_standard(va_2020, clean_names = TRUE) | |
va_tracts_2020 <- tracts("VA", year=2020, progress_bar=FALSE) | |
vashp_2020 <- full_join(va_fin_2020, va_tracts, by="GEOID") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. brier outcome bitecoffer | |
Mean probability of outcome 0.5098 | |
of forecast 0.5537 | |
Correlation 0.9167 | |
ROC area 0.9969 p = 0.0000 | |
Brier score 0.0421 | |
Spiegelhalter's z-statistic -0.5024 p = 0.6923 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download data from https://download.geofabrik.de/ | |
import shutil | |
import os | |
import zipfile | |
path = r"C:\\\roadNetwork" | |
files = os.listdir(r"%s\RAW" % (path)) | |
for fi in files: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rfv homepage | |
git clone https://github.com/Guerillero/homepage.git | |
cd homepage/ | |
cp -vr * /var/www/guerillero.net/html/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
import urllib2 | |
indicators = ["WS_SRCE_P_IMP", "ED_EDUC_W_SEH", "MA_CWIV_W_1WV", "MA_CWIV_W_2PW", | |
"FE_FRTR_W_TFR", "FE_TNPG_W_CBR", "FP_CUSM_W_MOD", "FP_NADM_W_UNT"] | |
surveys = ["CM2011DHS", "CF1994DHS", "TD2014DHS", "CG2011DHS"] | |
for survey in surveys: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************************** | |
* Title: NigeriaMerge.do | |
* Created by: Tom Fish | |
* Created on: 30 October 2018 | |
* Purpose: Explan how to merge an IR file with the GC (points) file in STATA | |
******************************************************************************************/ | |
clear all | |
set more off | |
* Set folders that I am working on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************************** | |
* Title: ConvertGCFiles.do | |
* Created by: Tom Fish | |
* Created on: 8 October 2018 | |
* Purpose: Convert the DHS Geospatial Covariate files from CSV to DTA | |
******************************************************************************************/ | |
clear | |
*Set paths to the various files | |
local pathIn = "C:\in" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forvalues i=1/28{ | |
local Cards = `i' | |
local Prob = 1-hypergeometric(60,`i',7,0) | |
display "`Cards' : `Prob'" | |
} |
NewerOlder