A wrapper for Afrobarometer's datasets.
install.packages('devtools') library('devtools') devtools::install_github('AbdouSeck/AfroData')
getCountries() # to get the countries available. getRounds(countryname) # to get the rounds of a specific country. getNumberofRounds(countryname) # get the number of rounds of a specific country. getRoundData(country, round) # fetch the data for a specific round. getMergedRounds() # get all the rounds for which there is a merged dataset available. getMergedData(roundNumber) # get the merged dataset for a given round.
Adding more features (i.e. getting the codebook and specifying whether to read the data with haven's
Working on vectorizing the functions, so that it becomes possible to fetch more than one dataset at a time.
Using some form of memoization to cache the results (this is much needed since each function call is quite expensive).
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Afrobarometer Data, [All Countries, [All Rounds], [All Available Years]
License: MIT License