diff --git a/README.Rmd b/README.Rmd index b4bff5c..ad32334 100644 --- a/README.Rmd +++ b/README.Rmd @@ -9,7 +9,7 @@ knitr::opts_chunk$set( collapse = TRUE, dpi = 300, comment = "#>", - fig.align = 'center', + fig.align = "center", fig.path = "man/figures/README-", fig.width = 15 ) @@ -30,9 +30,7 @@ library(ggplot2) # City population county map (West Region) #### citypop_t <- usmap_transform(citypop) -citypop_t_west <- citypop_t[ - (citypop_t$abbr %in% .west_region) & (citypop_t$abbr != "AK") & (citypop_t$abbr != "HI"), - ] +citypop_t_west <- citypop_t[(citypop_t$abbr %in% .west_region) & (citypop_t$abbr != "AK") & (citypop_t$abbr != "HI"), ] west_county_citypop_map <- plot_usmap("counties", include = .west_region, exclude = c("AK", "HI"), color = "blue", fill = "lightblue") + @@ -119,7 +117,7 @@ install.packages("usmap") To install the package from this repository, run the following code in an R console: ```{r install_dev, eval=FALSE} -# install.package("devtools") +install.package("devtools") devtools::install_github("pdil/usmap") ``` @@ -166,10 +164,10 @@ library(ggplot2) mt <- plot_usmap("states", include = .mountain, labels = TRUE) fl <- plot_usmap("counties", data = countypov, values = "pct_pov_2014", include = "FL") + - scale_fill_continuous(low = "green", high = "red", guide = "none") + scale_fill_continuous(low = "green", high = "red", guide = "none") ne <- plot_usmap("counties", data = countypop, values = "pop_2015", include = .new_england) + - scale_fill_continuous(low = "blue", high = "yellow", guide = "none") + scale_fill_continuous(low = "blue", high = "yellow", guide = "none") cowplot::plot_grid(mt, fl, ne, nrow = 1) ``` diff --git a/README.md b/README.md index dcad0d7..39b9285 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ To install the package from this repository, run the following code in an R console: ``` r -# install.package("devtools") +install.package("devtools") devtools::install_github("pdil/usmap") ``` @@ -111,10 +111,10 @@ library(ggplot2) mt <- plot_usmap("states", include = .mountain, labels = TRUE) fl <- plot_usmap("counties", data = countypov, values = "pct_pov_2014", include = "FL") + - scale_fill_continuous(low = "green", high = "red", guide = "none") + scale_fill_continuous(low = "green", high = "red", guide = "none") ne <- plot_usmap("counties", data = countypop, values = "pop_2015", include = .new_england) + - scale_fill_continuous(low = "blue", high = "yellow", guide = "none") + scale_fill_continuous(low = "blue", high = "yellow", guide = "none") cowplot::plot_grid(mt, fl, ne, nrow = 1) ```