function to convert data to sf object

to_spatial(df, crs)

Arguments

df

data frame

crs

coordinate reference system to convert the sf object to