generated from quarcs-lab/r-spatial-env
-
Notifications
You must be signed in to change notification settings - Fork 1
/
expandr-auto.Rmd
105 lines (70 loc) · 1.57 KB
/
expandr-auto.Rmd
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
95
96
97
98
99
100
101
---
title: "Introduction to expandr"
subtitle: "Automatic exploration"
author: ""
output:
html_document: default
github_document: default
---
# Libraries
```{r setup, include=T}
suppressWarnings(suppressMessages({
library(knitr)
library(kableExtra)
library(htmltools)
library(tidyverse)
library(scales)
library(ExPanDaR)
}))
knitr::opts_chunk$set(fig.align = 'center')
theme_set(theme_minimal())
# Change the presentation of decimal numbers to 4 and avoid scientific notation
options(prompt="R> ", digits=6, scipen=7)
```
# Import data
```{r}
dat <- read_csv("https://raw.githubusercontent.com/quarcs-lab/mendez2020-convergence-clubs-code-data/master/assets/dat.csv")
```
```{r}
glimpse(dat)
```
Select all variables but id
```{r}
dat <- dat %>%
select(
-id
)
```
# Definitions of variables
```{r}
df_definitions <- read_csv("https://raw.githubusercontent.com/quarcs-lab/mendez2020-convergence-clubs-code-data/master/assets/dat-definitions.csv")
df_definitions
```
# Interactive exploration
## Initial exploration
```{r eval=FALSE, include=T}
# Run it in the console
ExPanD(
df = dat,
df_def = df_definitions,
export_nb_option = TRUE,
title = "Automatic data exploration",
abstract = paste("Full sample")
)
```
## Customized exploration
```{r}
customized <- readRDS("expandr-auto.RDS")
```
```{r eval=FALSE, include=T}
# Run it in the console
ExPanD(
df = dat,
df_def = df_definitions,
config_list = customized,
export_nb_option = TRUE,
title = "Customized data exploration",
abstract = paste("Full sample")
)
```
END