Skip to contents

This function can be used to read a portfolio object that was previously written to disk via write_portfolio() back into R as an sf object. It should specifically be directed against a GeoPackage which was the output of write_portfolio(), otherwise the function is very likely to fail. All available indicators will be read back into R as nested list columns reflecting the output once calc_indicators() has been called.

Usage

read_portfolio(file, ...)

Arguments

file

A character vector pointing to a GeoPackage that has been previously written to disk via write_portfolio()

...

Additional arguments supplied to st_read()

Value

An sf object object with nested list columns for every indicator table found in the GeoPackage source file.

Details

Important Note Portfolio-wide attributes that were specified via init_portfolio() will not be reconstructed. The reason is that users most likely exported to a GeoPackage in order to share their data, thus the file is very likely to be opened on a different machine / in a different working directory. Users can simply apply init_portfolio() on the object to re-set these attributes.