The goal of mastermapr is to make it easy to get your OS data imported into open source software for reproducible data science and analysis (#rspatial).
You can install the development version of mastermapr from GitHub with:
# install.packages("devtools")
devtools::install_github("acteng/mastermapr")
This is a basic example which shows you can read in road data for GB with the package:
library(mastermapr)
# This takes around 30 s on decent laptop as of 2023
# so should be around 10 min for full dataset:
system.time({
mm_data = mm_read(directory, pattern = "RoadLink", n_files = 8) # 5% of GB files
})
# saveRDS(mm_data, "mm_data_RoadLink.Rds")
That may not be the fastest read time in the world (QGIS is a bit faster at importing all 174 files) but unlike QGIS it results in a single object. Attempting to merge the layers in QGIS resulted in the following error: