# Attach packages

library(tidyverse)
## ── Attaching packages ──────────────────────────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 3.2.1     ✔ purrr   0.3.3
## ✔ tibble  2.1.3     ✔ dplyr   0.8.3
## ✔ tidyr   1.0.0     ✔ stringr 1.4.0
## ✔ readr   1.3.1     ✔ forcats 0.4.0
## ── Conflicts ─────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(here)
## here() starts at /Users/allisonbailey/Desktop/Winter 2020 Courses/Adv Data/Homework 2/hawaii_bailey
library(janitor)
## 
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
## 
##     chisq.test, fisher.test
library(raster)
## Loading required package: sp
## 
## Attaching package: 'raster'
## The following object is masked from 'package:janitor':
## 
##     crosstab
## The following object is masked from 'package:dplyr':
## 
##     select
## The following object is masked from 'package:tidyr':
## 
##     extract
library(sf)
## Linking to GEOS 3.7.2, GDAL 2.4.2, PROJ 5.2.0
library(tmap)
library(tmaptools)
library(gstat)
library(stringr)
library(knitr)
library(mapview)
library(viridis)
## Loading required package: viridisLite
library(hrbrthemes)
## NOTE: Either Arial Narrow or Roboto Condensed fonts are required to use these themes.
##       Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and
##       if Arial Narrow is not on your system, please see http://bit.ly/arialnarrow
library(RColorBrewer)
library(paletteer)
library(jpeg)

Hawaii Agricultural Land use and Watersheds

#Insert image with caption

include_graphics("ag.jpg")

Over the past 35 years, Hawaii has undergone major shifts in their agricultural land use. This shift was focused on moving away from plantation sugar and pineapple production and opening doors for a diversity in crops. Overall, crop land use has decreased from 830 acres to 151,830 acres. Active pasture use has also declined from 1.1 million acres to 760,000 acres. Pasture land use still acccounts for 83 percent of agricultural land use in the state, with 73% of that on the Hawaii Island[1].

The below static and interactive map will allow you to visualize and scale in on agricultural land use and supporting watersheds on the Hawaiian Islands. The data used for this analysis was pulled from Hawaii Statewide GIS Program[2].

# eco_clip <- st_intersection(land_trans, shape_land) %>%
 #  st_make_valid(poly)

land_clip_tmap <- tm_basemap("Esri.WorldImagery") +
  tm_shape(land_trans) +
  tm_fill("region", palette = c("red", "#A569BD","darkgoldenrod1", "aquamarine4"),
          alpha = 0.8,
          legend.show = TRUE) +
   tm_shape(ha_water) +
  tm_borders(col = "blue", alpha = 0.3)
  

tmap_mode("view")

land_clip_tmap
save_tmap(land_clip_tmap, file="hawaii_map_ag.html", selfcontained=TRUE)

References

[1] “Hawaii Agricultural Land Use | Hawaii Department of Agriculture.” [Online]. Available: https://hdoa.hawaii.gov/blog/main/nrsalus2015/

[2] “Hawaii Statewide GIS Program.” [Online]. Available: http://geoportal.hawaii.gov/datasets