DeclareDesign Community

Suggestion to add plots to vignettes

I have found the tutorial on Time series data with fabricatr very helpful, but I end up adding plots to the examples as these can make it much easier to understand how the code works. Iā€™m sharing these in case others find it helpful - and I think it might be worth incorporating this kind of thing into the vignettes.
For example, this code just creates a country label that combines each country with its associated parameters for the example of Multiple Units with Time Trends, and then plots the series for each country.

panel_units$countrylabel <-paste0(panel_units$countries,ā€™: base=ā€™,round(panel_units$base_gdp,0),ā€™; growth=ā€™,
round(panel_units$growth_units,2),"; err=",round(panel_units$growth_error,2))
ggplot(panel_units,aes(x=ts_year,y=gdp_measure,colour=countrylabel,group=countrylabel)) + geom_line()

1 Like