The topic that I have chosen is the global shark attack data set. This is a dataset that gives all the details about every shark attack that happens. The dataset includes the date, the time, the name and age of the victim, the species, the year, where it happened, what the people were doing when it happened if the shark was provoked, and many other data variables. Age and date are examples of quantitative, and examples of categorical are Location and species. The variables I explored include the year, gender, location, if it was fatal, and amount of shark attacks. This dataset comes from Kaggle but is originally from the global shark attack file website. I cleaned up this data by removing NAs and renaming the column Fatal to make it easier to find and understand. The data I used could have been more organized and had a lot of mistakes, so I had to change all the errors. I chose this dataset because I love sharks and am super fascinated by the statistics. I’ve kept up with this dataset for years, and I was very excited to be able to use it.

First Upload the data and set working directory

setwd("~/Desktop/RWD")
shark_attacks <- read.csv("attacks 2.csv")

Load the packages we will need

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.1     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggmap)
## ℹ Google's Terms of Service: <https://mapsplatform.google.com>
## ℹ Please cite ggmap if you use it! Use `citation("ggmap")` for details.
library(dplyr)
library(plotly)
## 
## Attaching package: 'plotly'
## 
## The following object is masked from 'package:ggmap':
## 
##     wind
## 
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following object is masked from 'package:graphics':
## 
##     layout

First we need to clean up this data

# Rename the colums so that its easier to use
colnames(shark_attacks)[13] <- "Fatal"
# Change 0 to NA in year to make the data cleaner
shark_attacks$Year[shark_attacks$Year == 0] <- NA
shark_attacks$Fatal[shark_attacks$Fatal == ""] <- NA
shark_attacks$Fatal[shark_attacks$Fatal == "y"] <- "Y"
shark_attacks$Fatal[shark_attacks$Fatal == "N "] <- "N"
shark_attacks$Fatal[shark_attacks$Fatal == "2017"] <- NA
shark_attacks$Fatal[shark_attacks$Fatal == " N"] <- "N"
shark_attacks$Fatal[shark_attacks$Fatal == "M"] <- NA
shark_attacks$Fatal[shark_attacks$Fatal == "UNKNOWN"] <- NA
shark_attacks$Sex[shark_attacks$Sex == ""] <- NA
shark_attacks$Sex[shark_attacks$Sex == "."] <- NA
shark_attacks$Sex[shark_attacks$Sex == "lli"] <- NA
shark_attacks$Sex[shark_attacks$Sex == "N"] <- NA
shark_attacks$Sex[shark_attacks$Sex == "M "] <- NA

Lets Check out the Data Set

glimpse(shark_attacks)
## Rows: 25,723
## Columns: 24
## $ Case.Number            <chr> "2018.06.25", "2018.06.18", "2018.06.09", "2018…
## $ Date                   <chr> "25-Jun-2018", "18-Jun-2018", "09-Jun-2018", "0…
## $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
## $ Type                   <chr> "Boating", "Unprovoked", "Invalid", "Unprovoked…
## $ Country                <chr> "USA", "USA", "USA", "AUSTRALIA", "MEXICO", "AU…
## $ Area                   <chr> "California", "Georgia", "Hawaii", "New South W…
## $ Location               <chr> "Oceanside, San Diego County", "St. Simon Islan…
## $ Activity               <chr> "Paddling", "Standing", "Surfing", "Surfing", "…
## $ Name                   <chr> "Julie Wolfe", "Adyson\xa0McNeely ", "John Deng…
## $ Sex                    <chr> "F", "F", "M", "M", "M", "M", "M", "M", "M", "M…
## $ Age                    <chr> "57", "11", "48", "", "", "", "18", "52", "15",…
## $ Injury                 <chr> "No injury to occupant, outrigger canoe and pad…
## $ Fatal                  <chr> "N", "N", "N", "N", "N", "N", "Y", "N", "N", "N…
## $ Time                   <chr> "18h00", "14h00  -15h00", "07h45", "", "", "", …
## $ Species                <chr> "White shark", "", "", "2 m shark", "Tiger shar…
## $ Investigator.or.Source <chr> "R. Collier, GSAF", "K.McMurray, TrackingSharks…
## $ pdf                    <chr> "2018.06.25-Wolfe.pdf", "2018.06.18-McNeely.pdf…
## $ href.formula           <chr> "http://sharkattackfile.net/spreadsheets/pdf_di…
## $ href                   <chr> "http://sharkattackfile.net/spreadsheets/pdf_di…
## $ Case.Number.1          <chr> "2018.06.25", "2018.06.18", "2018.06.09", "2018…
## $ Case.Number.2          <chr> "2018.06.25", "2018.06.18", "2018.06.09", "2018…
## $ original.order         <int> 6303, 6302, 6301, 6300, 6299, 6298, 6297, 6296,…
## $ X                      <chr> "", "", "", "", "", "", "", "", "", "", "", "",…
## $ X.1                    <chr> "", "", "", "", "", "", "", "", "", "", "", "",…

First lets explore if theirs any diffrence between sex and fatality

shark_attacks_sex_fatal <- shark_attacks %>%
  group_by(Sex, Fatal) %>%
  summarize(count = n()) %>%
  ungroup()
## `summarise()` has grouped output by 'Sex'. You can override using the `.groups`
## argument.
# Create stacked bar plot of counts by sex and fatality
ggplot(shark_attacks_sex_fatal, aes(x = Fatal, y = count, fill = Sex)) +
  geom_bar(stat = "identity") +
  labs(x = "Fatal", y = "Count", fill = "Sex") +
  ggtitle("Number of Shark Attacks by Sex and Fatality")

Create our first plot on the amount of shark attacks in california

# Select the colums we are going to focus on
shark_attacks <- select(shark_attacks, Year, Type, Country, Area, Location, Activity, Fatal)

# Filter data for only California
shark_attacks_ca <- filter(shark_attacks, Country == "USA" & Area == "California")
# Group data by the year 
shark_attacks_ca_year <- group_by(shark_attacks_ca, Year) %>%
  select(Fatal)
## Adding missing grouping variables: `Year`
# Add up the number of attacks that happen each year
shark_attacks_ca_year_overall <- summarize(shark_attacks_ca_year, count = n())

# Create a plot that shows how many attacks happen a year
ggplot(shark_attacks_ca_year_overall, aes(x = Year, y = count)) +
  geom_bar(stat = "identity", fill = "pink") +
  labs(x = "Year", y = "Number of Shark Attacks", 
       title = "Shark Attacks in California by Year") +
  theme_minimal()
## Warning: Removed 1 rows containing missing values (`position_stack()`).

Create our second plot of just shark attacks that have happened in the 2000s in CA

# Filter for shark attacks in California in the 2000s
shark_attacks_ca_2000 <- filter(shark_attacks_ca, Year >= 2000 & Year <= 2023) 

# Group data by year
shark_attacks_ca_2000_year <- group_by(shark_attacks_ca_2000, Year) 

# Count number of attacks per year
shark_attacks_ca_2000_year_amount <- summarize(shark_attacks_ca_2000_year, count = n()) 

# Plot histogram with customized y-axis limits
ggplot(shark_attacks_ca_2000_year_amount, aes(x = Year, y = count)) +
  geom_bar(stat = "identity", fill = "purple") +
  labs(x = "Year", y = "Number of Shark Attacks", 
       title = "Shark Attacks in California (2000-2023)") +
  theme_minimal() 

Is their is a signifacant linear relationship?

# Make a Linear of regression model
model <- lm(count ~ Year, data = shark_attacks_ca_2000_year_amount)

# View the model
summary(model)
## 
## Call:
## lm(formula = count ~ Year, data = shark_attacks_ca_2000_year_amount)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.3316 -1.3447 -0.8018  1.3307  5.4632 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)  
## (Intercept) -526.2614   255.6785  -2.058   0.0552 .
## Year           0.2649     0.1273   2.082   0.0528 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.038 on 17 degrees of freedom
## Multiple R-squared:  0.2031, Adjusted R-squared:  0.1562 
## F-statistic: 4.333 on 1 and 17 DF,  p-value: 0.05281

Show relationships

ggplot(shark_attacks_ca_year_overall, aes(x = Year, y = count)) +
  geom_bar(stat = "identity", fill = "purple") +
  labs(x = "Year", y = "Number of Shark Attacks",
       title = "Shark Attacks in California (2000-2023)") +
  theme_minimal() +
  geom_smooth(method = "lm", se = FALSE, color = "pink") 
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing missing values (`position_stack()`).

Create a Interactive model using plotly

p1 <- ggplot(shark_attacks_ca_year_overall, aes(x = Year, y = count)) +
  geom_bar(stat = "identity", fill = "purple") +
  labs(x = "Year", y = "Number of Shark Attacks",
       title = "Shark Attacks in California (2000-2023)") +
  theme_minimal() +
  geom_smooth(method = "lm", se = FALSE, color = "pink") 
p1 <- ggplotly(p1)
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing missing values (`position_stack()`).
print(p1)

Next, We will focus on CA, due to its high number of attacks and find where each shark attack happened in california

register_google(key = "AIzaSyDSbhO5zB6PkzOIRWa2qeTMswWKxxhuG0Q")

# 
california_attacks <- shark_attacks %>%
  filter(Area == "California")

Geocode the infomation to find where each shark attack happened

cali_attacks <- geocode(california_attacks$Location, output = "latlon")
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Oceanside,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Drakes+Estero,+Point+Reyes,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Stillwater+Cove,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Between+Pescadero+Point+&+Bean+Hollow+Beach,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Stearns+Wharf,+Santa+Barbara&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Seal+Rock,+Goleta+Beach,+Santa+Barbara&key=xxx>
## Warning: "Seal Rock, Goleta..." not uniquely geocoded, using "seal rock, or
## 97376, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Cruz,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Sunset+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre,+San+Diego+County&key=xxx>
## Warning: "San Onofre, San D..." not uniquely geocoded, using "san onofre beach,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monterey+Bay&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bunkers,+Humboldt+Bay,+Eureka,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Refugio+State+Beach,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Surfside,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Capitola,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Palos+Verdes+peninsula,+Los+Angeles+County&key=xxx>
## Warning: "Off Palos Verdes ..." not uniquely geocoded, using "palos verdes peninsula,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Corona+Del+Mar,+Newport,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bolsa+Chica+State+Park,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Leffingwell+Landing,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Horseshoe+Rock,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Gaviota+State+Beach,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=El+Pescador+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Deer+Creek+Beach,+Ventura+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Morro+Strand+State+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Morro+Bay,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Barbara+County&key=xxx>
## Warning: "Santa Barbara County" not uniquely geocoded, using "santa barbara,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Cortes+Bank&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+San+Diego&key=xxx>
## Warning: "Off San Diego" not uniquely geocoded, using "san diego, ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monta%EF%BF%BDa+de+Oro+State+Park,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Franklin+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Leadbetter+Beach,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Barbara+County&key=xxx>
## Warning: "Santa Barbara County" not uniquely geocoded, using "santa barbara,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Barbara+County&key=xxx>
## Warning: "Santa Barbara County" not uniquely geocoded, using "santa barbara,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Walls+Beach,+Vandenberg+AFB,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Manresa+State+Beach,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Manhattan+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Oceano+Dunes+State+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bunkers,+Humboldt+Bay,+Eureka,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Butterfly+Beach,+Montecito,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Catalina+Channel&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pillar+Point,+Half-Moon+Bay,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pacific+State+,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Tourmaline+Surf+Park,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Humboldt+Bay,+Eureka,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Surf+Beach,+Lompoc,+Santa+Barbara+County&key=xxx>
## Warning: "Surf Beach, Lompo..." not uniquely geocoded, using "lompoc, ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Davenport+Landing,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Topanga+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pleasure+Point,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Leffingwell+Landing,+Cambria,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Catalina+Island&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pigeon+Point&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Marina+State+Beach,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Samoa+Beach,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre+State+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Surf+Beach,+Vandenberg+AFB,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pigeon+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Near+oil+rig+Hondo,+5+nm+from+Gaviota,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pismo+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dog+Patch,+San+Onofre&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Loch+Lomond,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Davenport,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre,+San+Diego+County&key=xxx>
## Warning: "San Onofre, San D..." not uniquely geocoded, using "san onofre beach,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre+State+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Terramar+Beach,+Carlsbad,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre,+San+Diego+County&key=xxx>
## Warning: "San Onofre, San D..." not uniquely geocoded, using "san onofre beach,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Shell+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre+State+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Diego+County&key=xxx>
## Warning: "San Diego County" not uniquely geocoded, using "san diego, ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dillon+Beach,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Surf+Beach,+Lompoc,+Santa+Barbara+County&key=xxx>
## Warning: "Surf Beach, Lompo..." not uniquely geocoded, using "lompoc, ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=West+Cove,+Catalina+Island&key=xxx>
## Warning: "West Cove, Catali..." not uniquely geocoded, using "santa catalina island,
## california 90704, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Solana+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Venice+Pier,+Venice,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Monica,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Moonstone+Beach,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Marina+State+Beach,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Imperial+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Malibu,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bean+Hollow+State+Beach,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Faria+Beach,+Ventura+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Will+Rogers+State+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dillon+Beach,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Broad+Beach,+Malibu,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monterey,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Cruz,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Mavericks,+Half+Moon+Bay,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Ocean+Beach,+San+Francisco,+San+Francisco+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Klamath+River+mouth,+Del+Norte+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Salmon+Beach,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Scripps,+LaJolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bunkers,+Humboldt+Bay,+Eureka,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Limantour+Beach,+Point+Reyes+National+Seashore&key=xxx>
## Warning: "Limantour Beach, ..." not uniquely geocoded, using "limantour beach,
## california 94956, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pismo+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Lifeguard+Tower+16,+Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=204s,+San+Clemente,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Kibesillah,+Mendocino+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre+State+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Salmon+Creek,+Sonoma+County&key=xxx>
## Warning: "Salmon Creek, Son..." not uniquely geocoded, using "salmon creek, ca 94923,
## usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Avila+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Venice+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Salmon+Creek,+Sonoma+County&key=xxx>
## Warning: "Salmon Creek, Son..." not uniquely geocoded, using "salmon creek, ca 94923,
## usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Moonstone+Beach,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Stinson+Beach,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Catalina+Island&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Sunset+Cliffs,+San+Diego&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=1/4+to+1/2+m+north+of+the+jetty+at+Bunkers,+Eureka,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Mavericks,+Half+Moon+Bay,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Ventura,+Anacapa+&+Santa+Cruz+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Waddell+Reef,+Santa+Cruz+County&key=xxx>
## Warning: "Waddell Reef, San..." not uniquely geocoded, using "120 union st, santa cruz,
## ca 95060, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=North+of+Pidgeon+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Stinson+Beach,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Clam+Beach,+near+Eureka,+Humboldt+County&key=xxx>
## Warning: "Clam Beach, near ..." not uniquely geocoded, using "clam beach, ca
## 95519, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Salmon+Creek+Beach,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dillon+Beach,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=North+Salmon+Creek+Beach,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bird+Rock,+Tomales+Point&key=xxx>
## Warning: "Bird Rock, Tomale..." not uniquely geocoded, using "bird rock, san diego, ca,
## usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Davenport+Landing,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Shelter+Cove,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Carmel,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bluefish+Cove,+Pt.+Lobos+State+Park,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=LaJolla+Shores,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Miguel+Island,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Sunset+Cliffs,+San+Diego,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=%22Bunkers%22+Eureka,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Goat+Rock,+Bodega+Bay,+Sonoma+County?&key=xxx>
## Warning: "Goat Rock, Bodega..." not uniquely geocoded, using "bodega bay, ca
## 94923, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Between+Santa+Cruz+Island+and+Santa+Barbara&key=xxx>
## Warning: "Between Santa Cru..." not uniquely geocoded, using "santa cruz island,
## california 93001, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Abalone+Point,+Westport+Union+Landing,+Mendocino+County&key=xxx>
## Warning: "Abalone Point, We..." not uniquely geocoded, using "westport-union landing
## state beach, 25000 hillshore dr, westport, ca 95488, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Linda+Mar+Beach,+Pedro+Point,+San+Mateo+County&key=xxx>
## Warning: "Linda Mar Beach, ..." not uniquely geocoded, using "pacifica state beach, 5000
## ca-1, pacifica, ca 94044, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Onofre,+San+Diego+County&key=xxx>
## Warning: "San Onofre, San D..." not uniquely geocoded, using "san onofre beach,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Ano+Nuevo,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Nicholas+Island,+Santa+Barbara+County&key=xxx>
## Warning: "San Nicholas Isla..." not uniquely geocoded, using "santa barbara,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Castle+Rock,+San+Miguel+Island,+Santa+Barbara+County&key=xxx>
## Warning: "Castle Rock, San ..." not uniquely geocoded, using "san miguel island,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Klamath+River,+Del+Norte+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Shelter+Cover,+north+of+Fort+Bragg,+Shelter+Cove,+Mendocino+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Horseshoe+Reef,+Scott+Creek,+Davenport,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=8.5+miles+south+of+Ano+Nuevo+State+Reserve,+Davenport+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monastery+Beach,+Carmel+Bay,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Russian+Gulch,+Jenner,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Trinidad+State+Beach,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Trinidad+Head,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Montera+Beach,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Palos+Verdes+Estates,+Los+Angeles&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Southeast+Farallon+Island,+Farallon+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=24+km+off+Santa+Catalina+Island+in+the+Channel+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monterey+Bay,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Latigo+Point+/+Paradise+Cove,+west+of+Malibu,+Los+Angeles+County&key=xxx>
## Warning: "Latigo Point / Pa..." not uniquely geocoded, using "28128 e pacific coast hwy,
## malibu, ca 90265, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Latigo+Point+/+Paradise+Cove,west+of+Malibu,+Los+Angeles+County&key=xxx>
## Warning: "Latigo Point / Pa..." not uniquely geocoded, using "28128 e pacific coast hwy,
## malibu, ca 90265, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Klamath+River,+Del+Norte+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=North+of+Morro+Rock,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Davenport+Light,+San+Mateo+County&key=xxx>
## Warning: "Davenport Light, ..." not uniquely geocoded, using "san mateo county,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Tunitas+Beach,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monastery+Beach,+Carmel+River+State+Park,+Monterey+Peninsula,+Monterey+California&key=xxx>
## Warning: "Monastery Beach, ..." not uniquely geocoded, using "carmel-by-the-sea, ca
## 93923, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Linda+Mar+Beach,+Pedro+Point,+San+Mateo+County&key=xxx>
## Warning: "Linda Mar Beach, ..." not uniquely geocoded, using "pacifica state beach, 5000
## ca-1, pacifica, ca 94044, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Southeast+Farallon+Island,+Farallon+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=5+miles+south+of+Redondo+Beach&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Point+Conception,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Elephant+Rock+near+Tomales+Point,+Marin+County&key=xxx>
## Warning: "Elephant Rock nea..." not uniquely geocoded, using "2000 paradise dr,
## belvedere tiburon, ca 94920, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Shelter+Cover+(between+Fort+Bragg+&+Eureka),+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Long+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Miguel+Island,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Tomales+Point,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Mission+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pigeon+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monastery+Beach,+Carmel+Bay,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bear+Harbor,+Mendocino+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Morro+Rock,+Morro+Bay,+San+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Point+Buchon,+San+Luis+Obispo+County&key=xxx>
## Warning: "Point Buchon, San..." not uniquely geocoded, using "point buchon trail,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Malibu,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Stillwater+Cove,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=South+Moss+Beach,+Spanish+Bay,+Monterey+Peninsula&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Moonstone+Beach,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+San+Clemente+Island,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Ano+Nuevo+Island,+San+Mateo,+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pajaro+Dunes,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Newport+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=McClure+Beach,+near+Tomales+Point,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+San+Diego,+San+Diego+County&key=xxx>
## Warning: "Off San Diego, Sa..." not uniquely geocoded, using "san diego, ca,
## usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Miguel+Island,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Moonstone+Beach,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Farallon+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Seal+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Usal+Creek,+Bear+Harbor,+Mendocino+County&key=xxx>
## Warning: "Usal Creek, Bear ..." not uniquely geocoded, using "usal creek, california,
## usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Perch+Rock,+Point+Conception,+Santa+Barbara+County&key=xxx>
## Warning: "Perch Rock, Point..." not uniquely geocoded, using "point conception,
## california 93436, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Point+Conception,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=North+of+Point+Sur,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=North+Farallon+Island,+Farallon+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Franklin+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Franklin+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Gregorio+Beach,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Albion+Cove,+Albion,+Mendocino+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Tomales+Point,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Point+Sur,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Laguna+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bird+Rock,+near+Tomales+Point,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Sea+Ranch,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Point+Purisima,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bird+Rock,+Tomales+Point,+near+Marin+County+/+Sonoma+County+border&key=xxx>
## Warning: "Bird Rock, Tomale..." not uniquely geocoded, using "sonoma county,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pigeon+Point,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bodega+Rock,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Ventura&key=xxx>
## Warning: "Ventura" not uniquely geocoded, using "ventura, ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pebble+Beach,+Cypress+Point,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Huntington+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pacifica,+San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Newport+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dana+Point,+San+Clemente,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Long+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Southeast+Farallon+Island&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Mateo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Farallon+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=2+miles+off+Santa+Catalina+Island&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Solana+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=30+miles+south+of+San+Clemente+Island&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco+Bay&key=xxx>
## Warning: "San Francisco Bay" not uniquely geocoded, using "san francisco bay,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco+Bay&key=xxx>
## Warning: "San Francisco Bay" not uniquely geocoded, using "san francisco bay,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco+Bay&key=xxx>
## Warning: "San Francisco Bay" not uniquely geocoded, using "san francisco bay,
## california, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=12'+tank+at+Steinhart+Aquarium,+San+Francisco&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=8+miles+off+Newport+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Farallon+Islands&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Portuguese+Beach+at+mouth+of+Salmon+Creek,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Tomales+Point,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Topanga+Canyon+Beach,+Santa+Monica+Bay&key=xxx>
## Warning: "Topanga Canyon Be..." not uniquely geocoded, using "topanga, ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Point+Mugu,+Ventura+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=10+miles+off+Santa+Barbara,+Santa+Barbara+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Aptos,+Santa+Cruz+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Tomales+Point,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Near+Paradise+Cove,+Malibu,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Bodega+Rock,+Sonoma+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Between+False+Klamath+&+mouth+of+Klamath+River,+Del+Norte+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=LaJolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Hermosa+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=In+kelp+beds+off+La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Alligator+Head,+La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Mission+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+La+Jolla+Cove,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Venice+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dillon+Beach,+Marin+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Baker+Beach,+San+Francisco+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pacific+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Coronado+Strand,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Atascadero+Beach,+Morro+Bay,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pismo+Beach,+San+Luis+Obispo+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Van+Ness+Municipal+Pier,+San+Francisco&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Venice+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Venice+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Zuma+Beach,+Santa+Monica,+Los+Angeles+County&key=xxx>
## Warning: "Zuma Beach, Santa..." not uniquely geocoded, using "santa monica, ca,
## usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Malibu,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Trinidad+Bay,+Humboldt+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pacific+Grove,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=La+Jolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Monica,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Catalina+Island,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Catalina+Island,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Pacific+Grove,+Monterey+Bay,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+Santa+Monica,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Diego,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Imperial+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Long+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Imperial+Beach,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=10+miles+off+Redondo+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Monica,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Monica,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Off+San+Pedro,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Near+Encino,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Dana+Point,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Barbara+Channel&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Santa+Barbara+Channel&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Hermosa+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Hermosa+Beach,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Diego,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Catalina+Channel,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco+Bay+(or+San+Leandro+Bay),+near+cannery,+Alameda+County&key=xxx>
## Warning: "San Francisco Bay..." not uniquely geocoded, using "bay trail, san leandro,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Newport+Beach,+Orange+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Redondo,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Avalon,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monterey+Bay,+Monterey+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Los+Angeles,+Los+Angeles+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco+Bay+(or+San+Leandro+Bay),+near+cannery,+Alameda+County&key=xxx>
## Warning: "San Francisco Bay..." not uniquely geocoded, using "bay trail, san leandro,
## ca, usa"
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Monterey,+Montery+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=LaJolla,+San+Diego+County&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=Capistrano,+Orange+County&key=xxx>
# Find the center of California for the map
cali_center <- c(lon = -119.4179, lat = 36.7783)
# Get the map of california through google
cali_map <- get_googlemap(center = cali_center, zoom = 6, maptype = "terrain")
## ℹ <https://maps.googleapis.com/maps/api/staticmap?center=36.7783,-119.4179&zoom=6&size=640x640&scale=2&maptype=terrain&key=xxx>

Create Map of california with points of where each shark attack happened.

# Plot the map and add the shark attack locations
ggmap(cali_map) +
  geom_point(data = cali_attacks, aes(x = lon, y = lat), alpha = 0.5, size = 2, color = "pink") +
  ylab("Latitude") +
  xlab("Longitude")+
  ggtitle("Shark Attacks In California ")
## Warning: Removed 3 rows containing missing values (`geom_point()`).

# Source: Google Maps API (https://developers.google.com/maps/documentation/geocoding/start)
# Geocoding API

Background and Importance of the dataset

My topic explores shark attacks and tracks many aspects of them. The website “Global Shark Attack File” discusses the importance of monitoring these attacks. It goes over how sharks are curious beings, and since they can’t use their hands to feel and explore things like we do, they use their mouths. (GSAF) The GSAF allows us to track just what happened and how it happened. It puts into perspective that it’s not always the shark’s fault for a human being’s attack. Sharks are also incredibly going endangered. They have survived multiple mass extinctions, but their numbers are dwindling. Humans kill MILLIONS of sharks a year, an estimated 73 million last year, which will only increase. Sharks are vital to making ecosystems balanced and healthy; without them, the oceans would be destroyed. (GSAF) The GSAF thinks of “attacks” more as collisions and is attempting to help end the stigma around sharks. Showing society the stats around attacks rather than labeling sharks as man-killing monsters is a big step in the right direction.

Summary of visualizations

I have three main visualizations; my first one shows if there is a correlation between fatality and gender. I was disappointed, however, by the amount of NA. I was unable to see if there was any relationship between these two variables. I wish I had been able to have more data, so I would be able to see if there was a relationship. My second visualization was to see if there was significant proof that shark attacks were worsening in California yearly. My low P Value proved my hypothesis, and I was able to find that there was a significant linear relationship. I made this graph interactive so you could see the exact amount in each category and how many shark attacks were happening yearly. I enjoyed this graph and would love to make one with total shark attacks. My last graph was a map of California. I used Google API to geocode all the information into my data set to find the latitude and longitude of every attack in California. I wish I could’ve made the dots include more info; However, I did not know how to combine the data frames.