join_df_to_spatial: Joins a dataframe to a spatial datatype based on key'

Description Usage Arguments Value

Description

The function will join a dataframe to spatial data, given the column names of the keys to join by in the dataframe and spatial data. It is best practice to make sure the data in the dataframe all match a value in the spatial data. If there is no match, that row will not be joined to the spatial data.

Usage

1
join_df_to_spatial(dataframe, dataframe_key, spatial_layer, spatial_layer_key)

Arguments

dataframe

A dataframe to be joined.

dataframe_key

The column name in the dataframe to be used as a key to join with the spatial data.

spatial_layer

The spatial object to be joined.

spatial_layer_key

The column name in the spatial object's dataframe (accessed by spatial_layer@data) that will be used as a key to join with the dataframe.

Value

Returns a spatial dataframe object with all columns in the dataframe joined to the spatial databy the key.


dr9593/automapper documentation built on May 21, 2019, 1:22 p.m.