forked from ropensci/skimr
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblog.Rmd
More file actions
95 lines (64 loc) · 3.1 KB
/
Copy pathblog.Rmd
File metadata and controls
95 lines (64 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
title: "Creating `skimr`"
author: "Team skimr"
date: "5/26/2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Motivation
The motivation of this project was to create a frictionless approach to quickly viewing summary statistics as part of a pipeline. There are many existing summary functions, but we found them lacking in one way or another because they can be generic, they don't always provide easy-to-operate-on data structures, and they are not pipeable.
So at [rOpenSci #unconf17](http://unconf17.ropensci.org/), we created a new package that would let you quickly skim useful, tidy summary statistics directly from a pipe.
And so we created [`skimr`](https://github.com/ropenscilabs/skimr#skimr).
In a nutshell, `skimr` will create a `skimr` object that can be further operated upon or that provides a human-readable printout in the console. It presents reasonable default summary statistics for numerics, factors, etc, and lists counts, and missing and unique values.
## Dev process
### About Team Members
**Amelia McNamara**
Job Title: Visiting Assistant Professor of Statistical & Data Sciences at Smith College
Project Contributions: Coder
**Eduardo Arino de la Rubia**
Job Title: Chief Data Scientist at Domino Data Lab
Project Contributions: Coder
**Hao Zhu**
Job Title: Programmer Analyst at the Institute for Aging Research
Project Contributions: Coder
**Julia Lowndes**
Job Title: Marine Data Scientist at the National Center for Ecological Analysis and Synthesis
Project Contributions: Documention and test scripts
**Shannon Ellis**
Job Title: Postdoctoral fellow in the Biostatistics Department at the Johns Hopkins Bloomberg School of Public Health
Project Contributions: Test Scripts
**Elin Waring**
Job Title: Professor at Lehman College Sociology Department, City University of New York
Project Contributions: Coder
**Michael Quinn**
Job Title: Quantitative Analyst at Google
Project Contributions: Coder
**Hope McLeod**
Job Title: Data Engineer at Kobalt Music
Project Contributions: Documentation
- how we pulled it all together
- next steps/future (issues for later)
### Step-by-step thought process
We started off by brainstorming what we liked about existing summary packages and what other features we wanted. We started looking at example data, `mtcars`.
```{r, eval=FALSE}
str(mtcars)
summary(mtcars)
```
#### What we like and dislike, in Amelia's words
```{r summary}
# "I like what we get here because mpg is numeric so these stats make sense:"
summary(mtcars$mpg)
# "But I don’t like this because cyl should really be a factor and shouldn't have these stats:"
summary(mtcars$cyl)
# "This is OK, but not descriptive enough. It could be clearer what I'm looking at."
mosaic::tally(~cyl, data=mtcars) # install.packages('mosaic')
# "But this output isn't labeled, not ideal."
table(mtcars$cyl, mtcars$vs)
# "I like this because it returns 'sd', 'n' and 'missing'":
mosaic::favstats(~mpg, data=mtcars)
```
## Introducing `skimr`
- what we've implemented to overcome those dislikes
- examples of skimr features