Description Usage Arguments Value
This function should be used as the last step of the following process: 1) Data is loaded in raw form using one of the available options (load_all_as_list or load_nc_with_time). 3) If the loading process is performed using load_all_as_list, cropping of the selected geographical area can be then performed using the crop_selected_area function. In case the loading process is perfomed with the function load_nc_with_time the cropping is performed at load time. 2) Interpolation is performed to obtain a different resolution of the spatial images based on a given reference dataframe. 3) The function assign_id_from_reference can be finally used to match the id_pixel in the reference dataframe to each pair of longitude and latitude.
1 2 | assign_id_from_reference(df, reference_df, coordinates = c("lon", "lat"),
id_name = "id_pixel", arrange_order = c("id_pixel", "id_date"))
|
df |
a dplyr dataframe to be assigned an id according to a reference dataframe. |
reference_df |
dataframe containing at least the following variables: longitude, latitude and id_pixel (a unique identifier for each pixel). |
coordinates |
names of spatial coordinates latitude and longitude in the reference dataframe |
id_name |
name of the unique identifier in the reference dataframe |
arrange_order |
how to arrange the output? Default: by id_pixel, then by id_date. |
Returns a dplyr dataframe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.