From 1644e8cf35f0645fc24f06c4b97042c4877e10bf Mon Sep 17 00:00:00 2001 From: Jon Harmon Date: Wed, 4 Sep 2024 05:49:24 -0500 Subject: [PATCH] Make pkgdown happy. --- README.Rmd | 124 +++++++++++++++++++ _pkgdown.yml | 5 +- man/figures/logo.png | Bin 32099 -> 31985 bytes pkgdown/favicon/apple-touch-icon-120x120.png | Bin 10412 -> 10412 bytes pkgdown/favicon/apple-touch-icon-152x152.png | Bin 14488 -> 14488 bytes pkgdown/favicon/apple-touch-icon-180x180.png | Bin 18229 -> 18229 bytes pkgdown/favicon/apple-touch-icon-60x60.png | Bin 4132 -> 4132 bytes pkgdown/favicon/apple-touch-icon-76x76.png | Bin 5600 -> 5600 bytes pkgdown/favicon/apple-touch-icon.png | Bin 18229 -> 18229 bytes pkgdown/favicon/favicon-16x16.png | Bin 1123 -> 1123 bytes pkgdown/favicon/favicon-32x32.png | Bin 2083 -> 2083 bytes readme.md | 77 ++++++------ 12 files changed, 168 insertions(+), 38 deletions(-) create mode 100644 README.Rmd diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..af035b5 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,124 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# tidytuesdayR tidytuesdayR website + + +[![CRAN status](https://www.r-pkg.org/badges/version/tidytuesdayR)](https://CRAN.R-project.org/package=tidytuesdayR) +[![R build status](https://github.com/dslc-io/tidytuesdayR/workflows/R-CMD-check/badge.svg)](https://github.com/dslc-io/tidytuesdayR/actions) +[![Coverage +status](https://codecov.io/gh/dslc-io/tidytuesdayR/branch/main/graph/badge.svg)](https://app.codecov.io/github/dslc-io/tidytuesdayR?branch=main) +[![Downloads from the RStudio CRAN mirror](http://cranlogs.r-pkg.org/badges/tidytuesdayR)](https://cran.r-project.org/package=tidytuesdayR) +[![License: +MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![R-CMD-check](https://github.com/dslc-io/tidytuesdayR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dslc-io/tidytuesdayR/actions/workflows/R-CMD-check.yaml) + + +tidytuesdayR makes it easy to participate in the weekly [\#TidyTuesday](https://tidytues.day/) project by providing functions to quickly import data posted to the [Tidy Tuesday repository](https://github.com/rfordatascience/tidytuesday). + +## Installation + +This package is (usually) available on CRAN via: + +``` r +install.packages("tidytuesdayR") +``` + +To get the latest in-development features, install the development version from GitHub: + +``` r +#install.packages("pak") +pak::pak("dslc-io/tidytuesdayR") +``` + +## Usage + +There are currently two methods to access the data from the respository. + +### Load the Data! + +The simplest way is to use the `tt_load()` function. This +function has accepts two types of inputs to determine which data to +grab. It can be a date as a string in the YYYY-MM-DD format like below. + +``` r +library(tidytuesdayR) +tt_data <- tt_load("2019-01-15") +``` + +Or the function can accept the year as the first argument, and which +week of the year as the second. + +``` r +tt_data <- tt_load(2019, week=3) +``` + +`tt_load()` naively downloads *all* the data that is available and +stores them in the resulting `tt_data` object. To access the data, use +the `$` or `[[` notation and the name of the dataset. + +``` r +tt_data$agencies +tt_data[["agencies"]] +``` + +To view the readme, either print the `tt_data` object or use the `readme()` +function. When you print the `tt_data` object, you also get the available +datasets names printed in the console. + +``` r +readme(tt_data) +print(tt_data) +``` + +``` +## Available Datasets: +## agencies +## launches +## +``` + +### TidyTemplate + +As part of the goal of making participating in #TidyTuesday easier, {tidytuesdayR} now also provides a template! +To use it, just use the `use_tidytemplate()` function! + +By default, the template will assume to be using the most recent TidyTuesday. +However, you can pass a date object or character string in YYYY-MM-DD format +defining a different date you want to use. If you don't recall the exact date, +no worries, you can use the `tt_available()` function to figure out which date +and get the date to use! + +```r +## this weeks TidyTuesday! +tidytuesdayR::use_tidytemplate() + +## TidyTuesday from Week 42 of 2019 +tidytuesdayR::use_tidytemplate(refdate = "2019-10-15") +``` + +Additionally, by default the template will create the new file in your working +directory, using the "YYYY_MM_DD" format per good practices. +However, if you are so inclined, you can rename it to whatever you wish. + +```r +tidytuesdayR::use_tidytemplate(name = "My Super Great TidyTuesday.Rmd") +``` + +## Contributing + +Please note that the ‘tidytuesdayR’ project is released with a +[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to +this project, you agree to abide by its terms. diff --git a/_pkgdown.yml b/_pkgdown.yml index 27a4f8b..dcec163 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,3 +1,4 @@ +url: https://dslc-io.github.io/tidytuesdayR/ + template: - params: - bootswatch: cosmo + bootstrap: 5 diff --git a/man/figures/logo.png b/man/figures/logo.png index 47328359d5a7c35933db962ebfac9d34c2d09376..2792148391cf727d2f924b5c3749e6c0febdc45b 100644 GIT binary patch delta 36 scmaF-i}B-6#tAADO(MBoaI$b&vrB)lRM|K^v4)eu)78&qol`;+01*)lZvX%Q delta 148 zcmezPlkxE{#tACCEa{HEjtmSN`?>!lvQAWt;d;y?#BXk7kijmnu|2USTeZYBq9i4; zB-JXpC>2OC7#SE^>KYp98d`)H8C#i}TA3Q?8dz8v7%W^|=gz>ufY6YepOTqYiCe>k Tf5(0UH86O(`njxgN@xNAmEtV+ diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png index 80e0b845b4dad7fa9e43d9a18ff680b1632784e8..797134515716a9fd6bc86bf594c7d48af02555e6 100644 GIT binary patch delta 101 zcmZ1zxF&Ey1=kBs7H%flmsiv;Z)_@1_cqZru+%j$2{AOZGBC0-veY&(ure?>Ij`>o m0|SFRc?MtW?ChKk%19*4Lc5-l}xtP$Oiy%3?9t@ delta 101 zcmZ1zxF&Ey1=kaHZgCU6sI8A*Y-}n}_cqWqFxNFS3^6jcGBvU?G1E3MvNAB>{yD*h lfq_A_#5JNMC9x#cDmOnRGp&-r$iN7@hN>kR4U=s(@&RD^9rgeK diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png index f2e127158a9bc0a46996a6f29a58bbb2719ce121..507e29bf1f73f94881386853bb68a10f31998b65 100644 GIT binary patch delta 101 zcmbPHIHPbv1=kBs7H%fFg1cpz8=GRxy-jotEOiY`LJSS942-Od4YUmmtPBh$tU2Av lz`&qd;u=wsl30>zm7AZEnO4bQWMG6{!^4lomXkFt@&P}S9%}#q delta 101 zcmbPHIHPbv1=kaHZgCU6sI8A*Y;1}#_cqWqFxNFS3^6jcGBvU?G1E3MvNAB>{yD*h lfq_A_#5JNMC9x#cDmOnRGp&-r$iN7@hN>kR4U;u3@&Rb29tHpa diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png index 3e0f4d568af62827a0865e7972841a7cc8973026..e6388382db711ef9d20c4b46f549660a43bab0b7 100644 GIT binary patch delta 103 zcmdnm$GEkRaY6;x3r-epCVBQ-ZvQtn{dDy<(KWEtH82S=G_*1>vNAT*HZZUtA~LAAs+q9i4;B-JW6KP5A*lEKKp2)hRNwu;`#$K3J(gH0a( delta 103 zcmdnm$GEkRaY6;x6LxNK6TPUdk6&zT`swOzple{RYiJl^WNc+>WMyKeZD3?&V8H!z of(-)$gKCLuL`h0wNvc(DeoAIqC4-TH5q1q#OEelLA9KqG0Mhs$(f|Me diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png index d20320d809fe388468ab13929059126934268f4e..f8e1af5a387cb8acab81a9846bddd148bf604ce6 100644 GIT binary patch delta 101 zcmZ3YutZ@(1=kBs7H%eKhV4zyHa5NB^ES~nu+%j$2{AOZGBC0-GS@aRure^1x$x^$ m1_lPz64!{5l*E!$tK9sQ%(O}dBLgGs8eaVI)ttPQKOX=wx*oRx delta 101 zcmZ3YutZ@(1=kaHZgCUc!+SObZESkM=WU>CV6JOu7-D2>Wol$)VybOmWMyDrCD^r) lfq_A_#5JNMC9x#cDmOnRGp&-r$iN7@25%oD*~we^^8p@39IgNW diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png index 6626570a9cec38252012f40bd5fe715d80a7fe45..37439d52bf16478d19accbb238586e1a658d3eda 100644 GIT binary patch delta 83 zcmaE${Xly{1=kBs7H%e)d6&gqH#RL1kuuRWu+%j$2{AOZGBC0-vd}g#ure^nf7x0y S*+EnshqT-l+XIseMe_j|F&EAN delta 83 zcmaE${Xly{1=kaHZgCUc!+SObZERX1B4wa!V6JOu7-D2>Wol$)VybOmWMyDrCD^ra SvV*8N4ry;6BiYG?qWJ(f#1{$x diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png index d6e00781bfa9a52e5fe816488d498cc1dd97d5ba..0e4ff948120f249835f799fcf5d95787599fa474 100644 GIT binary patch delta 103 zcmdnm$GEkRaY6;x3r-epCWVcAvJY)+`swOzqHAEOYhV&$XlP|%WMyomZD3$!V8CvC oYYhVfgKCLuL`h0wNvc(DeoAIqC4-TH5q1q_c}W73kGbUo0Gf;*w*UYD delta 103 zcmdnm$GEkRaY6;x6LxNK6MfxHm+Lk*{dDy<&^0jEH8cz{GPW``vNAE(HZZa>Fj(6+ oyMuv&LAAs+q9i4;B-JW6KP5A*lEKKp2)l+mmz7N>A9KqG0K8ux`2YX_ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png index 783541861f3c4dd099a5630e5507bcc422306b3b..14ba866e0accb8fa3727c85e9d2573326afac9d0 100644 GIT binary patch delta 103 zcmaFN@t9-7bSADBoGjc-${Jg(DmE`<;$ZYP(KWEtH82S=G_*1>vNAT+HZZUwDkHZftta=53&BV6JOu7-D2>Wol$)VySIlWMyFRcjJSr m3=9maC9V-ADTyViR=N2pnQ4^_Mg~UMHT1lR$eg@|Js$v%J0Icz diff --git a/readme.md b/readme.md index 7ec2b52..d8a085a 100644 --- a/readme.md +++ b/readme.md @@ -1,31 +1,38 @@ -# tidytuesdayR + + + +# tidytuesdayR tidytuesdayR website -[![CRAN status](https://www.r-pkg.org/badges/version/tidytuesdayR)](https://CRAN.R-project.org/package=tidytuesdayR) -[![R build status](https://github.com/dslc-io/tidytuesdayR/workflows/R-CMD-check/badge.svg)](https://github.com/dslc-io/tidytuesdayR/actions) + +[![CRAN +status](https://www.r-pkg.org/badges/version/tidytuesdayR)](https://CRAN.R-project.org/package=tidytuesdayR) +[![R build +status](https://github.com/dslc-io/tidytuesdayR/workflows/R-CMD-check/badge.svg)](https://github.com/dslc-io/tidytuesdayR/actions) [![Coverage status](https://codecov.io/gh/dslc-io/tidytuesdayR/branch/main/graph/badge.svg)](https://app.codecov.io/github/dslc-io/tidytuesdayR?branch=main) -[![Downloads from the RStudio CRAN mirror](http://cranlogs.r-pkg.org/badges/tidytuesdayR)](https://cran.r-project.org/package=tidytuesdayR) +[![Downloads from the RStudio CRAN +mirror](http://cranlogs.r-pkg.org/badges/tidytuesdayR)](https://cran.r-project.org/package=tidytuesdayR) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![R-CMD-check](https://github.com/dslc-io/tidytuesdayR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dslc-io/tidytuesdayR/actions/workflows/R-CMD-check.yaml) -{tidytuesdayR} has the main goal to make it easy to participate in the -weekly [\#TidyTuesday](https://github.com/rfordatascience/tidytuesday) -project. Currently this is done by assisting with the import of data -posted on the [R4DataScience](https://github.com/rfordatascience) Tidy -Tuesday repository. +tidytuesdayR makes it easy to participate in the weekly +[\#TidyTuesday](https://tidytues.day/) project by providing functions to +quickly import data posted to the [Tidy Tuesday +repository](https://github.com/rfordatascience/tidytuesday). ## Installation -This package is available on CRAN via: +This package is (usually) available on CRAN via: ``` r install.packages("tidytuesdayR") ``` -To get the latest in-development features, install the development version from GitHub: +To get the latest in-development features, install the development +version from GitHub: ``` r #install.packages("pak") @@ -38,9 +45,9 @@ There are currently two methods to access the data from the respository. ### Load the Data! -The simplest way is to use the ‘tt\_load()’ function. This -function has accepts two types of inputs to determine which data to -grab. It can be a date as a string in the YYYY-MM-DD format like below. +The simplest way is to use the `tt_load()` function. This function has +accepts two types of inputs to determine which data to grab. It can be a +date as a string in the YYYY-MM-DD format like below. ``` r library(tidytuesdayR) @@ -63,34 +70,34 @@ tt_data$agencies tt_data[["agencies"]] ``` -To view the readme, either print the `tt_data` object or use the `readme()` -function. When you print the `tt_data` object, you also get the available -datasets names printed in the console. +To view the readme, either print the `tt_data` object or use the +`readme()` function. When you print the `tt_data` object, you also get +the available datasets names printed in the console. ``` r readme(tt_data) print(tt_data) ``` -``` -## Available Datasets: -## agencies -## launches -## -``` + ## Available Datasets: + ## agencies + ## launches + ## ### TidyTemplate -As part of the goal of making participating in #TidyTuesday easier, {tidytuesdayR} now also provides a template! -To use it, just use the `use_tidytemplate()` function! +As part of the goal of making participating in \#TidyTuesday easier, +{tidytuesdayR} now also provides a template! To use it, just use the +`use_tidytemplate()` function! -By default, the template will assume to be using the most recent TidyTuesday. -However, you can pass a date object or character string in YYYY-MM-DD format -defining a different date you want to use. If you don't recall the exact date, -no worries, you can use the `tt_available()` function to figure out which date -and get the date to use! +By default, the template will assume to be using the most recent +TidyTuesday. However, you can pass a date object or character string in +YYYY-MM-DD format defining a different date you want to use. If you +don’t recall the exact date, no worries, you can use the +`tt_available()` function to figure out which date and get the date to +use! -```r +``` r ## this weeks TidyTuesday! tidytuesdayR::use_tidytemplate() @@ -98,16 +105,14 @@ tidytuesdayR::use_tidytemplate() tidytuesdayR::use_tidytemplate(refdate = "2019-10-15") ``` -Additionally, by default the template will create the new file in your working -directory, using the "YYYY_MM_DD" format per good practices. +Additionally, by default the template will create the new file in your +working directory, using the “YYYY_MM_DD” format per good practices. However, if you are so inclined, you can rename it to whatever you wish. -```r +``` r tidytuesdayR::use_tidytemplate(name = "My Super Great TidyTuesday.Rmd") ``` - - ## Contributing Please note that the ‘tidytuesdayR’ project is released with a