lucC_plot_area_events: Plot Area Graphic with lucC Events

Description Usage Arguments Value Author(s) Examples

Description

Plot area with percentages over time

Usage

1
2
3
4
lucC_plot_area_events (data_tb = NULL, 
custom_palette = FALSE, RGB_color = NULL, pixel_resolution = 250, 
relabel = FALSE, original_labels = NULL, new_labels = NULL,
perc_area = TRUE)

Arguments

data_tb

Tibble. A tibble with values longitude and latitude and other values

custom_palette

Boolean. A TRUE or FALSE value. If TRUE, user will provide its own color palette setting! Default is FALSE

RGB_color

Character. A vector with color names to map legend, for example, c("Green","Blue"). Default is setting scale_colour_hue

pixel_resolution

Numeric. Is a spatial resolution of the pixel. Default is 250 meters considering MODIS 250 m. See more at https://modis.gsfc.nasa.gov/about/specifications.php.

relabel

Boolean. A TRUE or FALSE value. If TRUE, user will provide its own legend text setting! Default is FALSE

original_labels

Character. A vector with original labels from legend text, for example, c("Forest","Pasture").

new_labels

Character. A vector with new labels to legend text, for example, c("Mature_Forest","Pasture1").

perc_area

Boolean. Show the y axis in percentage values. Default is TRUE. FALSE will show in Area square kilometers

Value

Plot a area with percentage in Y axis or in square kilometers (Area km^2) = (Number of pixel *(pixel_resolution*pixel_resolution))/(1000*1000)

Author(s)

Adeline M. Maciel

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
28
29
30
31
32
33
34
35
36
37
38
## Not run: 

library(lucC)

lucC_starting_point()

# open a JSON file example
file_json = "./inst/extdata/patterns/example_TWDTW.json"

# open file JSON
input_tb_raw_json <- file_json %>%
  lucC_fromJSON()
input_tb_raw_json

# plot maps input data
lucC_plot_area_events(input_tb_raw_json, EPSG_WGS84 = TRUE, 
custom_palette = TRUE, RGB_color = c("#FFB266", "#1b791f", 
"#929e6e", "#f5e7a1"))

# define interval
time_ex1 <- lucC_interval("2002-01-01", "2014-01-01")

# apply predicate occur
ts_occur1 <- lucC_predicate_holds(geo_objects = input_tb_raw_json, 
object_properties = "Forest", event_time_intervals = time_ex1)
ts_occur1

# events over input map
lucC_plot_maps_events(ts_occur1, EPSG_WGS84 = TRUE, 
custom_palette = TRUE, RGB_color = c("#FFB266", "#1b791f", 
"#929e6e", "#f5e7a1"), shape_point = 0, colour_point = "black", 
size_point = 2.3)

lucC_plot_area_events(ts_occur1, custom_palette = TRUE, 
RGB_color = "#929e6e", pixel_resolution = 250) 


## End(Not run)

ammaciel/stilf documentation built on May 10, 2019, 10:28 a.m.