Read a project from disk.

read_manual_project(
  spreadsheet_path,
  parameters,
  spatial_path = NULL,
  name = tools::file_path_sans_ext(basename(spreadsheet_path)),
  author_name = get_golem_config("default_project_name"),
  author_email = get_golem_config("default_project_email")
)

Arguments

spreadsheet_path

character file path for the spreadsheet data.

parameters

list object to interpret spreadsheet data.

spatial_path

character file path for the spatial data. Defaults to NULL such that no spatial data are imported.

name

character name for the project. Defaults to a value derived from the argument to spreadsheet_path.

author_name

character name for the author of the project. Defaults to a parameter specified in the Golem configuration file.

author_email

character contact email for the project. Defaults to a parameter specified in the Golem configuration file.

Value

A list containing the following elements:

name

A character value indicating the name.

author_name

A character indicating the author name for the data.

author_email

A character indicating the contact email for the data.

project

A Project object.

Examples

# specify file paths
f1 <- system.file(
  "extdata", "projects", "simulated-data", "simulated-data.xlsx",
  package = "whattodo"
)
f2 <- system.file(
  "extdata",  "projects", "simulated-data", "simulated-data.shp",
  package = "whattodo"
)

# read project
x <- read_manual_project(f1, whatdataio::read_data_configuration(), f2)

# print project
print(x)
#> $name
#> [1] "simulated-data"
#> 
#> $author_name
#> [1] "Richard Schuster"
#> 
#> $author_email
#> [1] "richard.schuster@natureconservancy.ca"
#> 
#> $project
#> Project
#>   id:       c93dc3dd-8fe5-480c-89c0-fb5e431aaa5c
#>   sites:    "Johnston's Pond", "Lobster Bay", "Port Joli", "Round Bay"
#>   features: "Salt Marsh", "ACPF", "Freshwater Wetland"
#>   actions:  "Maintain", "Signage", "Restore"
#>   geometry: TRUE
#>