use "$dir_root/Data/searches/US_1910_Hits.dta" if inlist(state,"Alabama","Washington","Massachusetts","Nebraska"), clear

*Grab standardized frequency variable
merge 1:1 state city newspaper frequency affiliation estab using "$dir_root/Data/_temp/us_1910_directory", keepusing(frequency_std) keep(1 3) nogen


gen num_total=1

gen num_daily=(frequency_std=="d")
gen num_weekly=(inlist(frequency_std,"w","tw","thrice"))

gen hit_npaper_all=(newspapers_hit_monday==1)
gen hit_npaper_daily=(newspapers_hit_monday==1 & num_daily==1)
gen hit_npaper_weekly=(newspapers_hit_monday==1 & num_weekly==1)

gen hit_narch_all=(newspaperarchivecom==1)
gen hit_narch_daily=(newspaperarchivecom==1 & num_daily==1)
gen hit_narch_weekly=(newspaperarchivecom==1 & num_weekly==1)

gen hit_combo_all=(hit_npaper_all==1 | hit_narch_all==1)
gen hit_combo_daily=(hit_npaper_daily==1 | hit_narch_daily==1)
gen hit_combo_weekly=(hit_npaper_weekly==1 | hit_narch_weekly==1)

collapse (sum) num_* hit_*, by(state)

compress
save "$dir_root/Results/T6_Newspapers_Coverage.dta", replace
