https://github.com/jadeynryan/orcas
Scrape and Visualize Orca Sighting Data
https://github.com/jadeynryan/orcas
Last synced: 4 months ago
JSON representation
Scrape and Visualize Orca Sighting Data
- Host: GitHub
- URL: https://github.com/jadeynryan/orcas
- Owner: jadeynryan
- License: other
- Created: 2023-04-07T00:18:54.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-10-13T20:52:48.000Z (over 1 year ago)
- Last Synced: 2025-10-13T04:34:36.295Z (8 months ago)
- Language: HTML
- Homepage: https://jadeynryan.github.io/orcas/
- Size: 26.1 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
fig-caption: false
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# orcas
[](https://github.com/jadeynryan/orcas/actions/workflows/R-CMD-check.yaml) [](https://app.codecov.io/gh/jadeynryan/orcas?branch=master)
The goal of `orcas` is to scrape orca sighting data from the web and visualize it in maps and tables.
[R Ladies Seattle](https://rladiesseattle.org "R Ladies Seattle URL") invited me to give a talk for the 'R in the Outdoors' [meetup](https://www.meetup.com/rladies-seattle/ "meetup URL"). This was my first in-person talk of my professional career! I used this as an opportunity to learn new skills through a personal project. I've always had an affinity for the Southern Resident Killer Whales in the Salish Sea. The [Center for Whale Research](https://www.whaleresearch.com "Center for Whale Research URL") does a lot of really fascinating and important work monitoring their population. They post their survey data on their website; each encounter with the orcas is a separate webpage. Lately, I've been curious and intimidated by web scraping so I decided this would make a great case study and personal project.
I ended up also going to the [Seattle useR Group](https://www.meetup.com/seattle-user/) lightning talks meetup afterwards and spontaneously gave the same presentation there!
`orcas` is still a work in progress, as the `cwr_tidy` dataset is mostly tidy but not completely clean. There are still missing values and typos, as evident from some encounters having a negative duration.
> All photos and data belong to the Center for Whale Research, a 501c3 nonprofit organization registered in Washington State.
## Installation
You can install the development version of `orcas` from [GitHub](https://github.com/ "GitHub URL") with:
``` r
# install.packages("devtools")
devtools::install_github("jadeynryan/orcas")
```
## R in the Outdoors Presentation
While there is no recording of the talk, you can view the [slides](https://jadeynryan.github.io/orcas/ "slides URL").
[](https://jadeynryan.github.io/orcas/)
## Examples
**Scrape the two most recent encounters from 2022 and 2023:**
```{r}
orcas::make_encounter_df(years = 2022:2023, max_urls = 2)
```
**Make an interactive DT of 2023 encounters:**
```{r, eval=FALSE}
orcas::cwr_tidy |>
subset(year == 2023) |>
orcas::make_dt()
```

**Make an interactive leaflet map of last two 2023 encounters:**
```{r, eval=FALSE}
orcas::cwr_tidy |>
subset(year == 2023) |>
head(2) |>
orcas::make_leaflet()
```
