| Object | Description |
|---|---|
| gouldian_finch | Gouldian Finch occurrence records (2014–2024) |
| manta_rays | Manta Ray occurrence records (2014–2024) |
| glowworms | Glowworm occurrence records (2014–2024) |
| tourism_quarterly | Quarterly tourism trips by region and purpose |
| weather | Daily weather by station: temp, max, min, prcp linked by ws_id and date |
Ecotourism Tutorial
Joining occurrence, tourism, and weather data
🎯 Objectives
Practice joining wildlife occurrence records with tourism and weather data from the ecotourism package, and explore how visitor numbers relate to wildlife sightings across different regions, organisms, and months.
🔧 Preparation
- Install the ecotourism package by running
remotes::install_github("vahdatjavad/ecotourism")in the Console. - Complete the weekly quiz, before the deadline!
- Open your RStudio Project for this unit, (the one you created in week 1). Create a
.qmddocument for this week’s activities.
📥 Exercises
The ecotourism package contains wildlife occurrence records and quarterly tourism trip counts for Australia, linked by ws_id. In the setup chunk, tourism_total has been created by summing trips across purposes per ws_id, year, and quarter.
Question 1 (one region). Join gouldian_finch with tourism_total and ecotourism::weather, keeping only sightings from Western Australia (obs_state == "Western Australia"). How many sightings are in the joined table? How many have a non-NA value for max (daily maximum temperature)? What does this tell you about the completeness of the weather data in the current package?
Question 2 (one organism). Join manta_rays with tourism_total and ecotourism::weather across all regions and months. For each month, calculate the mean total tourism trips and the proportion of sighting days that have a non-NA max value. In which months is weather data available, and what does the pattern of missing weather tell you?
Question 3 (one month). Join glowworms with tourism_total and ecotourism::weather, keeping only sightings from April (month == 4). Make a scatter plot of total_trips against year, colouring by obs_state. Add a note to the plot title indicating how many sighting days have weather data available. What would this plot look like once the weather data is complete?
👌 Finishing up
Make sure you say thanks and good-bye to your tutor. This is a time to also report what you enjoyed and what you found difficult.