-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
60 lines (44 loc) · 1.7 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# bivariatechoropleths
<!-- badges: start -->
<!-- badges: end -->
The goal of **bivariatechoropleths** is to give easy and "tidy" tools for bivariate mapping, including static images for publication, dynamic maps for interactive documents, and a range of tools for creating and exploring bivariate colour palettes.
**Please note** this is in development. Any bug reports or suggestions are welcome.
## Installation
You can install the developer version of **bivariatechoropleths** with the following command:
```{r, eval=FALSE}
devtools::install_github("chris31415926535/bivariatechoropleths")
```
## Example
Here's an example using a built-in dataset about Renfrew County, Ontario. It won't render here, but if you run it locally it will give you an interactive Leaflet map.
```{r example, eval = FALSE}
library(bivariatechoropleths)
library(leaflet)
leaflet::leaflet() %>%
leaflet::addTiles() %>%
bivariatechoropleths::addBivariateChoropleth(
map_data = bivariatechoropleths::renfrew_county,
var1_name = pop_2016,
var2_name = median_household_income_2015,
ntiles= 3,
var1_label = "Population, 2016",
var2_label = "Median Household\nIncome, 2015",
region_name = "CSDNAME",
weight = 1,
fillOpacity = 0.7,
color = "grey",
highlightOptions = leaflet::highlightOptions(color = "orange",
weight = 2,
opacity = 1))
```