-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
89 lines (59 loc) · 2.26 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = ""
)
```
# rasterwise
The goal of rasterwise is to collate hard-won knowledge of what's wrong and what's right about various data sets.
It began as a collection of iillustrative NetCDF files, used for testing so our R code works right.
## raadtools - a code collection of raster wise-dom
TBD
A classic example is old ocean surface data (Aviso) that was in a regular Mercator grid, but published with
rectlinear lon-lat arrays
https://github.com/AustralianAntarcticDivision/raadtools/blob/master/R/fronts.R#L129-L142
There are many others https://twitter.com/mdsumner/status/1057504207043997697
## Contributing
Raise issues, send PRs, tell us your war stories!
## Rogue NetCDF files
Files are put into "extdata/", and then a script is run to
* archive all the files in extdata/ as a tarball
* generate a record of the list of files
* commit to the repo and tag the release
* push the tarball artefact out into the Releases files (using R's piggyback)
## Get the files
To download the entire file bundle run this code:
```R
library(piggyback)
pb_download("weird.tar.gz", dest = ".", repo = "mdsumner/rasterwise", tag = "v0.5.0")
```
I often put the stars issue number into the folder name https://github.com/r-spatial/stars/issues
There are some weird and wonderful files in the extdata/ on their own, from my personal collections.
## The list
```{r, echo=FALSE}
files <- readLines("weirdlist.txt")
writeLines(files)
```
## The ncdumps -h
```{r,echo=FALSE}
for (i in seq_along(files)) {
if (grepl("\\.R$", files[i])) next;
if (grepl("\\.zip$", files[i])) next;
if (grepl("\\.txt$", files[i])) next;
if (grepl("\\.md$", files[i])) next;
if (grepl("\\.tif$", files[i])) next;
if (grepl("readme$", files[i], ignore.case = TRUE)) next;
if (grepl("\\.hdf$", files[i])) next;
if (grepl("\\.GC$", files[i])) next;
cat("###############################################################################\n")
cat(files[i])
cat("\n\n\n\n")
dump <- system(sprintf("ncdump -h %s", file.path("extdata", files[i])), intern = TRUE)
writeLines(dump)
cat("\n\n\n\n")
}
```