Skip to content

Commit

Permalink
Merge pull request #49 from rudeboybert/v0.5.0-release
Browse files Browse the repository at this point in the history
v0.5.0 release
  • Loading branch information
rudeboybert committed Jul 31, 2019
2 parents 964f257 + dd94903 commit 436d697
Show file tree
Hide file tree
Showing 22 changed files with 139 additions and 1,766 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
^images_for_guide$
^doc$
^Meta$
^CRAN-RELEASE$
2 changes: 2 additions & 0 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This package was submitted to CRAN on 2019-07-30.
Once it is accepted, delete this file and tag the release (commit bb6db3fa30).
15 changes: 3 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: Datasets and code published by the data journalism website
'FiveThirtyEight' available at <https://github.com/fivethirtyeight/data>.
Note that while we received guidance from editors at 'FiveThirtyEight', this
package is not officially published by 'FiveThirtyEight'.
Version: 0.4.0.9000
Version: 0.5.0
Authors@R: c(
person("Albert Y.", "Kim", email = "albert.ys.kim@gmail.com", role = c("aut", "cre")),
person("Chester", "Ismay", email = "chester.ismay@gmail.com", role = "aut"),
Expand Down Expand Up @@ -33,6 +33,7 @@ Suggests:
ggplot2,
dplyr,
tidyr,
curl,
readr,
tibble,
lubridate,
Expand All @@ -44,15 +45,5 @@ Suggests:
scales,
broom,
magrittr,
rmarkdown,
slam (>= 0.1-42),
highcharter (>= 0.7),
tidytext,
textdata,
hunspell,
fmsb,
wordcloud,
corrplot,
ggraph,
igraph
rmarkdown
VignetteBuilder: knitr
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# fivethirtyeight 0.4.0.9000
# fivethirtyeight 0.5.0

* Added vignette corresponding to Technology Innovations in Statistics Education [paper](https://escholarship.org/uc/item/0rx1231m#main)
* Removed tidyverse from `DESCRIPTION` Depends, Imports, or Suggests fields
Expand Down
26 changes: 12 additions & 14 deletions R/data_meredith.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,20 +284,18 @@
#' Data was collected on August 27, 2017 between 12:05 a.m. and 1:15 a.m. EDT
#' using the Twitter streaming API. \url{https://github.com/fivethirtyeight/data/tree/master/mayweather-mcgregor}
#' @examples
#' # To obtain the entire dataset, run the code inside the following if statement:
#' if(FALSE){
#' library(dplyr)
#' library(tidyr)
#' library(readr)
#' url <-
#' "https://raw.githubusercontent.com/fivethirtyeight/data/master/mayweather-mcgregor/tweets.csv"
#' mayweather_mcgregor_tweets <- read_csv(url) %>%
#' mutate(
#' emojis = as.logical(emojis),
#' retweeted = as.logical(retweeted),
#' id = as.character(id)
#' )
#' }
#' # To obtain the entire dataset, run the following code:
#' library(dplyr)
#' library(readr)
#'
#' mayweather_mcgregor_tweets <-
#' "https://raw.githubusercontent.com/fivethirtyeight/data/master/mayweather-mcgregor/tweets.csv" %>%
#' read_csv() %>%
#' mutate(
#' emojis = as.logical(emojis),
#' retweeted = as.logical(retweeted),
#' id = as.character(id)
#' )
"mayweather_mcgregor_tweets"


Expand Down
20 changes: 12 additions & 8 deletions R/data_starry.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@
#' \url{https://projects.fivethirtyeight.com/2018-midterm-election-forecast/house/}
#'
#' @format Because of R package size restrictions, only a preview of the
#' first 10 rows of this dataset is included; to obtain the entire dataset
#' see Examples below. The preview is a data frame with 10 rows representing
#' district-level results of the classic, lite, and deluxe house forecasts
#' first 10 rows of this dataset is included; to obtain the entire dataset
#' see Examples below. The preview is a data frame with 10 rows representing
#' district-level results of the classic, lite, and deluxe house forecasts
#' since 2018/08/01 and 11 variables.
#' \describe{
#' \item{forecastdate}{date of the forecast}
Expand All @@ -172,14 +172,16 @@
#' Methodology:
#' \url{https://fivethirtyeight.com/methodology/how-fivethirtyeights-house-and-senate-models-work/}
#' @seealso \code{\link{house_national_forecast}}
#' @examples
#' @examples
#' if(FALSE){
#'
#' # To obtain the entire dataset, run the following code:
#' library(readr)
#' library(dplyr)
#' library(janitor)
#'
#' house_district_forecast <-
#' "https://projects.fivethirtyeight.com/congress-model-2018/house_district_forecast.csv" %>%
#'
#' house_district_forecast <-
#' "https://projects.fivethirtyeight.com/congress-model-2018/house_district_forecast.csv" %>%
#' read_csv() %>%
#' clean_names() %>%
#' mutate(
Expand All @@ -189,6 +191,8 @@
#' model = as.factor(model)
#' ) %>%
#' select(-special)
#'
#' }
"house_district_forecast"

#' 2018 House Forecast
Expand All @@ -197,7 +201,7 @@
#' 'Forecasting the race for the House'
#' \url{https://projects.fivethirtyeight.com/2018-midterm-election-forecast/house/}
#'
#' @format A dataframe with 588 rows representing district-level results of the
#' @format A dataframe with 588 rows representing district-level results of the
#' classic, lite, and deluxe house forecasts since 2018/08/01 and 11 variables.
#' \describe{
#' \item{forecastdate}{date of the forecast}
Expand Down
9 changes: 4 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ knitr::opts_chunk$set(
comment = "#>",
fig.path = "README-"
)
library(fivethirtyeight)
```


Expand Down Expand Up @@ -53,15 +54,13 @@ library(fivethirtyeight)
data(bechdel)
head(bechdel)
?bechdel
# If using RStudio:
View(bechdel)
```

# To see a list of all data sets:
data(package = "fivethirtyeight")
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).

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


## Article in "Technology Innovations in Statistics Education"
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ library(fivethirtyeight)
data(bechdel)
head(bechdel)
?bechdel

# If using RStudio:
View(bechdel)

# To see a list of all data sets:
data(package = "fivethirtyeight")

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

To see a detailed list of all 127 datasets, including information on the
corresponding articles published on FiveThirtyEight.com, click
[here](https://fivethirtyeight-r.netlify.com/articles/fivethirtyeight.html).

## Article in “Technology Innovations in Statistics Education”

The `fivethirtyeight` package was featured in [The fivethirtyeight R
Expand Down
22 changes: 16 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@

This is a resubmission. In this version I have:

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


## Test environments

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


## R CMD check results

There were no ERRORs, only two NOTES on package size.
There were originally no ERRORs or WARNINGs. There were 3 NOTEs:

* 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.
* From Rhub (R-release): one example had CPU or elapsed time > 5s (`ratings`), but this NOTE did not occur in any other test environment.
* From win-builder (both devel and release), it said that 4 URLs were possibly invalid, however upon testing them individually, they all worked fine.
3 changes: 2 additions & 1 deletion data-raw/process_data_sets_meredith.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ mayweather_mcgregor_tweets <- read_csv("data-raw/mayweather-mcgregor/tweets.csv"
emojis = as.logical(emojis),
retweeted = as.logical(retweeted),
id = as.character(id)
)
) %>%
slice(1:10)
usethis::use_data(mayweather_mcgregor_tweets, overwrite = TRUE)


Expand Down
14 changes: 9 additions & 5 deletions man/house_district_forecast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/house_national_forecast.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 12 additions & 14 deletions man/mayweather_mcgregor_tweets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 0 additions & 72 deletions vignettes/NBA.Rmd

This file was deleted.

0 comments on commit 436d697

Please sign in to comment.