docs
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
<!-- Generated by pkgdown: do not edit by hand --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>burro: A Shiny Data Explorer for Teaching Exploratory Data Analysis • burro</title> <!-- jquery --> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> <!-- Bootstrap --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> <!-- bootstrap-toc --> <link rel="stylesheet" href="bootstrap-toc.css"> <script src="bootstrap-toc.js"></script> <!-- Font Awesome icons --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> <!-- clipboard.js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> <!-- headroom.js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="pkgdown.css" rel="stylesheet"> <script src="pkgdown.js"></script> <meta property="og:title" content="burro: A Shiny Data Explorer for Teaching Exploratory Data Analysis" /> <!-- mathjax --> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body data-spy="scroll" data-target="#toc"> <div class="container template-title-body"> <header> <div class="navbar navbar-default navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">burro</a> <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span> </span> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li> <a href="index.html"> <span class="fas fa fas fa-home fa-lg"></span> </a> </li> <li> <a href="reference/index.html">Reference</a> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> Articles <span class="caret"></span> </a> <ul class="dropdown-menu" role="menu"> <li> <a href="articles/contributing.html">Contributing to Burro</a> </li> <li> <a href="articles/data_scavenger_hunt.html">Example Data Scavenger Hunt</a> </li> <li> <a href="articles/making_a_burro_app.html">Making and Deploying a `burro` app</a> </li> <li> <a href="articles/preparing_data_for_burro.html">Preparing Data for Burro</a> </li> </ul> </li> <li> <a href="news/index.html">Changelog</a> </li> </ul> <ul class="nav navbar-nav navbar-right"> <li> <a href="http://github.com/laderast/burro/"> <span class="fab fa fab fa-github fa-lg"></span> </a> </li> </ul> </div><!--/.nav-collapse --> </div><!--/.container --> </div><!--/.navbar --> </header> <div class="row"> <div class="contents col-md-9"> <div class="page-header"> <h1>burro: A Shiny Data Explorer for Teaching Exploratory Data Analysis</h1> </div> <div id="burro-a-shiny-data-explorer-for-teaching-exploratory-data-analysis" class="section level1"> </div> <div id="section" class="section level1"> <h1 class="hasAnchor"> <a href="#section" class="anchor"></a><img src="man/figures/burro3.png" align="right"> </h1> <div id="why-burrow-into-your-data" class="section level2"> <h2 class="hasAnchor"> <a href="#why-burrow-into-your-data" class="anchor"></a>Why <code>burro</code>(w) into your data?</h2> <p>Exploratory Data Analysis (EDA) is highly visual and can be a motivating entry point into data science and analysis. <code>burro</code> attempts to make EDA accessible to a larger audience by exposing datasets as a simple Shiny App that can be <a href="https://laderast.github.io/burro/articles/making_a_burro_app.html">shared via <code>shinyapps.io</code> or other Shiny hosts</a>. You can see an example here: <a href="https://tladeras.shinyapps.io/nhanes_explore/" class="uri">https://tladeras.shinyapps.io/nhanes_explore/</a></p> <p>We use <code>burro</code> as an introductory tool for EDA by using it in “<a href="https://laderast.github.io/burro/articles/data_scavenger_hunt.html">data scavenger hunts</a>”, where groups of students are given specific questions to answer about the data, and then have to show their fellow students the answer and how the discovered it. Looking at the data together is vital to building understanding of the data together.</p> <p>By concentrating on the data visualization first, <code>burro</code> apps let us have conversations about the data, and hopefully motivate students to learn more tools of EDA such as <code>ggplot</code>, <code>visdat</code>, and <code>skimr</code>.</p> </div> <div id="installing-burro" class="section level2"> <h2 class="hasAnchor"> <a href="#installing-burro" class="anchor"></a>Installing <code>burro</code> </h2> <p><code>burro</code> is currently only on github and not on CRAN yet. To install it, run the following.</p> <pre class="{r}"><code>install.packages("remotes") remotes::install_github("laderast/burro")</code></pre> </div> <div id="dataset-requirements" class="section level2"> <h2 class="hasAnchor"> <a href="#dataset-requirements" class="anchor"></a>Dataset requirements</h2> <p><code>burro</code> expects a dataset as a <code>data.frame</code> or <code>data.table</code>. It attempts to automatically figure out which variables to use in specific visualizations.</p> <p>If the variable is categorical, then the variable should be cast as <code><a href="https://rdrr.io/r/base/factor.html">factor()</a></code> or <code><a href="https://rdrr.io/r/base/factor.html">ordered()</a></code>. For example:</p> <pre><code>data(mtcars) mtcars$cyl <- factor(mtcars$cyl) mtcars$gear <- factor(mtcars$gear) explore_data(mtcars)</code></pre> <p><code>burro</code> can utilize an <em>outcome variable</em>, which should be categorical/factor.</p> <p>It’s on my list of things to do to make <code>burro</code> adaptive to the data passed into it, but it currently is pretty inflexible about these two things.</p> <p>An optional (though helpful) requirement is to have a data dictionary which has a column called <code>variableNames</code> that defines each variable in the dataset.</p> </div> <div id="running-burro-on-nhanes-data" class="section level2"> <h2 class="hasAnchor"> <a href="#running-burro-on-nhanes-data" class="anchor"></a>Running <code>burro</code> on <code>NHANES</code> Data</h2> <p><img src="man/figures/categorical.gif" alt="burro app for NHANES"></p> <p>Here we make a <code>burro</code> app using the <code>explore_data</code> option for the NHANES (National Health and Nutrition Examination Survey) data. We specify our covariates, and our outcome of interest (<code>Depressed</code>, the number of depressive episodes).</p> <p>You can see the <code>burro</code> app for the <code>NHANES</code> data here: <a href="https://tladeras.shinyapps.io/nhanes_explore/" class="uri">https://tladeras.shinyapps.io/nhanes_explore/</a></p> <pre><code>library(burro) #make sure that NHANES package is installed library(NHANES) data(NHANES) data_dict <- readr::read_csv(system.file("nhanes/data_dictionary.csv", package="burro")) ##specify outcome variable here outcome <- c("Depressed") explore_data(dataset=NHANES, data_dictionary=data_dict, outcome_var=outcome)</code></pre> </div> <div id="running-burro-on-biopics-data-from-fivethirtyeight" class="section level2"> <h2 class="hasAnchor"> <a href="#running-burro-on-biopics-data-from-fivethirtyeight" class="anchor"></a>Running <code>burro</code> on <code>biopics</code> data from <code>fivethirtyeight</code> </h2> <p><img src="man/figures/biopics.png" alt="burro app for biopics"></p> <p>We can examine the <code>biopics</code> dataset using <code>burro</code>. We specify our <code>outcome_var</code> to be <code>subject_sex</code>, so we can examine everything through the facet of gender.</p> <pre class="{r}"><code>library(burro) library(fivethirtyeight) data(biopics) explore_data(biopics, outcome_var = "subject_sex") </code></pre> </div> <div id="run-burro-on-diamonds" class="section level2"> <h2 class="hasAnchor"> <a href="#run-burro-on-diamonds" class="anchor"></a>Run <code>burro</code> on <code>diamonds</code> </h2> <pre class="{r}"><code>library(ggplot2) data(diamonds) burro::explore_data(diamonds, outcome_var="cut")</code></pre> </div> <div id="acknowledgements" class="section level2"> <h2 class="hasAnchor"> <a href="#acknowledgements" class="anchor"></a>Acknowledgements</h2> <p><code>burro</code> uses many wonderful packages developed by Nicholas Tierney and rOpenSci: <a href="http://visdat.njtierney.com/"><code>visdat</code></a>, <a href="http://naniar.njtierney.com/"><code>naniar</code></a>, and <a href="https://github.com/ropensci/skimr"><code>skimr</code></a>.</p> <p><code>burro</code> was partially developed with funding from Big Data to Knowledge (BD2K) and a National Library of Medicine T15 Training Grant supplement for the development of data science curricula.</p> <p>The <code>burro</code> hex sticker uses clipart <a href="https://www.freepik.com/free-vector/donkey-head_763369.htm">designed by Freepik</a>.</p> </div> <div id="related-packages" class="section level2"> <h2 class="hasAnchor"> <a href="#related-packages" class="anchor"></a>Related Packages</h2> <p>The <code>esquisse</code> package (<a href="https://github.com/dreamRs/esquisse" class="uri">https://github.com/dreamRs/esquisse</a>) is a wonderful start to making a drag and drop visualization tool in R. Check it out!</p> </div> <div id="license" class="section level2"> <h2 class="hasAnchor"> <a href="#license" class="anchor"></a>License</h2> <p><code>burro</code> is released under a MIT license. Please let us know if you are using <code>burro</code> in your work!</p> </div> <div id="contributing" class="section level2"> <h2 class="hasAnchor"> <a href="#contributing" class="anchor"></a>Contributing</h2> <p>We want you to contribute! See the <a href="https://laderast.github.io/burro/CONTRIBUTING">contributing link above</a> for more info.</p> </div> </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> <h2 data-toc-skip>Contents</h2> </nav> </div> </div> <footer> <div class="copyright"> <p>Developed by Ted Laderas.</p> </div> <div class="pkgdown"> <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> </div> </footer> </div> </body> </html>