formhub.R is a library for making reading data form formhub.org into R easier.
- Getting started -- Basics of formhub.R
- Quick example -- Charting good_eats submission over time
- Making maps -- Making maps with North Ghana data
- Quality control -- How long did it take to process a survey
- Quality control II -- A basic tutorial on removing outliers from your data
- Making Readable Data -- Replacing "slugs" in data output with survey text
For most of the examples, I use the ggplot2 library, which is an amazing data visualization library worth every minute of your time spent learning it.
The package for formhub.R in R is simply called formhub
. For now, it cannot be installed from CRAN, but using Hadley Wickam's excellent devtools
package, you can install it directly from github. To install (or upgrade), run the following commands from your R terminal:
install.packages('devtools')
library(devtools)
install_github("formhub.R", username="SEL-Columbia")
library(formhub)
And voila! The formhub
package is installed in your R system! You can check by running:
help(formhubDownload)
At the moment, it has the following features:
- One command download of formhub.org data -- both public and private
- (Automatic) casting of data to the right type, based on the type of the input field in XLSform
select one
fields are converted to factorsinteger
/decimal
converted to numericsdate
fields (includingtoday
), anddatetime
fields (includingstart
andend
) are converted to lubridate instants [timezone information is discarded at the moment]- TRUE / FALSE fields created out of
select multiple
options are converted into booleans
- removeColumns convenience function that removes columns based on matching the title with a regular expression
- 'extra-schema' over-ride.
For planned features, go to the issues page.