# NOT RUN {
library(choroplethrAdmin1)
data(df_japan_census)
head(df_japan_census)
# set the value we want to map to be the 2010 population estimates
df_japan_census$value=df_japan_census$pop_2010
# default map of all of japan
admin1_choropleth("japan",
df_japan_census,
"2010 Japan Population Estimates",
"Population")
# zoom in on the Kansai region and use a continuous scale
kansai = c("mie", "nara", "wakayama", "kyoto", "osaka", "hyogo", "shiga")
admin1_choropleth("japan",
df_japan_census,
"2010 Japan Population Estimates",
"Population",
1,
kansai)
admin1_choropleth("japan",
df_japan_census,
"2010 Japan Population Estimates",
"Population",
1,
kansai,
reference_map = TRUE)
# }
Run the code above in your browser using DataLab