R/view_in.R
view_mapview_from_path.RdReads a spatial data file (.shp or .gpkg) and optionally displays it in an interactive map preview.
macOS only: tabular viewing uses view_vd_nonint(), which is not supported on Windows or Linux;
on those systems the function stops with an error.
view_mapview_from_path(path, preview = FALSE)Returns nothing, called for side effects
Requires macOS because the workflow always opens the attribute table with VisiData
via view_vd_nonint(). The function performs the following steps:
Validates that the input file exists and has the correct extension (.shp or .gpkg)
Creates a temporary HTML file for the map preview in ~/.local/share/mapview/
Reads the spatial data using sf::read_sf()
If preview=TRUE, creates an interactive map using mapview and opens it in the browser
Opens the attribute data in VisiData