Another species found! I am attempting to ID all the conifer species that occur in the Miracle Mile while out on runs so I can make a visit to the Miracle Mile and ID all of them in one go.

These sugar pine cones are huge! I have a few in my pinecone collection that are greater than 35 cm! Sugar pines (Pinus lambertiana) are fairly common species and I see them on trail runs often. For this post I first pulled the observations from GBIF, plotted them, and then looked where I had recently ran that would overlap with the species observation data. In this case, it was on a section of the Pacific Crest Trail (PCT) that I did an out and back run on.

library(rgbif)
library(tidyverse)
library(data.table)
library(maps)

Subset our search to only Northern California

mm_geometry <- paste('POLYGON((-124.4323 42.0021, -121.5045 42.0021, -121.5045 40.194, -124.4323 40.194, -124.4323 42.0021))')

Pull in the publicly available data and make a few quick plots.

pinus_lambertiana_NC <- occ_data(scientificName = "Pinus lambertiana", hasCoordinate = TRUE, limit = 10000,
                     geometry = mm_geometry )
head(pinus_lambertiana_NC)
## $meta
## $meta$offset
## [1] 0
## 
## $meta$limit
## [1] 300
## 
## $meta$endOfRecords
## [1] TRUE
## 
## $meta$count
## [1] 250
## 
## 
## $data
## # A tibble: 250 × 122
##    key        scientificName  decimalLatitude decimalLongitude issues datasetKey
##    <chr>      <chr>                     <dbl>            <dbl> <chr>  <chr>     
##  1 3499371090 Pinus lamberti…            41.9            -124. ""     50c9509d-…
##  2 3705791914 Pinus lamberti…            41.5            -124. "cdro… 50c9509d-…
##  3 3705386161 Pinus lamberti…            41.2            -122. "cdro… 50c9509d-…
##  4 3747286857 Pinus lamberti…            40.9            -124. ""     50c9509d-…
##  5 3759831942 Pinus lamberti…            41.8            -124. "cdro… 50c9509d-…
##  6 3760339371 Pinus lamberti…            41.9            -124. "cdro… 50c9509d-…
##  7 3764222438 Pinus lamberti…            41.9            -124. "cdro… 50c9509d-…
##  8 3031928144 Pinus lamberti…            41.1            -122. "cdro… 50c9509d-…
##  9 3764363339 Pinus lamberti…            41.8            -124. "cdro… 50c9509d-…
## 10 3118331456 Pinus lamberti…            41.2            -122. "cdro… 50c9509d-…
## # … with 240 more rows, and 116 more variables: publishingOrgKey <chr>,
## #   installationKey <chr>, publishingCountry <chr>, protocol <chr>,
## #   lastCrawled <chr>, lastParsed <chr>, crawlId <int>,
## #   hostingOrganizationKey <chr>, basisOfRecord <chr>, occurrenceStatus <chr>,
## #   taxonKey <int>, kingdomKey <int>, phylumKey <int>, classKey <int>,
## #   orderKey <int>, familyKey <int>, genusKey <int>, speciesKey <int>,
## #   acceptedTaxonKey <int>, acceptedScientificName <chr>, kingdom <chr>, …
pinus_lambertiana_coords <- pinus_lambertiana_NC$data[ , c("decimalLongitude", "decimalLatitude", "occurrenceStatus", "coordinateUncertaintyInMeters", "institutionCode", "references")]

maps::map(database = "state", region = "california")
points(pinus_lambertiana_coords[ , c("decimalLongitude", "decimalLatitude")], pch = ".", col = "red", cex = 3)

Pull in my run data.

TrailRun1  <- read.csv("../../../static/data/TrailRun_SugarPine.csv")

Make a quick plot.

TrailRun_plot <- ggplot(TrailRun1, aes(x = position_long, y = position_lat)) +
                    coord_quickmap() + geom_point() +
                    xlab("Longitude") + ylab("Latitude")
TrailRun_plot

Subset the larger California dataset to only include a zoomed in portion where I ran based on the maximum and minimum coordinates from the run plot above.

pinus_lamb_coords_sub <- subset(pinus_lambertiana_coords, decimalLatitude > 41.1525 & decimalLatitude < 41.1650 & decimalLongitude > -122.295 & decimalLongitude < -122.265 )

Overlay the plots!

TrailRun_plot2 <- ggplot() +
          coord_quickmap() +
          geom_point(data = TrailRun1, aes(x = position_long, y = position_lat), color = 'black') +
          geom_point(data=pinus_lamb_coords_sub, aes(x = decimalLongitude, y = decimalLatitude), color = 'red') +
          xlab("Longitude") + ylab("Latitude")
TrailRun_plot2