No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
ffd92f6
... +0 ...
7511457
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
3 | 3 | #' @export |
|
4 | 4 | #' @param refresh (logical) Download station data from NOAA ftp server again. |
|
5 | 5 | #' Default: `FALSE` |
|
6 | - | #' @references ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ |
|
6 | + | #' @references https://ftp.ncdc.noaa.gov/pub/data/noaa/ |
|
7 | 7 | #' @family isd |
|
8 | 8 | #' @details The data table is cached, but you can force download of data from |
|
9 | 9 | #' NOAA by setting `refresh=TRUE` |
22 | 22 | #' @return A tibble (data.frame) which contains data pulled from NOAA's FTP |
|
23 | 23 | #' server for the queried weather site. A README file with more information |
|
24 | 24 | #' about the format of this file is available from NOAA |
|
25 | - | #' (http://www1.ncdc.noaa.gov/pub/data/ghcn/daily/readme.txt). |
|
25 | + | #' (https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/readme.txt). |
|
26 | 26 | #' This file is formatted so each line of the file gives the daily weather |
|
27 | 27 | #' observations for a single weather variable for all days of one month of |
|
28 | 28 | #' one year. In addition to measurements, columns are included for certain |
32 | 32 | #' @section Base URL: |
|
33 | 33 | #' The base url for data requests can be changed. The allowed urls are: |
|
34 | 34 | #' https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/all (default), |
|
35 | - | #' ftp://ftp.ncei.noaa.gov/pub/data/ghcn/daily/all, |
|
36 | - | #' ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all |
|
35 | + | #' https://ncei.noaa.gov/pub/data/ghcn/daily/all |
|
37 | 36 | #' |
|
38 | 37 | #' You can set the base url using the `RNOAA_GHCND_BASE_URL` environment |
|
39 | 38 | #' variable; see example below. |
97 | 96 | #' |
|
98 | 97 | #' # change the base url for data requests |
|
99 | 98 | #' Sys.setenv(RNOAA_GHCND_BASE_URL = |
|
100 | - | #' "ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all") |
|
99 | + | #' "https://ncei.noaa.gov/pub/data/ghcn/daily/all") |
|
101 | 100 | #' ghcnd(stations$id[45], verbose = TRUE) |
|
102 | 101 | #' ## must be in the allowed set of urls |
|
103 | 102 | #' # Sys.setenv(RNOAA_GHCND_BASE_URL = "https://google.com") |
224 | 223 | ||
225 | 224 | ghcnd_allowed_urls <- c( |
|
226 | 225 | "https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/all", |
|
227 | - | "ftp://ftp.ncei.noaa.gov/pub/data/ghcn/daily/all", |
|
228 | - | "ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/all" |
|
226 | + | "https://ncei.noaa.gov/pub/data/ghcn/daily/all" |
|
229 | 227 | ) |
|
230 | 228 | ghcndbase <- function() { |
|
231 | 229 | x <- Sys.getenv("RNOAA_GHCND_BASE_URL", "") |
|
232 | 230 | if (identical(x, "")) { |
|
233 | - | x <- "https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/all" |
|
231 | + | x <- ghcnd_allowed_urls[1] |
|
234 | 232 | } |
|
235 | 233 | if (!x %in% ghcnd_allowed_urls) { |
|
236 | 234 | stop("the RNOAA_GHCND_BASE_URL environment variable must be in set:\n", |
8 | 8 | #' then split the output into tibbles by date |
|
9 | 9 | #' @param ... curl options passed on to [crul::verb-GET] |
|
10 | 10 | #' @references docs: |
|
11 | - | #' <ftp://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/ARC2_readme.txt> |
|
11 | + | #' https://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/ARC2_readme.txt |
|
12 | 12 | #' @note See [arc2_cache] for managing cached files |
|
13 | 13 | #' @section box parameter: |
|
14 | 14 | #' The `box` parameter filters the arc2 data to a bounding box you supply. |
89 | 89 | } |
|
90 | 90 | ||
91 | 91 | arc2_GET_write <- function(url, path, date, overwrite = TRUE, ...) { |
|
92 | - | cli <- crul::HttpClient$new( |
|
93 | - | url = url, |
|
94 | - | headers = list(Authorization = "Basic anonymous:myrmecocystus@gmail.com") |
|
95 | - | ) |
|
92 | + | cli <- crul::HttpClient$new(url = url) |
|
96 | 93 | if (!overwrite) { |
|
97 | 94 | if (file.exists(path)) { |
|
98 | 95 | stop("file exists and ovewrite != TRUE", call. = FALSE) |
107 | 104 | } |
|
108 | 105 | ||
109 | 106 | arc2_base <- function() { |
|
110 | - | "ftp://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/bin" |
|
107 | + | "https://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/bin" |
|
111 | 108 | } |
|
112 | 109 | ||
113 | 110 | arc2_base_ftp <- function(x, y) sprintf("%s/daily_clim.bin.%s.gz", x, |
11 | 11 | #' @param progress (logical) print progress - ignored if `parallel=TRUE`. |
|
12 | 12 | #' The default is `FALSE` because printing progress adds a small bit of |
|
13 | 13 | #' time, so if processing time is important, then keep as `FALSE` |
|
14 | - | #' @references ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ |
|
14 | + | #' @references https://ftp.ncdc.noaa.gov/pub/data/noaa/ |
|
15 | 15 | #' @seealso [isd()], [isd_stations()], [isd_stations_search()] |
|
16 | 16 | #' @details `isd_read` - read a `.gz` file as downloaded |
|
17 | 17 | #' from NOAA's website |
25 | 25 | #' this will override that behavior. |
|
26 | 26 | #' @param ... Curl options passed on to [crul::verb-GET] |
|
27 | 27 | #' |
|
28 | - | #' @references ftp://ftp.ncdc.noaa.gov/pub/data/noaa/ |
|
28 | + | #' @references https://ftp.ncdc.noaa.gov/pub/data/noaa/ |
|
29 | 29 | #' https://www1.ncdc.noaa.gov/pub/data/noaa |
|
30 | 30 | #' @family isd |
|
31 | 31 | #' |
61 | 61 | #' |
|
62 | 62 | #' @section Errors: |
|
63 | 63 | #' Note that when you get an error similar to `Error: download failed for |
|
64 | - | #' ftp://ftp.ncdc.noaa.gov/pub/data/noaa/1955/011490-99999-1955.gz`, the |
|
65 | - | #' file does not exist on NOAA's ftp servers. If your internet is down, |
|
64 | + | #' https://ftp.ncdc.noaa.gov/pub/data/noaa/1955/011490-99999-1955.gz`, the |
|
65 | + | #' file does not exist on NOAA's servers. If your internet is down, |
|
66 | 66 | #' you'll get a different error. |
|
67 | 67 | #' |
|
68 | 68 | #' @note See [isd_cache] for managing cached files |
Learn more Showing 1 files with coverage changes found.
R/lcd.R
Files | Coverage |
---|---|
R | 0.19% 37.34% |
Project Totals (47 files) | 37.34% |
7511457
ffd92f6