Skip to content

jwrozelle/ona.R

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ona.R

ona.R is a library for making reading data form ona.io into R easier.

This project is fork of formhub.r by Prabhas Pokharel. Future developments and improvements of the library will be done here.

Examples

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.

Installing ona.R

The package for ona.R in R is simply called ona. 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("ona.R", username="onaio")
library(ona)

And voila! The ona package is installed in your R system! You can check by running:

help(onaDownload)

Features

At the moment, it has the following features:

  • One command download of ona.io 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 factors
    • integer/decimal converted to numerics
    • date fields (including today), and datetime fields (including start and end) 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.

Packages

No packages published

Languages

  • HTML 98.9%
  • R 1.1%