Skip to content

Commit 436d697

Browse files
authored
Merge pull request #49 from rudeboybert/v0.5.0-release
v0.5.0 release
2 parents 964f257 + dd94903 commit 436d697

22 files changed

+139
-1766
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
^images_for_guide$
1212
^doc$
1313
^Meta$
14+
^CRAN-RELEASE$

CRAN-RELEASE

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This package was submitted to CRAN on 2019-07-30.
2+
Once it is accepted, delete this file and tag the release (commit bb6db3fa30).

DESCRIPTION

+3-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description: Datasets and code published by the data journalism website
44
'FiveThirtyEight' available at <https://github.com/fivethirtyeight/data>.
55
Note that while we received guidance from editors at 'FiveThirtyEight', this
66
package is not officially published by 'FiveThirtyEight'.
7-
Version: 0.4.0.9000
7+
Version: 0.5.0
88
Authors@R: c(
99
person("Albert Y.", "Kim", email = "[email protected]", role = c("aut", "cre")),
1010
person("Chester", "Ismay", email = "[email protected]", role = "aut"),
@@ -33,6 +33,7 @@ Suggests:
3333
ggplot2,
3434
dplyr,
3535
tidyr,
36+
curl,
3637
readr,
3738
tibble,
3839
lubridate,
@@ -44,15 +45,5 @@ Suggests:
4445
scales,
4546
broom,
4647
magrittr,
47-
rmarkdown,
48-
slam (>= 0.1-42),
49-
highcharter (>= 0.7),
50-
tidytext,
51-
textdata,
52-
hunspell,
53-
fmsb,
54-
wordcloud,
55-
corrplot,
56-
ggraph,
57-
igraph
48+
rmarkdown
5849
VignetteBuilder: knitr

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# fivethirtyeight 0.4.0.9000
1+
# fivethirtyeight 0.5.0
22

33
* Added vignette corresponding to Technology Innovations in Statistics Education [paper](https://escholarship.org/uc/item/0rx1231m#main)
44
* Removed tidyverse from `DESCRIPTION` Depends, Imports, or Suggests fields

R/data_meredith.R

+12-14
Original file line numberDiff line numberDiff line change
@@ -284,20 +284,18 @@
284284
#' Data was collected on August 27, 2017 between 12:05 a.m. and 1:15 a.m. EDT
285285
#' using the Twitter streaming API. \url{https://github.com/fivethirtyeight/data/tree/master/mayweather-mcgregor}
286286
#' @examples
287-
#' # To obtain the entire dataset, run the code inside the following if statement:
288-
#' if(FALSE){
289-
#' library(dplyr)
290-
#' library(tidyr)
291-
#' library(readr)
292-
#' url <-
293-
#' "https://raw.githubusercontent.com/fivethirtyeight/data/master/mayweather-mcgregor/tweets.csv"
294-
#' mayweather_mcgregor_tweets <- read_csv(url) %>%
295-
#' mutate(
296-
#' emojis = as.logical(emojis),
297-
#' retweeted = as.logical(retweeted),
298-
#' id = as.character(id)
299-
#' )
300-
#' }
287+
#' # To obtain the entire dataset, run the following code:
288+
#' library(dplyr)
289+
#' library(readr)
290+
#'
291+
#' mayweather_mcgregor_tweets <-
292+
#' "https://raw.githubusercontent.com/fivethirtyeight/data/master/mayweather-mcgregor/tweets.csv" %>%
293+
#' read_csv() %>%
294+
#' mutate(
295+
#' emojis = as.logical(emojis),
296+
#' retweeted = as.logical(retweeted),
297+
#' id = as.character(id)
298+
#' )
301299
"mayweather_mcgregor_tweets"
302300

303301

R/data_starry.R

+12-8
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@
150150
#' \url{https://projects.fivethirtyeight.com/2018-midterm-election-forecast/house/}
151151
#'
152152
#' @format Because of R package size restrictions, only a preview of the
153-
#' first 10 rows of this dataset is included; to obtain the entire dataset
154-
#' see Examples below. The preview is a data frame with 10 rows representing
155-
#' district-level results of the classic, lite, and deluxe house forecasts
153+
#' first 10 rows of this dataset is included; to obtain the entire dataset
154+
#' see Examples below. The preview is a data frame with 10 rows representing
155+
#' district-level results of the classic, lite, and deluxe house forecasts
156156
#' since 2018/08/01 and 11 variables.
157157
#' \describe{
158158
#' \item{forecastdate}{date of the forecast}
@@ -172,14 +172,16 @@
172172
#' Methodology:
173173
#' \url{https://fivethirtyeight.com/methodology/how-fivethirtyeights-house-and-senate-models-work/}
174174
#' @seealso \code{\link{house_national_forecast}}
175-
#' @examples
175+
#' @examples
176+
#' if(FALSE){
177+
#'
176178
#' # To obtain the entire dataset, run the following code:
177179
#' library(readr)
178180
#' library(dplyr)
179181
#' library(janitor)
180-
#'
181-
#' house_district_forecast <-
182-
#' "https://projects.fivethirtyeight.com/congress-model-2018/house_district_forecast.csv" %>%
182+
#'
183+
#' house_district_forecast <-
184+
#' "https://projects.fivethirtyeight.com/congress-model-2018/house_district_forecast.csv" %>%
183185
#' read_csv() %>%
184186
#' clean_names() %>%
185187
#' mutate(
@@ -189,6 +191,8 @@
189191
#' model = as.factor(model)
190192
#' ) %>%
191193
#' select(-special)
194+
#'
195+
#' }
192196
"house_district_forecast"
193197

194198
#' 2018 House Forecast
@@ -197,7 +201,7 @@
197201
#' 'Forecasting the race for the House'
198202
#' \url{https://projects.fivethirtyeight.com/2018-midterm-election-forecast/house/}
199203
#'
200-
#' @format A dataframe with 588 rows representing district-level results of the
204+
#' @format A dataframe with 588 rows representing district-level results of the
201205
#' classic, lite, and deluxe house forecasts since 2018/08/01 and 11 variables.
202206
#' \describe{
203207
#' \item{forecastdate}{date of the forecast}

README.Rmd

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ knitr::opts_chunk$set(
1010
comment = "#>",
1111
fig.path = "README-"
1212
)
13+
library(fivethirtyeight)
1314
```
1415

1516

@@ -53,15 +54,13 @@ library(fivethirtyeight)
5354
data(bechdel)
5455
head(bechdel)
5556
?bechdel
57+
5658
# If using RStudio:
5759
View(bechdel)
60+
```
5861

59-
# To see a list of all data sets:
60-
data(package = "fivethirtyeight")
62+
To see a detailed list of all `r nrow(data(package = "fivethirtyeight")[[3]])` datasets, including information on the corresponding articles published on FiveThirtyEight.com, click [here](https://fivethirtyeight-r.netlify.com/articles/fivethirtyeight.html).
6163

62-
# To see a more detailed list of all data sets, see the package vignette:
63-
vignette("fivethirtyeight", package = "fivethirtyeight")
64-
```
6564

6665

6766
## Article in "Technology Innovations in Statistics Education"

README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,15 @@ library(fivethirtyeight)
4242
data(bechdel)
4343
head(bechdel)
4444
?bechdel
45+
4546
# If using RStudio:
4647
View(bechdel)
47-
48-
# To see a list of all data sets:
49-
data(package = "fivethirtyeight")
50-
51-
# To see a more detailed list of all data sets, see the package vignette:
52-
vignette("fivethirtyeight", package = "fivethirtyeight")
5348
```
5449

50+
To see a detailed list of all 127 datasets, including information on the
51+
corresponding articles published on FiveThirtyEight.com, click
52+
[here](https://fivethirtyeight-r.netlify.com/articles/fivethirtyeight.html).
53+
5554
## Article in “Technology Innovations in Statistics Education”
5655

5756
The `fivethirtyeight` package was featured in [The fivethirtyeight R

cran-comments.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@
22

33
This is a resubmission. In this version I have:
44

5-
* Fixed the DESCRIPTION file:
6-
* Lowered the size of the package tarball
7-
* Replaced all instances of FiveThirtyEight and 538 with `FiveThirtyEight`
5+
* Fixed the NOTEs involving URLs with spaces
6+
* Fixed the ERROR involving reading a CSV file off the web
7+
88

99
## Test environments
1010

11-
* local OS X install, R 3.4.1
12-
* win-builder (release)
11+
* local OS X install, R 3.6.1.
12+
* ubuntu 14.04 (on travis-ci), R 3.6.1.
13+
* Rhub
14+
+ Windows Server 2008 R2 SP1, R-devel, 32/64 bit
15+
+ Ubuntu Linux 16.04 LTS, R-release, GCC
16+
+ Fedora Linux, R-devel, clang, gfortran
17+
* win-builder (devel and release)
18+
1319

1420
## R CMD check results
1521

16-
There were no ERRORs, only two NOTES on package size.
22+
There were originally no ERRORs or WARNINGs. There were 3 NOTEs:
23+
24+
* From Rhub (R-devel): one example had CPU or elapsed time > 5s (`comic_characters`), but this NOTE did not occur in any other test environment.
25+
* From Rhub (R-release): one example had CPU or elapsed time > 5s (`ratings`), but this NOTE did not occur in any other test environment.
26+
* From win-builder (both devel and release), it said that 4 URLs were possibly invalid, however upon testing them individually, they all worked fine.

data-raw/process_data_sets_meredith.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ mayweather_mcgregor_tweets <- read_csv("data-raw/mayweather-mcgregor/tweets.csv"
120120
emojis = as.logical(emojis),
121121
retweeted = as.logical(retweeted),
122122
id = as.character(id)
123-
)
123+
) %>%
124+
slice(1:10)
124125
usethis::use_data(mayweather_mcgregor_tweets, overwrite = TRUE)
125126

126127

man/house_district_forecast.Rd

+9-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/house_national_forecast.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mayweather_mcgregor_tweets.Rd

+12-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/NBA.Rmd

-72
This file was deleted.

0 commit comments

Comments
 (0)