Refactor dependency on package {dm}
I started-off using {dm} to handle the relational nature of the data model in {sit}. However,
-
{dm} brings-in a whole lot of dependencies of its own, including tidyverse packages such as {tidyr}, {dplyr}, {purrr} and others, that I wanted to avoid.
-
{dm} does not play well with spatial {sf} objects, which forced me to work around features and implement myself some of the features (e.g. automatic joins) I wanted from {dm} in the first place.
This makes the trade-off not so favourable to using {dm}, and in retrospective, I'd rather not use it. This implies writing specific code for some joins, and rewriting some tidyverse-style code that I introduced to save some time.
In addition, the sit
class currently inherits from dm
. This could be updated to a simple list of tables (data.frames or sf
objects) and handle the relationships in-code. Otherwise, spatialite
is a spatial extension of SQLite that could perhaps be used to store the data efficiently and with the relationships built-in. But I would have to test how well this works with {sf}, and perhaps this would not be so useful as it is unlikely to have these data file read by other tools.