*** Load, append and save 1910 directory data
import excel using "$dir_root/Data/directories/us_1910_directory", firstrow case(lower) clear

*Standardize frequency
merge m:1 frequency using "$dir_root/Data/directories/tt_frequency_us.dta", keep(1 3) nogen

** add affiliation categories

merge m:1 affiliation using "$dir_root/Data/directories/tt_affiliation_us.dta", keep(1 3) nogen
replace affiliation_std="other" if affiliation_std==""

* identify black and foreign language papers
gen type=""
replace type=regexs(0) if regexm(newspaper,"(\([A-Za-z]+\))")

gen black_paper=(type=="(Negro)")
gen foreign_language_paper=(type!="" & black_paper==0)

compress
save "$dir_root/Data/_temp/us_1910_directory.dta", replace
