read_lat_lon_csv: read in and format input file for DeGAUSS container

View source: R/read_lat_lon_csv.R

read_lat_lon_csvR Documentation

read in and format input file for DeGAUSS container

Description

read in and format input file for DeGAUSS container

Usage

read_lat_lon_csv(
  filename,
  nest_df = FALSE,
  sf_out = FALSE,
  project_to_crs = NULL
)

Arguments

filename

name of input file, probably opt$filename if inside container

nest_df

logical. If TRUE, data is nested on lat/lon. Defaults to FALSE.

sf_out

logical. If TRUE, data is converted as an sf object. Defaults to FALSE.

project_to_crs

(optional) if sf_out=TRUE, the crs to which input data is projected. If unspecified and sf_out=TRUE, the crs defaults to 4326.

Value

a list with two elements. The first is the raw_data as it is read in from the input file. The second is a tibble nested on lat and lon to prevent duplication of geomarker computations. If sf_out=TRUE the second is an sf object.

Examples

## Not run: 
d <- read_lat_lon_csv(filename = "test/my_address_file_geocoded.csv")
d <- read_lat_lon_csv(
  filename = "test/my_address_file_geocoded.csv",
  sf_out = TRUE, project_to_crs = 5072
)

## End(Not run)


degauss-org/dht documentation built on Oct. 28, 2023, 1:20 a.m.