This repository contains code analysing Czech public finance data in order to understand the (potential) impact of COVID19 related measures on municipal budgets.
Outputs are published on https://obce-covid19.netlify.app/
renv
is used to ensure exact reproducibility with respect to package version
renv::snapshot()
renv.lock
file alongside other scriptsbuild.R
shows the order in which to run everything._
) are turned into webpages using rmarkdown::render_site()
. The result ends up in docs
turned into a website with a navigation bar, all of which is set up in _site.yml
. Together with generating Word docs, this can be done in build.sh
on a UNIX-based machine.netlify-cli
: https://obce-covid19.netlify.app/ (also done in build.sh
.)/docs
or data-*
is never committed or pushed to Githubstatnipokladna
package.data-input
data-processed
see R script numbered 7-9
All website outputs can be generated by running rmarkdown::render_site()
, which ensures things happen in the right order.
Special care is required when there is a need for rendering the scenario document (scenare.Rmd) separately, or when developing it further. For the first two outcomes simulated in each of the three scenarios, the same subdocument (_scen_pt1.Rmd
) is run with different parameters, depending on the scenario. This generates and writes to disk ggplot2
objects, which are then brought into the main scenare.Rmd
document and displayed. For developing the individual charts, the right parameters have to be set (denoting the scenario and the outcome being simulated) so that the charts are generated correctly.
data-*
data-*
, so that Rmarkdown files only load the minimal data necessary and time to build them is minimised.