Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

41 new feature read csv datasets #76

Merged
merged 20 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
540 changes: 392 additions & 148 deletions R/defStormsDataset.R

Large diffs are not rendered by default.

Binary file modified R/sysdata.rda
Binary file not shown.
19 changes: 14 additions & 5 deletions data-raw/internalData.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,37 @@ xsup <- 95
xinf <- 18
nbC <- xsup - xinf
x <- seq(xinf, xsup)

y <- x
colorRange <- colorRampPalette(sshsPalette[2:7], bias = 1)
mswSSHSPalette <- colorRange(nbC)

plot(x, y, col = mswSSHSPalette, lwd = 3)
abline(v = sshs)

mswPalette <- rev(grDevices::heat.colors(50))
pdiPalette <- rev(viridis::inferno(50))
exposurePalette <- rev(viridis::viridis(50))

# Data for test functions
################################################################################
########### Data for the tests of functions ####################################
################################################################################

# spatialBehaviour functions
suppressWarnings(sds <- defStormsDataset())
pam <- defStormsList(sds, loi = "Vanuatu", names = "PAM", verbose = 0)
dfGetDataInterpolate <- getDataInterpolate(pam@data[["PAM"]], seq(26, 49), 4, 3, FALSE, "Willoughby")


# defStormsDataset functions
sdsFromNc <- defStormsDataset(seasons = c(2015, 2020))
sdsFromCsv <- defStormsDataset(filename = system.file("extdata", "test_dataset.csv", package = "StormR"),
seasons = c(2015, 2020))



usethis::use_data(resolutions,
mph2msC, knt2msC, kmh2msC, nm2kmC, b2paC, mb2paC, psi2paC, atm2paC,
km, wgs84, Basins, sshs,
margin,
oceanColor, groundColor, sshsPalette, mswSSHSPalette, mswPalette, pdiPalette, exposurePalette,
dfGetDataInterpolate,
dfGetDataInterpolate, sdsFromNc, sdsFromCsv,
internal = TRUE, overwrite = TRUE
)
602 changes: 602 additions & 0 deletions inst/extdata/test_dataset.csv

Large diffs are not rendered by default.

28 changes: 21 additions & 7 deletions man/defStormsDataset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/stormsDataset-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading