library(leaflet)
testdat <- readr::read_csv("C:/Users/morrism/Dropbox/FatalForce/GISFiles/fewa10yrbyCitylatlong.csv")
## Parsed with column specification:
## cols(
##   lat = col_double(),
##   long = col_double(),
##   city = col_character(),
##   county = col_character(),
##   CalphID = col_integer(),
##   Number = col_integer()
## )
testmap1 <- leaflet(data = testdat, width = "100%") %>% addTiles() %>%
  addMarkers( ~ long,
              ~ lat,
              popup = ~ city,
              label = ~ as.character(Number))
testmap1
testmap2 <- leaflet(data = testdat, width = "100%") %>% addTiles() %>%
  addMarkers( ~ long,
              ~ lat,
              popup = ~ city,
              label = ~ as.character(Number),
              clusterOptions = markerClusterOptions())
testmap2
testmap3 <- leaflet(data = testdat, width = "100%") %>% addTiles() %>%
  addCircles(~long, ~lat, 
             weight = 1, radius = ~sqrt(Number) * 10000, 
             label = ~ as.character(Number),
             popup = ~city)

testmap3
# Create a continuous palette function
pal <- colorNumeric(
  palette = c("blue","red"),
  domain = testdat$Number)

testmap4 <- leaflet(data = testdat, width = "100%") %>% addTiles() %>%
  addCircles(~long, ~lat, 
             weight = 1, radius = ~sqrt(Number) * 10000,
             color = ~pal(Number),
             label = ~ as.character(Number),
             popup = ~city)

testmap4