Skip to contents

Retrieve Weather data from the Network for Environment and Weather Applications (NEWA) version 3.0 at Cornell University.

Usage

newa_nrcc3(
  year,
  month,
  day,
  hour,
  station,
  base = "https://hrly.nrcc.cornell.edu/stnHrly"
)

Arguments

year

Numeric value with the start year.

month

Numeric value with the start month.

day

Numeric value with the start day.

hour

Numeric value with the start hour.

station

String with the station abbreviation. Check scrappy::newa3_stations for a list of stations and abbreviations.

base

Base URL (default: https://hrly.nrcc.cornell.edu/stnHrly).

Value

List of data frames with hourly, daily, hourly_forecast, and daily forecast (daily_forecast) data.

Examples

scrappy::newa_nrcc3(2021, 12, 01, 00, "gbe")
#> $hourly
#> # A tibble: 17,939 × 10
#>    date                    flags prcp  temp  rhum  dwpt  lwet  wspd  wdir  srad 
#>    <chr>                   <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#>  1 2021-12-01T00:00:00-05… "   … 0.00  36.3  86    32.5  0     7.1   255   0    
#>  2 2021-12-01T01:00:00-05… "   … 0.00  37.2  81    31.9  0     8.0   258   0    
#>  3 2021-12-01T02:00:00-05… "   … 0.00  37.3  81    32.0  0     6.9   262   0    
#>  4 2021-12-01T03:00:00-05… "   … 0.00  37.2  81    31.9  0     7.6   265   0    
#>  5 2021-12-01T04:00:00-05… "   … 0.00  36.8  80    31.2  0     9.7   268   0    
#>  6 2021-12-01T05:00:00-05… "   … 0.00  35.4  82    30.5  0     6.8   265   0    
#>  7 2021-12-01T06:00:00-05… "   … 0.00  33.6  82    28.7  0     5.7   267   0    
#>  8 2021-12-01T07:00:00-05… "   … 0.00  33.3  77    26.9  0     3.7   242   0    
#>  9 2021-12-01T08:00:00-05… "   … 0.00  33.5  71    25.1  0     3.3   238   1    
#> 10 2021-12-01T09:00:00-05… "   … 0.00  35.3  65    24.7  0     2.9   226   6    
#> # ℹ 17,929 more rows
#> 
#> $daily
#> # A tibble: 747 × 4
#>    date                      prcp  maxt  mint 
#>    <chr>                     <chr> <chr> <chr>
#>  1 2021-12-01T23:59:59-05:00 0.00  41.6  33.3 
#>  2 2021-12-02T23:59:59-05:00 0.24  52.8  35.3 
#>  3 2021-12-03T23:59:59-05:00 0.00  35.9  28.3 
#>  4 2021-12-04T23:59:59-05:00 0.00  43.2  30.7 
#>  5 2021-12-05T23:59:59-05:00 0.00  45.3  30.1 
#>  6 2021-12-06T23:59:59-05:00 0.23  49.0  31.5 
#>  7 2021-12-07T23:59:59-05:00 0.01  31.6  25.2 
#>  8 2021-12-08T23:59:59-05:00 0.02  30.6  22.8 
#>  9 2021-12-09T23:59:59-05:00 0.03  32.2  23.1 
#> 10 2021-12-10T23:59:59-05:00 0.00  46.8  32.3 
#> # ℹ 737 more rows
#> 
#> $hourly_forecast
#> # A tibble: 135 × 12
#>    date        flags temp  rhum  dwpt  lwet  wspd  wdir  srad  tsky  pop12 qpf  
#>    <chr>       <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#>  1 2023-12-18… "   … 44.0  89    40.9  60    16    290   6     100   100   0.027
#>  2 2023-12-18… "   … 44.0  89    40.9  60    16    290   6     100   100   0.027
#>  3 2023-12-18… "   … 44.0  86    40.0  60    16    290   6     100   100   0.027
#>  4 2023-12-18… "   … 43.1  86    38.9  60    16    280   5     96    100   0.002
#>  5 2023-12-18… "   … 43.1  82    38.0  60    16    280   2     93    100   0.002
#>  6 2023-12-18… "   … 40.9  85    37.0  60    16    270   0     89    100   0.002
#>  7 2023-12-18… "   … 40.0  86    36.0  60    14    270   0     90    100   0.002
#>  8 2023-12-18… "   … 40.0  82    35.0  60    14    260   0     91    100   0.002
#>  9 2023-12-18… "   … 40.0  83    35.0  60    14    250   0     92    100   0.002
#> 10 2023-12-18… "   … 38.9  82    34.1  60    13    250   0     95    100   0.005
#> # ℹ 125 more rows
#> 
#> $daily_forecast
#> # A tibble: 6 × 4
#>   date                      maxt  mint  weather
#>   <chr>                     <chr> <chr> <chr>  
#> 1 2023-12-18T23:59:59-05:00 45.6  37.0  rain   
#> 2 2023-12-19T23:59:59-05:00 35.0  25.4  rain   
#> 3 2023-12-20T23:59:59-05:00 38.9  25.1  clear  
#> 4 2023-12-21T23:59:59-05:00 36.0  27.2  mixed  
#> 5 2023-12-22T23:59:59-05:00 34.1  27.0  mixed  
#> 6 2023-12-23T23:59:59-05:00 38.9  29.9  mixed  
#>