Skip to contents

Split a sf data.frame with information commune by department. commune information is mandatory in input.

Usage

split_dep(x, admin_dep = NULL)

Arguments

x

sf object.

admin_dep

sf object.

Value

A list of sf objects.

Details

The information in commune is interpreted to construct a first version of department for each observation.

If admin_dep is given, a sf::st_intersects() is performed to get departement from geographic perspective. A consistency analysis between both versions is done. In case of inconsistencies, messages ar thrown. The geographic perspective is kept.