Browse Source

travis

pull/11/head
boB Rudis 6 years ago
parent
commit
43c4d1f197
No known key found for this signature in database GPG Key ID: 2A514A4997464560
  1. 2
      .Rbuildignore
  2. 26
      .travis.yml
  3. 3
      DESCRIPTION
  4. 2
      README.Rmd
  5. 1
      README.md
  6. 2
      tests/test-all.R
  7. 22
      tests/testthat/test-statebins.R

2
.Rbuildignore

@ -12,4 +12,4 @@
^cran-comments\.md$
^README.gfm-ascii_identifiers_files$
^README.gfm-ascii_identifiers_files/$
^README.gfm-ascii_identifiers_files/.*$
^README.gfm-ascii_identifiers_files/.*$

26
.travis.yml

@ -1,23 +1,5 @@
language: c
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
before_install:
- curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
- chmod 755 ./travis-tool.sh
- ./travis-tool.sh bootstrap
install:
- ./travis-tool.sh install_github plyr
- ./travis-tool.sh install_deps
script: ./travis-tool.sh run_tests
on_failure:
- ./travis-tool.sh dump_logs
branches:
except:
- /-expt$/
notifications:
email:
on_success: change
on_failure: change
language: R
sudo: false
cache: packages

3
DESCRIPTION

@ -28,7 +28,8 @@ License: MIT + file LICENSE
Suggests:
testthat,
viridis,
RColorBrewer
RColorBrewer,
cdcfluview
Depends:
R (>= 3.2.0),
Imports:

2
README.Rmd

@ -8,6 +8,8 @@ knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.retina=2)
options(width=120)
```
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/statebins.svg?branch=master)](https://travis-ci.org/hrbrmstr/statebins)
# statebins
Create 'U.S.' Uniform Square State Cartogram Heatmaps

1
README.md

@ -1,3 +1,4 @@
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/statebins.svg?branch=master)](https://travis-ci.org/hrbrmstr/statebins)
# statebins

2
tests/test-all.R

@ -1,2 +1,4 @@
library(testthat)
library(ggplot2)
test_check("statebins")

22
tests/testthat/test-statebins.R

@ -1,6 +1,26 @@
context("basic functionality")
test_that("we can do something", {
#expect_that(some_function(), is_a("data.frame"))
require(ggplot2)
flu <- cdcfluview::ili_weekly_activity_indicators(2017)
ggplot(flu, aes(state=statename, fill=activity_level)) +
geom_statebins() +
coord_equal() +
ggplot2::facet_wrap(~weekend) +
labs(title="2017-18 Flu Season ILI Activity Level") +
theme_statebins() -> gg
gb <- ggplot_build(gg)
data(USArrests)
USArrests$state <- rownames(USArrests)
statebins(USArrests, value_col="Assault", name = "Assault") +
theme_statebins(legend_position="right") -> gg
gb <- ggplot_build(gg)
})

Loading…
Cancel
Save