VPSPulse Mirrors

High-Performance Open-Source Archive

Weather Data

Weather Data

1 Introduction

This vignette demonstrates the use of two datasets: top_stations and weather. After selecting an organism of interest, we linked each occurrence to its nearest weather station. We then counted the matches, identified the top three weather stations most closely associated with the organism’s occurrences, and downloaded the corresponding weather data for further analysis.


This is the glimpse of your top_stations data :

library(dplyr)
library(ecotourism)

data("top_stations")
top_stations |> glimpse()
Rows: 12
Columns: 2
$ organism <chr> "orchids", "orchids", "orchids", "gouldian_finch", "gouldian_…
$ ws_id    <chr> "946300-99999", "956470-99999", "956410-99999", "941310-99999…

and this is weather data related to those top stations:

data("weather")
weather |> glimpse()
Rows: 36,872
Columns: 18
$ ws_id      <chr> "941200-99999", "941200-99999", "941200-99999", "941200-999…
$ stn_lat    <dbl> -12.415, -12.415, -12.415, -12.415, -12.415, -12.415, -12.4…
$ stn_lon    <dbl> 130.877, 130.877, 130.877, 130.877, 130.877, 130.877, 130.8…
$ date       <date> 2014-01-01, 2014-01-02, 2014-01-03, 2014-01-04, 2014-01-05…
$ year       <dbl> 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014,…
$ month      <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
$ day        <int> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ weekday    <ord> Wednesday, Thursday, Friday, Saturday, Sunday, Monday, Tues…
$ dayofyear  <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, …
$ temp       <dbl> 30.1, 30.5, 30.6, 29.6, 29.1, 30.3, 30.9, 30.9, 29.7, 28.2,…
$ min        <dbl> 25.7, 26.7, 26.9, 25.0, 25.0, 24.9, 26.2, 28.0, 23.0, 22.9,…
$ max        <dbl> 33.3, 33.7, 34.1, 33.4, 34.0, 36.0, 36.1, 34.8, 34.8, 32.8,…
$ dewp       <dbl> 25.6, 24.9, 24.5, 23.0, 23.9, 23.9, 25.9, 25.4, 24.7, 23.7,…
$ rh         <dbl> 76.9, 72.1, 70.0, 67.7, 73.6, 68.7, 74.8, 72.6, 74.6, 76.6,…
$ prcp       <dbl> 0.00, 0.00, 0.00, 0.00, 5.84, 0.00, 0.00, 0.00, 23.88, 13.2…
$ rainy      <dbl> 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
$ wind_speed <dbl> 4.3, 4.3, 4.4, 5.0, 4.1, 3.5, 5.0, 5.6, 5.6, 4.0, 3.9, 3.8,…
$ max_speed  <dbl> 7.2, 6.2, 7.7, 7.7, 10.3, 11.3, 8.8, 8.8, 9.3, 17.5, 9.8, 9…

Map of Top Weather Stations

library(ggplot2)
library(ggthemes)

top_stations |> left_join(weather_stations) |> 
ggplot() +
  geom_sf(data = oz_lga) +
  geom_point(aes(x = stn_lon, y = stn_lat, color = organism), shape = 17, size = 3) +
  theme_map()

Need mirroring services?
Contact our team at info@vpspulse.com.

Mirror powered by VPSpulse

Infrastructure sponsored by VPSPulse & Secure Payments by ArionPay.