parsedata: Parse metadata

Description Usage Arguments Value Examples

Description

Parse select attributes from metadata csv files

Usage

1

Arguments

files

Character. Vector of input csv filenames (from EarthExplorer)

Value

data.frame with cloud cover per date per image

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
fl <- list.files('inst/extdata/', pattern = glob2rx('*.csv'), full.names = TRUE)
df <- parsedata(fl)
head(df)
tail(df)

# plot cloud cover per DOY per year per path/row
library(magrittr)
library(ggplot2)
df$year <- format(df$date, format = "%Y") %>% as.numeric()
df$doy <- format(df$date, format = "%j") %>% as.numeric()
df$pr <- sprintf("%s-%s", df$path, df$row) %>% factor()
p <- ggplot(data = df, aes(x = doy, y = year)) +
   geom_point(aes(size = cloud_cover, colour = sensor), alpha = 0.5) +
   facet_wrap(~ pr, nc = 1)
p

bendv/landsatmeta documentation built on May 12, 2019, 10:58 a.m.