• This repository has been archived on 14/Jun/2023
  • Stars
    star
    100
  • Rank 328,544 (Top 7 %)
  • Language
    HTML
  • License
    Creative Commons ...
  • Created almost 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Legacy Source of tidymodels.org

Creative Commons License

tidymodels.org

This repo is the source of https://www.tidymodels.org, and this readme tells you how it all works.

  • If you spot any small problems with the website, please feel empowered to fix them directly with a PR.

  • If you see any larger problems, an issue is probably better: that way we can discuss the problem before you commit any time to it.

This repo (and resulting website) is licensed as CC BY-SA.

Requirements to preview the site locally

R packages

When updating the site, the goal is to use the most recent CRAN versions of the modeling/data analysis packages.

  1. Get a local copy of the website source.

    • Users of devtools/usethis can do:
      usethis::create_from_github(β€œtidymodels/tidymodels.org”)
      Note that usethis::create_from_github() works best when it can find a GitHub personal access token and usethis (git2r, really) is configured correctly for your preferred transport protocol (SSH vs HTTPS). Setup advice.
    • Otherwise, use your favorite method to fork and clone or download the repo as a ZIP file and unpack.
  2. Start R in your new tidymodels.org/ directory.

  3. To install the required packages, run the code within

    static/code/installs.R
    

    This file will also install the keras python libraries and environments.

  4. Restart R.

  5. You should now be able to render the site in all the usual ways for blogdown, such as blogdown::serve_site() or Addins > Serve Site.

Hugo

In addition to R packages, you'll need to make sure that you are using the same version of Hugo that we use to build the site. If you are not familiar with Hugo, it is the static site generator that we are using via the R blogdown package. To check your local version of Hugo, you can do:

# install.packages("blogdown") # if not using renv
blogdown::hugo_version()

Then check that against the version of Hugo we use to build our site.

If you have an older version of Hugo than what we use, you can update with:

blogdown::update_hugo()

Once you are up-to-date, you can build the site locally using:

blogdown::serve_site()

or Addins > Serve Site in the RStudio IDE.

This will open a preview of the site in your web browser, and it will automatically update whenever you modify one of the input files. For .Rmarkdown and .Rmd files, this will generate either a .markdown or an .html file. These rendered files need to be commited and pushed to GitHub to be published on the site.

Structure

The source of the website is a collection of .md, .Rmarkdown, and .Rmd files stored in content/, which are rendered for the site with blogdown.

  • content/packages/index.md: this is a top-level page on the site rendered from a single .md file. If you only edit this page, you do not have to use blogdown::serve_site() locally to render.

  • content/start/: these files make up a 5-part tutorial series to help users get started with tidymodels. Each article is an .Rmarkdown file as a page bundle, meaning that each article is in its own folder along with accompanying images, data, and rendered figures. If you edit a tutorial, please run blogdown::serve_site() locally to render the .markdown file, and be sure to commit the rendered file to the repo. No *.Rmd or *.html files should be committed in this directory. If you generate an *.html file locally during development, delete it once it's no longer useful to you. Keep it out of this repo. Also please make sure if you edit a file in this section that nothing is added to the static/ folder- all accompanying files should be in the article page bundle.

  • content/learn/: these files make up the articles presented in the learn section. This section is nested, meaning that inside this section, there are actually 4 subsections: models, statistics, work, develop. Each article is an .Rmarkdown file. If you edit or add an article, please run blogdown::serve_site() locally to render the .markdown file, and be sure to commit the rendered file to the repo.

    When you do that, any new articles added will show up on the main learn/ listing page automatically. By default, a maximum of 5 articles per subsection will show up in this list; use weights in the individual article YAML files to decide which 5 and their order. All articles with weights > 5 will show up when you click β€œSee all” for that subsection. No *.Rmd or *.html files should be committed to this directory. If you generate an *.html file locally during development, delete it once it's no longer useful to you. Keep it out of this repo. Also please make sure if you edit a file in this section that nothing is added to the static/ folder- all accompanying files should be in the article page bundle.

  • content/help/index.md: this is a top-level page on the site rendered from a single .md file. If you only edit this page, you do not have to use blogdown::serve_site() locally to render.

  • content/contribute/index.md: this is a top-level page on the site rendered from a single .md file. If you only edit this page, you do not have to use blogdown::serve_site() locally to render.

  • content/books/: these files make up the books page, linked from resource stickies. To add a new book, create a new folder with a new .markdown file inside named index.md. An image file of the cover should be added in the same folder, named cover.*.

  • content/find/: these files make up the find page, linked from the top navbar and resource stickies. Each of these pages is an .Rmd file. If you edit a page, please run blogdown::serve_site() locally to render the .html file, and be sure to commit the rendered file to the repo. Also please make sure if you edit a file in this section that nothing is added to the static/ folder- all accompanying files should be in the article page bundle.

Troubleshooting

If blogdown attempts to re-render posts (potentially on a massive scale), you need to make all the derived files look more recently modified than their respective source files. This affects (.Rmarkdown, .markdown) and (.Rmd, .html) file pairs. Do something like this:

library(fs)

md <- dir_ls("content", recurse = TRUE, glob = "*.markdown")
file_touch(md)

html <- dir_ls("content", recurse = TRUE, glob = "*.html")
file_touch(html)

For other problems, consider that you need to update blogdown or to run blogdown::update_hugo() (perhaps in an R session launched with sudo).

Also, if you accidentally or intentionally knit or preview the content using another method than blogdown::serve_site() (e.g. click the Preview button in RStudio for .[R]md), make sure you don't commit an .html file from an .md file.

More Repositories

1

broom

Convert statistical analysis objects from R into tidy format
R
1,402
star
2

tidymodels

Easily install and load the tidymodels packages
R
727
star
3

infer

An R package for tidyverse-friendly statistical inference
R
702
star
4

corrr

Explore correlations in R
R
583
star
5

parsnip

A tidy unified interface to models
R
554
star
6

TMwR

Code and content for "Tidy Modeling with R"
RMarkdown
552
star
7

recipes

Pipeable steps for feature engineering and data preprocessing to prepare for modeling
R
534
star
8

yardstick

Tidy methods for measuring model performance
R
354
star
9

rsample

Classes and functions to create and summarize resampling objects
R
318
star
10

stacks

An R package for tidy stacked ensemble modeling
R
284
star
11

tidypredict

Run predictions inside the database
R
256
star
12

tune

Tools for tidy parameter tuning
R
248
star
13

workflows

Modeling Workflows
R
193
star
14

textrecipes

Extra recipes for Text Processing
R
154
star
15

embed

Extra recipes for predictor embeddings
R
140
star
16

themis

Extra recipes steps for dealing with unbalanced data
R
138
star
17

butcher

Reduce the size of model objects saved to disk
R
130
star
18

censored

Parsnip wrappers for survival models
R
123
star
19

dials

Tools for creating tuning parameter values
R
110
star
20

probably

Tools for post-processing class probability estimates
R
108
star
21

tidyclust

A tidy unified interface to clustering models
R
103
star
22

tidyposterior

Bayesian comparisons of models using resampled statistics
R
101
star
23

aml-training

The most recent version of the Applied Machine Learning notes
HTML
100
star
24

hardhat

Construct Modeling Packages
R
99
star
25

workflowsets

Create a collection of modeling workflows
R
88
star
26

usemodels

Boilerplate Code for tidymodels
R
85
star
27

modeldb

Run models inside a database using R
R
79
star
28

workshops

Website and materials for tidymodels workshops
JavaScript
76
star
29

multilevelmod

Parsnip wrappers for mixed-level and hierarchical models
R
72
star
30

spatialsample

Create and summarize spatial resampling objects πŸ—Ί
R
69
star
31

learntidymodels

Learn tidymodels with interactive learnr primers
R
64
star
32

brulee

High-Level Modeling Functions with 'torch'
R
62
star
33

finetune

Additional functions for model tuning
R
61
star
34

shinymodels

R
45
star
35

applicable

Quantify extrapolation of new samples given a training set
R
43
star
36

model-implementation-principles

recommendations for creating R modeling packages
HTML
40
star
37

bonsai

parsnip wrappers for tree-based models
R
40
star
38

rules

parsnip extension for rule-based models
R
39
star
39

planning

Documents to plan and discuss future development
36
star
40

discrim

Wrappers for discriminant analysis and naive Bayes models for use with the parsnip package
R
28
star
41

baguette

parsnip Model Functions for Bagging
R
23
star
42

modeldata

Data Sets Used by tidymodels Packages
R
22
star
43

poissonreg

parsnip wrappers for Poisson regression
R
22
star
44

agua

Create and evaluate models using 'tidymodels' and 'h2o'
R
21
star
45

extratests

Integration and other testing for tidymodels
R
20
star
46

tidymodels.org

Source of tidymodels.org
JavaScript
16
star
47

plsmod

Model Wrappers for Projection Methods
R
14
star
48

cloudstart

RStudio Cloud ☁️ resources to accompany tidymodels.org
12
star
49

desirability2

Desirability Functions for Multiparameter Optimization
R
7
star
50

modeldatatoo

More Data Sets Useful for Modeling Examples
R
5
star
51

.github

GitHub contributing guidelines for tidymodels packages
4
star
52

modelenv

Provide Tools to Register Models for use in Tidymodels
R
3
star
53

survivalauc

What the Package Does (One Line, Title Case)
C
2
star