covid19 Facts, Graphs and tutorials

User avatar

Topic author
gebetaforum
Site Admin
Posts: 71
Joined: Fri Aug 18, 2017 12:12 am
Contact:

*Download updated data from https://www.ecdc.europa.eu/
*Save on desktop as "covid19.xlsx"

Code: Select all

import excel "C:\Users\solomon\Desktop\covid19.xlsx", sheet("COVID-19-geographic-disbtributi") firstrow
*Drop obsrvations in 2019, only 1 obsrvation, i.e. China on 31.12.2019

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"
*New Confirmed Cases: Norway vs Ethiopia

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)) 
CovidSt.png
CovidSt.png (48.41 KiB) Viewed 48406 times
*Rate of New Confirmed Cases: Norway vs Italy

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)
CovidRt.png
CovidRt.png (47.13 KiB) Viewed 48406 times
*Deaths: Italy vs Norway

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) 
CovidDeaths.png
CovidDeaths.png (39.24 KiB) Viewed 48406 times
*Combine graphs

Code: Select all

graph combine rates.gph deaths.gph, note("Source: www.ecdc.europa.eu")
CovidComb.png
CovidComb.png (88.26 KiB) Viewed 48406 times
Challenge
Plot death rates and combine the graph with new case rates.
User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

Update: 22nd day since first case found
ethcovid_04042020.png
ethcovid_04042020.png (73.37 KiB) Viewed 48369 times

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe

User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

COVID-19 Update April 04, 2020
By Gebeta Forum
.
4april_bysexagecat.png
4april_bysexagecat.png (51.58 KiB) Viewed 48335 times
4april_byregionsex.png
4april_byregionsex.png (46.46 KiB) Viewed 48335 times

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe

User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

COVID-19 Update April 04, 2020
  • 3 new confirmed cases found today. and
  • One patient, 85 years old female Ethiopian, recovered.
4april_timeseries.png
4april_timeseries.png (52.29 KiB) Viewed 48298 times

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe

User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

COVID-19 in Ethiopia

Update Day 26.

07042020_TS.png
07042020_TS.png (60.67 KiB) Viewed 48223 times

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe

User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

COVID-19 Update 09.04.2020
.
9april_timeseries.png
9april_timeseries.png (65.09 KiB) Viewed 48176 times
.
by_age_9april.png
by_age_9april.png (36.98 KiB) Viewed 48176 times
.
by_region_9april.png
by_region_9april.png (36.4 KiB) Viewed 48176 times
.
by_sex_9april.png
by_sex_9april.png (32.38 KiB) Viewed 48176 times
.

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe

User avatar

yaman
Posts: 86
Joined: Mon Sep 11, 2017 12:50 pm

COVID-19 Update Ethiopia

Of the 69 confirmed cases, 50 (72 %) have a history of travel.

Majority of them are from Dubai.
.
10april_travel_hist.png
10april_travel_hist.png (31.06 KiB) Viewed 48067 times
.
10april_by_travel_hist.png
10april_by_travel_hist.png (8.79 KiB) Viewed 48067 times

"I have great faith in fools; self-confidence my friends call it." - Edgar Allan Poe

Post Reply