ropensci / rnoaa

@@ -11,7 +11,7 @@
Loading
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,7 +25,7 @@
Loading
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,8 +61,8 @@
Loading
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

@@ -22,7 +22,7 @@
Loading
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,8 +32,7 @@
Loading
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,7 +96,7 @@
Loading
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,13 +223,12 @@
Loading
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",

@@ -6,7 +6,7 @@
Loading
6 6
#' a single data.frame. Data across years, with extent and area of ice.
7 7
#' 
8 8
#' An example file, for January, North pole:
9 -
#' `ftp://sidads.colorado.edu/DATASETS/NOAA/G02135/north/monthly/data/N_01_extent_v3.0.csv`
9 +
#' `https://sidads.colorado.edu/DATASETS/NOAA/G02135/north/monthly/data/N_01_extent_v3.0.csv`
10 10
#'
11 11
#' @export
12 12
#' @param ... Curl options passed on to [crul::verb-GET] - beware

@@ -3,7 +3,7 @@
Loading
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`

@@ -14,11 +14,11 @@
Loading
14 14
#' - lat - latitude (-90 to 90)
15 15
#' - precip - precipitation (in mm) (see Details for more information)
16 16
#'
17 -
#' @references http://www.cpc.ncep.noaa.gov/
18 -
#' ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP
19 -
#' ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP/GAUGE_CONUS/DOCU/PRCP_CU_GAUGE_V1.0CONUS_0.25deg.README
20 -
#' ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP/GAUGE_GLB/DOCU/PRCP_CU_GAUGE_V1.0GLB_0.50deg_README.txt
21 -
#' https://www.esrl.noaa.gov/psd/data/gridded/data.unified.daily.conus.html
17 +
#' @references https://www.cpc.ncep.noaa.gov/
18 +
#' https://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP
19 +
#' https://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP/GAUGE_CONUS/DOCU/PRCP_CU_GAUGE_V1.0CONUS_0.25deg.README
20 +
#' https://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP/GAUGE_GLB/DOCU/PRCP_CU_GAUGE_V1.0GLB_0.50deg_README.txt
21 +
#' https://psl.noaa.gov/data/gridded/data.unified.daily.conus.html
22 22
#'
23 23
#' @details
24 24
#' Rainfall data for the world (1979-present, resolution 50 km), and
@@ -81,10 +81,7 @@
Loading
81 81
}
82 82
83 83
cpc_GET_write <- function(url, path, overwrite = TRUE, ...) {
84 -
  cli <- crul::HttpClient$new(
85 -
    url = url,
86 -
    headers = list(Authorization = "Basic anonymous:myrmecocystus@gmail.com")
87 -
  )
84 +
  cli <- crul::HttpClient$new(url = url)
88 85
  if (!overwrite) {
89 86
    if (file.exists(path)) {
90 87
      stop("file exists and ovewrite != TRUE", call. = FALSE)
@@ -99,7 +96,7 @@
Loading
99 96
}
100 97
101 98
cpc_base_ftp <- function(x) {
102 -
  base <- "ftp://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP"
99 +
  base <- "https://ftp.cpc.ncep.noaa.gov/precip/CPC_UNI_PRCP"
103 100
  if (x) file.path(base, "GAUGE_CONUS") else file.path(base, "GAUGE_GLB")
104 101
}
105 102

@@ -8,7 +8,7 @@
Loading
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,10 +89,7 @@
Loading
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,7 +104,7 @@
Loading
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,

@@ -8,7 +8,7 @@
Loading
8 8
#' @param bbox (numeric) Bounding box, of the form: min-longitude, 
9 9
#' min-latitude, max-longitude, max-latitude
10 10
#'
11 -
#' @references ftp://ftp.ncdc.noaa.gov/pub/data/noaa/
11 +
#' @references https://ftp.ncdc.noaa.gov/pub/data/noaa/
12 12
#'
13 13
#' @return a data.frame with the columns:
14 14
#' 
Files Coverage
R 37.34%
Project Totals (47 files) 37.34%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading