filter_VIIRS_alerts: Filter VIIRS fire alerts

Description Usage Arguments Value Examples

View source: R/filter_VIIRS_alerts.R

Description

This function filters VIIRS fire alerts. It uses a shapefile of spatial units to generate plots and visualize some statistics of alerts by spatial units.

Usage

1
2
3
filter_VIIRS_alerts(spatial_units_shp, column_units_name, VIIRS_shp,
  column_date_name, column_frp_name, column_confidence_name, min_frp,
  min_confidence, size_jpg = c(10, 10), output_folder)

Arguments

spatial_units_shp

Shapefile filename. This is the shapefile of spatial units to analyze with SATA alerts. It should be projected in UTM WGS84 coordinates system.

column_units_name

String. The name of the column indicating the names of the spatial units to analize. Case-sensitive applies.

VIIRS_shp

Shapefile filename. The shapefile of VIIRS alerts from SATA (as points).

column_date_name

String. The name of the column indicating the date of alerts. Case-sensitive applies.

column_frp_name

String. The name of the column indicating the radiative power of alerts (normally as frp). Case-sensitive applies.

column_confidence_name

String. The name of the column indicating the confidence of alerts (normally as confidence). Case-sensitive applies.

min_frp

Numeric. A value defining the minimun radiative power in filtering.

min_confidence

String. A category defining the minimun confidence in filtering (normally three: "high", "nominal" and "low").

size_jpg

Numeric. Two values which define the width and height of boxplot (in cms).

output_folder

Foldername. A folder to use for store alerts filtered.

Value

Filtered alerts and plots are stored in: *output_folder*.

Examples

 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
#Defining variables from spatial units shapefile
spatial_units_shp <- "C:/DATA/GAF/demo/shp/unidades_espaciales/provincias.shp"
column_units_name <- "dpa_despro" #case sensitive

#Defining variables from VIIRS shapefile
VIIRS_shp <- "C:/DATA/GAF/demo/shp/alertas/pts_calor_VIIRS_30d.shp"
column_date_name <- "acq_date" #case sensitive
column_frp_name <- "frp" #case sensitive
column_confidence_name <- "confidence" #case sensitive
min_frp <- 10 #same units as area column
min_confidence <- "nominal" #all categories below this one are filtered

#Defining variables of ouputs
size_jpg <- c(40,20) #first value defines width and second height
output_folder <- "C:/DATA/GAF/demo/estadisticas"

#running the function
filter_VIIRS_alerts(spatial_units_shp = spatial_units_shp,
                            column_units_name = column_units_name,
                            VIIRS_shp = VIIRS_shp,
                            column_date_name = column_date_name,
                            column_frp_name = column_frp_name,
                            column_confidence_name = column_confidence_name,
                            min_frp = min_frp,
                            min_confidence = min_confidence,
                            size_jpg = size_jpg,
                            output_folder = output_folder)

FSantosCodes/SATAtools documentation built on May 5, 2019, 11:06 p.m.