*Save on desktop as "covid19.xlsx"
Code: Select all
import excel "C:\Users\solomon\Desktop\covid19.xlsx", sheet("COVID-19-geographic-disbtributi") firstrow
Code: Select all
ed if Year==2019 & Cas>1
drop if Year==2019
sort cntrynum Year Month Day tcase
bysort cntrynum Year Month : gen tcase = sum(Cases)
label variable tcase "Total Cases"
Code: Select all
twoway (tsline tcase if tcase>0 & cntry=="Norway", graphregion(fcolor("216 234 254")) recast(connected) mlabel(tcase) mlabcolor(orange_red) mlabposition(12) mlabangle(sixty_five)) (tsline tcase if tcase>0 & cntry=="Ethiopia", graphregion(fcolor("216 234 254")) recast(connected) mlabel(tcase) mlabcolor(orange_red) mlabposition(12) mlabangle(forty_five)), legend(ring(0) pos(3) col(1) order(1 2) label(1 "NOR") label(2 "ETH")) ytitle(Total Confirmed Cases) ttitle(Date) tlabel(#15, angle(forty_five)) caption("{bf:UPDATE} Coronavirus confirmed cases " "{stSerif: Norway vs. Ethiopia.}", position(11) size(*.8))
Code: Select all
g ltcase = ln(tcase)
label var ltcase "Log of total confirmed cases"
twoway (tsline ltcase if tcase>3 & cntry=="Italy", graphregion(fcolor("216 234 254")) recast(connected) mlabcolor(orange_red) mlabposition(12) mlabangle(sixty_five)) (tsline ltcase if tcase>0 & cntry=="Norway", graphregion(fcolor("216 234 254")) recast(connected) mlabcolor(orange_red) mlabposition(12) mlabangle(forty_five)), legend(ring(0) pos(5) col(1) order(1 2) label(1 "IT") label(2 "NOR")) ytitle(Log Confirmed Cases) ttitle(Date) tlabel(#15, angle(forty_five)) caption("{bf:2} Rate of New Coronavirus cases" "{stSerif: Italy vs. Norway.}", position(11) size(*.8)) saving(rates)
Code: Select all
sort cntrynum Year Month Day Deaths
bysort cntrynum Year Month : gen tdeath = sum(Deaths)
label variable tdeath "Total Deaths"
Code: Select all
twoway (tsline tdeath if tdeath>0 & cntry=="Italy", graphregion(fcolor("216 234 254")) recast(connected) mlabel(tdeath) mlabcolor(orange_red) mlabposition(12) mlabangle(sixty_five)) (tsline tdeath if tdeath>0 & cntry=="Norway", graphregion(fcolor("216 234 254")) recast(connected) mlabel(tdeath) mlabcolor(orange_red) mlabposition(12) mlabangle(forty_five)), legend(ring(0) pos(0) col(1) order(1 2) label(1 "IT") label(2 "NOR")) ytitle(Deaths) ttitle(Date) tlabel(#15, angle(forty_five)) caption("{bf:3} Total Deaths: Italy vs. Norway.", position(11) size(*.8)) saving(deaths)
Code: Select all
graph combine rates.gph deaths.gph, note("Source: www.ecdc.europa.eu")
Plot death rates and combine the graph with new case rates.