AfroData
A wrapper for Afrobarometer's datasets.
Installation
install.packages('devtools')
library('devtools')
devtools::install_github('AbdouSeck/AfroData')
Usage
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.
To do:
-
Adding more features (i.e. getting the codebook and specifying whether to read the data with haven's
read_sav
or foreign'sread.spss
). -
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).
Contributing:
- 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
History
2016
Credits
Afrobarometer Data, [All Countries, [All Rounds], [All Available Years]
License
License: MIT License