-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hi Kyle, I am really enjoying your 3 part workshop on mapgl! I am trying to utilize the package for Machine Learning predicted points of marine plastic off of windward Oahu. There is 171,000 points of predicted plastic in the bounding box. Is there something within the arguments of add_heatmap_layer() that can fix this?
My code:
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(here)
library(mapgl)
library(sf)
library(tidycensus)
Read in Data
plastics <- read_csv(here("Plastic.csv"))
Turn Lat & Longs to point geometries
plastics_sf <- plastics %<>%
st_as_sf(coords = c("longitude", "latitude")) %>%
st_sf(crs = 4326)
Pull in Hawaii Data
hawaii <- get_acs(
state = "HI",
county = "Honolulu",
geography = "tract",
variables = "B19013_001",
geometry = TRUE,
year = 2020
)
Base map
hi_map <- mapboxgl(
style = mapbox_style("light"),
bounds = hawaii
)
output:
Screen.Recording.2024-08-07.at.12.42.32.PM.mp4
Here is an output I got with hex bins using tmap
Thanks!
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested