Skip to content

Commit

Permalink
Merge pull request #42 from BERENZ/master
Browse files Browse the repository at this point in the history
added information about the date
  • Loading branch information
kadyb authored Oct 28, 2020
2 parents db85bc5 + 5ce0ade commit 5e01945
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions R/orto_request.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ orto_request = function(polygon) {
}

selected_cols = c("godlo", "akt_rok", "piksel", "kolor", "zrDanych", "ukladXY",
"czy_ark_wypelniony", "url_do_pobrania", "idSerie", "sha1",
"czy_ark_wypelniony", "url_do_pobrania", "idSerie", "sha1", "akt_data",
"nazwa_pliku")
selected_cols = paste(selected_cols, collapse = ",")

Expand Down Expand Up @@ -54,7 +54,7 @@ orto_request = function(polygon) {
url_do_pobrania = character(),
idSerie = integer(),
sha1 = character(),
#akt_data = numeric(),
akt_data = numeric(),
#idorto = integer(),
nazwa_pliku = character()
#ESRI_OID = integer()
Expand Down Expand Up @@ -88,8 +88,9 @@ orto_request = function(polygon) {
# postprocessing
colnames(empty_df) = c("sheetID", "year", "resolution", "composition",
"sensor", "CRS", "isFilled", "URL", "seriesID",
"sha1", "filename")
"sha1", "date", "filename")
empty_df$composition = as.factor(empty_df$composition)
empty_df$date = as.Date(as.POSIXct(empty_df$date / 1000, origin = "1970-01-01", tz = "CET"))
empty_df$CRS = as.factor(empty_df$CRS)
empty_df$isFilled = ifelse(empty_df$isFilled == "TAK", TRUE, FALSE)
empty_df$sensor = factor(empty_df$sensor,
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-orto_request.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (!"GITHUB_ACTION" %in% names(Sys.getenv())) {
})

test_that("check number of columns", {
expect_true(ncol(req_df) == 11)
expect_true(ncol(req_df) == 12)
})

}

0 comments on commit 5e01945

Please sign in to comment.