Automates the downloading and merging of the Afrobarometer data. Fetches
any missing, publicly available files, creates a master MonetDB database in
options(afrobarometer.data), and merges available spatial data with
the questionnaires for each round.
A sequence of integers indicating which rounds to build. As
of February 2017, there are six rounds. Default is value
A boolean value indicating whether or not the SQLite
database in the local Afrobarometer data directory should be overwritten
May only run
afrb_dir and before
Builds the database in
downloading files as needed into sub-directories and merging the resulting
1 2 3 4 5 6 7 8 9 10 11
## Not run: library(afrobarometer) afrb_dir(path = "~/foo") # download first 3 rounds but do not overwrite the existing database. # This will fail if the database is already populated with merged tables. afrb_build(rounds = 3:4) # download all rounds and overwrite the existing database. afrb_build(rounds = 3:4, overwrite = TRUE) r3 <- afrb_round(round = 3) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.