I am using the data set provided in this study, "Oxford COVID-19 govt response tracker' here to graph the different measures implemented by states from the beginning of the Covid-19 outbreak in Europe.
Code:
Contains data obs: 10,182 vars: 37 ------------------------------------------------------------------------------------------------------------------------ storage display value variable name type format label variable label ------------------------------------------------------------------------------------------------------------------------ CountryName str32 %32s CountryName CountryCode str3 %9s CountryCode Date long %10.0g Date strDate str8 %9s Date S1_Schoolclos~g byte %10.0g S1_School closing S1_IsGeneral byte %10.0g S1_IsGeneral S2_Workplacec~g byte %10.0g S2_Workplace closing S2_IsGeneral byte %10.0g S2_IsGeneral S3_Cancelpubl~s byte %10.0g S3_Cancel public events S3_IsGeneral byte %10.0g S3_IsGeneral S4_Closepubli~t byte %10.0g S4_Close public transport S4_IsGeneral byte %10.0g S4_IsGeneral S5_Publicinfo~s byte %10.0g S5_Public information campaigns S5_IsGeneral byte %10.0g S5_IsGeneral S6_Restrictio~e byte %10.0g S6_Restrictions on internal movement S6_IsGeneral byte %10.0g S6_IsGeneral S7_Internatio~s byte %10.0g S7_International travel controls S8_Fiscalmeas~s double %10.0g S8_Fiscal measures S9_Monetaryme~s double %10.0g S9_Monetary measures S10_Emergency~l double %10.0g S10_Emergency investment in health care S11_Investmen~s double %10.0g S11_Investment in Vaccines ConfirmedCases long %10.0g ConfirmedCases ConfirmedDeaths int %10.0g ConfirmedDeaths StringencyIndex byte %10.0g StringencyIndex tsdate float %td ctry long %8.0g ctry CountryCode
My goal is to graph together, comparative, head-to-head, not time delayed, some selected countries (ITA ESP, FRA, ROU) using as reference:
1) days from the first case reported for one graph
2) cumulative number of confirmed cases for another graph.
I declared the set timeseries by ctry and tsdate and used addplot to overlay the four graphs, using for the X reference the lagged time between first case in each country: France having the first case reported (Jan 24), Italy and Spain 8 days later (Jan 31) and Romania 34 days later (Feb 26).
It worked (see below), however the X labels are misleading (of course I can have them removed) and I don't find it very elegant.
Array
Is there a way to do this more directly and having control over the legend?
Regarding the second graph, using the number of cases as the X reference worked by overriding the panel setting with t(ConfirmedCases), but the graph looks like this:
Array
Any ideea how to use the whole plot area?
Thank you!
Best,
Cristian
0 Response to line graphic of series from 1st occurrence Covid-19
Post a Comment