Coder Social home page Coder Social logo

maskegger / ranalysisskeleton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wibeasley/ranalysisskeleton

0.0 1.0 0.0 50.5 MB

Files and settings commonly used in analysis projects with R

License: GNU General Public License v2.0

R 94.35% Python 4.91% Shell 0.74%

ranalysisskeleton's Introduction

R Analysis Skeleton

No one beginning a data science project should start from a blinking cursor.
...Templatization is a best practice for things like using common directory structure across projects...
-Megan Risdal Kaggle Product Lead.

This project contains the files and settings commonly used in analysis projects with R. A developer can start an analysis repository more quickly by copying these files. The purpose of each directory is described in its README file. Some aspects are more thoroughly described in Collaborative Data Science Practices.

Pipelines

The repo contains two pipelines that aim to be simple enough to understand, yet complex enough to mimic aspects frequently seen in analysis projects.

Cars

The simplest example involves a csv that is lightly groomed and saved as an rds file. A knitr Rmd file analyzes the rds; the text, graphs, and tables are saved as a self-contained html. The html file is very portable; it can be saved on a drive, emailed to a colleague, or publicly served on a website.

flow-skeleton-car

Intra-individual Differences

Most nontrivial data science projects require multiple sources to address a single issue. This example uses three sources: (a) longitudinal measurements for individuals across time (mlm.csv), (b) static county characteristics (county.csv), and (c) longintudinal county-level characteristics (te.csv). Each csv is independently groomed and loaded into its own database table (in db.sqlite) by an ellis lane. Conventional statistical software is not designed to digest multiple data rectangles; a scribe transforms multple database-normalized tables into a single rds that can be analyzed directly. In this case, the mlm.rds supports two analyses: a conventional report of statistical inferences intended for subject-experts concerned with complex hypotheses, and a dashboard of simplified patterns intended for administrators concerned with operational progress. The te.rds supports a comparison of the time and effort results between counties.

flow-skeleton

Establishing a Workstation for Analysis

  1. Install and configure the needed software, as described in the Workstation chapter of Collaborative Data Science Practices. Select the programs to meet your needs, and if in doubt, cover the Required Installation section and then pick other tools as necessary.

  2. Download the repo to your local machine. One option is to clone it.

  3. On your local machine, open the project in RStudio by double-clicking RAnalysisSkeleton.Rproj.

  4. Install the packages needed for this repo. Within the RStudio console, execute these two lines. The first line installs a package. The second line inspects the repo's DESCRIPTION file to identify and install the prerequisites.

    remotes::install_github(repo="OuhscBbmc/OuhscMunge")
    OuhscMunge::update_packages_addin()
  5. Execute the entire pipeline of the repo by executing the flow.R file. Open it in RSutdio and click the 'Source' button near the top right of the screen. The flow file then tells other files to run in the desired order. Running this file creates the data objects --i.e., the primary objective of this repo. The objects include (a) intermediate data files, (b) analysis-ready datafiles, and (c) html reports that display the ultimate analyses.

  6. If you'd like to view the database created by this repo's pipeline, install a program that can visually explore a SQLite file. Two of many options are SQLiteStudio and DB Browser for SQLite.

ranalysisskeleton's People

Contributors

arpeters avatar wibeasley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.