Learn R Programming

⚠️There's a newer version (1.3.5) of this package.Take me there.

explore

Simplifies Exploratory Data Analysis:

  • Interactive data exploration using explore()
  • Generate an automated report of your data (or patterns in your data) using report()
  • Manual exploration using explore(), describe(), explain_*(), abtest(), ...
# install from CRAN
install.packages("explore")

Examples

# interactive data exploration
library(explore)
beer <- use_data_beer()
beer |> explore()
# describe data
beer |> describe()
# A tibble: 11 × 8
   variable          type     na na_pct unique    min    mean    max
   <chr>             <chr> <int>  <dbl>  <int>  <dbl>   <dbl>  <dbl>
 1 name              chr       0    0      161   NA     NA      NA  
 2 brand             chr       0    0       29   NA     NA      NA  
 3 country           chr       0    0        3   NA     NA      NA  
 4 year              dbl       0    0        1 2023   2023    2023  
 5 type              chr       0    0        3   NA     NA      NA  
 6 color_dark        dbl       0    0        2    0      0.09    1  
 7 alcohol_vol_pct   dbl       2    1.2     35    0      4.32    8.4
 8 original_wort     dbl       5    3.1     54    5.1   11.3    18.3
 9 energy_kcal_100ml dbl      11    6.8     34   20     39.9    62  
10 carb_g_100ml      dbl      16    9.9     44    1.5    3.53    6.7
11 sugar_g_100ml     dbl      16    9.9     26    0      0.72    4.6
# explore data manually
beer |> explore(type)
beer |> explore(energy_kcal_100ml)
beer |> explore(energy_kcal_100ml, target = type)
beer |> explore(alcohol_vol_pct, energy_kcal_100ml, target = type)
# explore manually with color and interactive
beer |> 
  explore(sugar_g_100ml, color = "gold") |> 
  interact()

Get started

Copy Link

Version

Install

install.packages('explore')

Monthly Downloads

1,345

Version

1.3.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Roland Krasser

Last Published

September 2nd, 2024

Functions in explore (1.3.2)

decrypt

decrypt text
create_data_unfair

Create data unfair
explain_xgboost

Explain a binary target using xgboost
describe_all

Describe all variables of a dataset
explore

Explore a dataset or variable
create_data_random

Create data random
explain_tree

Explain a target using a simple decision tree (classification or regression)
data_dict_md

Create a data dictionary Markdown file
balance_target

Balance target variable
cut_vec_num_avg

Cut a variable
describe_cat

Describe categorical variable
explore-package

explore: Simplifies Exploratory Data Analysis
describe_num

Describe numerical variable
create_data_person

Create data person
describe_tbl

Describe table
create_notebook_explore

Generate a notebook
create_data_abtest

Create data of A/B testing
drop_var_by_names

Drop variables by name
create_data_esoteric

Create data esoteric
format_num_kMB

Format number as character string (kMB)
explore_density

Explore density of variable
format_num_auto

Format number as character string (auto)
describe

Describe a dataset or variable
drop_var_no_variance

Drop all variables with no variance
drop_var_not_numeric

Drop all not numeric variables
get_nrow

Get number of rows for a grid plot
explore_shiny

Explore dataset interactive
get_type

Return type of variable
explain_forest

Explain a target using Random Forest.
drop_var_low_variance

Drop all variables with low variance
explore_all

Explore all variables
explore_targetpct

Explore variable + binary target (values 0/1)
explore_bar

Explore categorical variable using bar charts
explore_tbl

Explore table
log_info_if

Log conditional
format_num_space

Format number as character string (space as big.mark)
interact

Make a explore-plot interactive
show_color

Show color vector as ggplot
target_explore_cat

Explore categorical variable + target
target_explore_num

Explore Nuberical variable + target
predict_target

Predict target using a trained model.
replace_na_with

Replace NA
format_target

Format target
get_color

Get predefined colors
format_type

Format type description
simplify_text

Simplifies a text string
use_data_beer

Use the beer data set
drop_obs_if

Drop all observations where expression is true
create_data_newsletter

Create data newsletter
total_fig_height

Get fig.height for RMarkdown-junk using explore_all()
explain_logreg

Explain a binary target using a logistic regression (glm). Model chosen by AIC in a Stepwise Algorithm (MASS::stepAIC()).
drop_obs_with_na

Drop all observations with NA-values
get_var_buckets

Put variables into "buckets" to create a set of plots instead one large plot
drop_var_with_na

Drop all variables with NA-values
guess_cat_num

Return if variable is categorical or numerical
use_data_diamonds

Use the diamonds data set
use_data_titanic

Use the titanic data set
weight_target

Weight target variable
use_data_iris

Use the iris flower data set
plot_legend_targetpct

Plots a legend that can be used for explore_all with a binary target
use_data_penguins

Use the penguins data set
use_data_mpg

Use the mpg data set
report

Generate a report of all variables
plot_text

Plot a text
explore_cor

Explore the correlation between two variables
use_data_mtcars

Use the mtcars data set
explore_count

Explore count data (categories + frequency)
encrypt

encrypt text
plot_var_info

Plot a variable info
mix_color

Mix colors
rescale01

Rescales a numeric variable into values between 0 and 1
use_data_starwars

Use the starwars data set
add_var_random_int

Add a random integer variable to dataset
add_var_random_moon

Add a random moon variable to dataset
count_pct

Adds percentage to dplyr::count()
abtest

A/B testing
abtest_shiny

A/B testing interactive
abtest_targetnum

A/B testing comparing two mean
abtest_targetpct

A/B testing comparing percent per group
create_data_churn

Create data churn
check_vec_low_variance

Check vector for low variance
add_var_random_cat

Add a random categorical variable to dataset
add_var_random_dbl

Add a random double variable to dataset
create_data_empty

Create an empty dataset
clean_var

Clean variable
add_var_random_starsign

Add a random starsign variable to dataset
create_data_buy

Create data buy
add_var_id

Add a variable id at first column in dataset
add_var_random_01

Add a random 0/1 variable to dataset
create_data_app

Create data app