---
output:
html_document:
code_folding: hide
---
```{r, results='asis'}
library(robservable)
load(url("https://raw.githubusercontent.com/Deleetdk/USA.county.data/master/data/USA_county_data.RData"))
d <- USA_county_data
d$fips = stringr::str_pad(d$fips, 5, side="left", pad = "0")
d <- d[, c("fips", "name_16", "Graduate.Degree", "Less.Than.High.School")]
names(d) <- c("fips", "name_16", "Graduate", "<High.School")
robservable(
"@juba/reusable-bivariate-choropleth",
include = c("chart", "draw"),
hide = "draw",
input = list(
data = d,
data_id = "fips",
data_name = "name_16",
data_var1 = "Graduate",
data_var2 = "<High.School",
map = "https://raw.githubusercontent.com/jgoodall/us-maps/master/topojson/county.topo.json",
map_object = "county",
map_id_property = NULL,
contour = "https://raw.githubusercontent.com/jgoodall/us-maps/master/topojson/state.topo.json",
contour_object = "state",
contour_width = 2,
projection = "geoAlbersUsa",
legend_position = "bottomleft"
),
width = 700,
height = 700
)