Description Usage Arguments Value
View source: R/utility_functions.R
Converts a sf data frame with panel data to PRIO-GRID.
1 | panel_to_pg(df, timevar, variable, need_aggregation, missval, fun)
|
df |
a sf (simple features) data frame with panel data |
timevar |
the temporal variable (used to split data into crossections) |
variable |
the variable to convert to PRIO-GRID |
need_aggregation |
if FALSE, will use velox, which only extracts the last value for each feature. fast when applicable. |
missval |
only used if need_aggregation is FALSE. velox sets missing data to this value. |
fun |
aggregation function. only used if need_aggregation is TRUE. |
A tibble with x, y, pgid, timevar, and variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.