diff --git a/.Rbuildignore b/.Rbuildignore index 4e689b2..32e0bda 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,6 +4,6 @@ ^README-.*\.png$ ^\.travis\.yml$ ^CONDUCT\.md$ -^README\.md$ +^README\.Rmd$ ^README_figs ^README\.html$ diff --git a/NEWS b/NEWS index 550cae0..ffcb230 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +0.2.0 +===================== +* Incorporated ProPublica StateFace font + 0.1.5 ===================== * Pokemon discrete color scales! diff --git a/R/ggalt-package.r b/R/ggalt-package.r index f805767..bb4f30a 100644 --- a/R/ggalt-package.r +++ b/R/ggalt-package.r @@ -1,4 +1,4 @@ -#' Extra Geoms, Stats and Coords for 'ggplot2' +#' Extra Geoms, Stats, Coords, Scales & Fonts for 'ggplot2' #' #' A package containing additional geoms, coords, stats, scales & fonts #' for ggplot2 2.0+ diff --git a/README.Rmd b/README.Rmd index 9665d10..b2dd321 100644 --- a/README.Rmd +++ b/README.Rmd @@ -190,7 +190,7 @@ m + stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon") ``` -### `coord_proj` LIVES! (still needs work) +### `coord_proj` LIVES! (still needs a teensy bit of work) ```{r coord_proj} world <- map_data("world") @@ -203,6 +203,26 @@ gg <- gg + coord_proj("+proj=wintri") gg ``` +### ProPublica StateFace + +```{r stateface} +# Run show_stateface() to see the location of the TTF StateFace font +# You need to install it for it to work + +set.seed(1492) +dat <- data.frame(state=state.abb, + x=sample(100, 50), + y=sample(100, 50), + col=sample(c("#b2182b", "#2166ac"), 50, replace=TRUE), + sz=sample(6:15, 50, replace=TRUE), + stringsAsFactors=FALSE) +gg <- ggplot(dat, aes(x=x, y=y)) +gg <- gg + geom_stateface(aes(label=state, color=col, size=sz)) +gg <- gg + scale_color_identity() +gg <- gg + scale_size_identity() +gg +``` + ### Code of Conduct Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). diff --git a/README.html b/README.html index 3bdf280..2bee75f 100644 --- a/README.html +++ b/README.html @@ -15,7 +15,7 @@ - + @@ -38,6 +38,7 @@ if (window.hljs && document.readyState && document.readyState === "complete") { + @@ -84,6 +85,8 @@ button.code-folding-btn:focus { outline: none; } + +
@@ -109,7 +112,7 @@ $(document).ready(function () { -

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status CRAN_Status_Badge downloads

+

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status CRAN_Status_Badge downloads

ggalt : Extra Coordinate Systems, Geoms and Statistical Transformations for ‘ggplot2’

A compendium of ‘geoms’, ‘coords’ and ‘stats’ for ‘ggplot2’, including splines, 1d and 2d densities, univariate average shifted histograms and a new map coordinate system based on the ‘PROJ.4’-library.

The first three forays into this brave, new ggplot2 world are splines! and being able to use the (much better) KernSmooth::bkde and KernSmooth::bkde2D for density plots and an initial port of the (still needing work) coord_proj.

@@ -125,12 +128,13 @@ $(document).ready(function () {
  • stat_ash : Compute and display a univariate averaged shifted histogram (polynomial kernel) (uses ash::ash1/ash::bin1)
  • scale_color_pokemon :
  • scale_fill_pokemon : discrete pokemon scales (data taken from the hard work by the http://www.pokegraphs.com/)
  • +
  • byte_format: + helpers. e.g. turn 10000 into 10 Kb
  • News

    -
    -

    coord_proj LIVES! (still needs work)

    +
    +

    coord_proj LIVES! (still needs a teensy bit of work)

    world <- map_data("world")
     #> 
     #>  # ATTENTION: maps v3.0 has an updated 'world' map.        #
    @@ -306,6 +310,25 @@ gg <- gg + coord_proj("+proj=wintri")
     gg

    +
    +

    ProPublica StateFace

    +
    # Run show_stateface() to see the location of the TTF StateFace font
    +# You need to install it for it to work
    +
    +set.seed(1492)
    +dat <- data.frame(state=state.abb,
    +                  x=sample(100, 50),
    +                  y=sample(100, 50),
    +                  col=sample(c("#b2182b", "#2166ac"), 50, replace=TRUE),
    +                  sz=sample(6:15, 50, replace=TRUE),
    +                  stringsAsFactors=FALSE)
    +gg <- ggplot(dat, aes(x=x, y=y))
    +gg <- gg + geom_stateface(aes(label=state, color=col, size=sz))
    +gg <- gg + scale_color_identity()
    +gg <- gg + scale_size_identity()
    +gg
    +

    +

    Code of Conduct

    Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

    diff --git a/README.md b/README.md index 1070544..da09da3 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,13 @@ The following functions are implemented: - `stat_ash` : Compute and display a univariate averaged shifted histogram (polynomial kernel) (uses `ash::ash1`/`ash::bin1`) - `scale_color_pokemon` : - `scale_fill_pokemon` : discrete pokemon scales (data taken from the hard work by the ) +- `byte_format`: + helpers. e.g. turn `10000` into `10 Kb` ### News - Version 0.1.5.9000 - Pokemon discrete color scales! -- Version 0.1.2.9000 - Fixed bug with limits not working thx to @mstrimas +- Version 0.1.2.9000 - Fixed bug with limits not working in coord_proj thx to @mstrimas - Version 0.1.1 - CRAN! - Version 0.1.0.9000 - Tweaks for ggplot2 2.0 release - Version 0.0.4.9000 - `stat_ash` @@ -61,7 +62,7 @@ library(ggalt) # current verison packageVersion("ggalt") -#> [1] '0.1.5.9000' +#> [1] '0.2.0.9000' set.seed(1492) dat <- data.frame(x=c(1:10, 1:10, 1:10), @@ -269,7 +270,7 @@ m + stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon") -### `coord_proj` LIVES! (still needs work) +### `coord_proj` LIVES! (still needs a teensy bit of work) ```r @@ -289,6 +290,29 @@ gg +### ProPublica StateFace + + +```r +# Run show_stateface() to see the location of the TTF StateFace font +# You need to install it for it to work + +set.seed(1492) +dat <- data.frame(state=state.abb, + x=sample(100, 50), + y=sample(100, 50), + col=sample(c("#b2182b", "#2166ac"), 50, replace=TRUE), + sz=sample(6:15, 50, replace=TRUE), + stringsAsFactors=FALSE) +gg <- ggplot(dat, aes(x=x, y=y)) +gg <- gg + geom_stateface(aes(label=state, color=col, size=sz)) +gg <- gg + scale_color_identity() +gg <- gg + scale_size_identity() +gg +``` + + + ### Code of Conduct Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). diff --git a/README_figs/README-stateface-1.png b/README_figs/README-stateface-1.png new file mode 100644 index 0000000..7ff35ff Binary files /dev/null and b/README_figs/README-stateface-1.png differ diff --git a/man/ggalt.Rd b/man/ggalt.Rd index bc6c17d..c0505e7 100644 --- a/man/ggalt.Rd +++ b/man/ggalt.Rd @@ -4,7 +4,7 @@ \name{ggalt} \alias{ggalt} \alias{ggalt-package} -\title{Extra Geoms, Stats and Coords for 'ggplot2'} +\title{Extra Geoms, Stats, Coords, Scales & Fonts for 'ggplot2'} \description{ A package containing additional geoms, coords, stats, scales & fonts for ggplot2 2.0+