-
lucas.longour_ird.fr authoredlucas.longour_ird.fr authored
search.json 9.94 KiB
[
{
"objectID": "01-introduction.html",
"href": "01-introduction.html",
"title": "1 Introduction",
"section": "",
"text": "Historically, 4 packages make it possible to import, manipulate and transform spatial data:\n\nThe package rgdal (Bivand, Keitt, and Rowlingson 2022) which is an interface between R and the GDAL (GDAL/OGR contributors, n.d.) and PROJ (PROJ contributors 2021) libraries allow you to import and export spatial data (shapefiles for example) and also to manage cartographic projections\n\nThe package sp (E. J. Pebesma and Bivand 2005) provides class and methods for vector spatial data in R. It allows displaying background maps, inspectiong an attribute table etc.\n\nThe package rgeos (Bivand and Rundel 2021) gives access to the GEOS spatial operations library and therefore makes classic GIS operations available: calculation of surfaces or perimeters, calculation of distances, spatial aggregations, buffer zones, intersections, etc.\n\nThe package raster (Hijmans 2022a) is dedicated to the import, manipulation and modeling of raster data.\n\nToday, the main developments concerning vector data have moved away from the old 3 (sp, rgdal, rgeos) to rely mainly on the package sf ((E. Pebesma 2018a), (E. Pebesma 2018b)). In this manual we will rely exclusively on this package to manipulate vector data.\nThe packages stars (E. Pebesma 2021) and terra (Hijmans 2022b) come to replace the package raster for processing raster data. We have chosen to use the package here terra for its proximity to the raster."
},
{
"objectID": "01-introduction.html#the-package-sf",
"href": "01-introduction.html#the-package-sf",
"title": "1 Introduction",
"section": "1.2 The package sf",
"text": "1.2 The package sf\n The package sf was released in late 2016 by Edzer Pebesma (also author of sp). Its goal is to combine the feature of sp, rgeos and rgdal in a single, more ergonomic package. This package offers simple objects (following the simple feature standard) which are easier to manipulate. Particular attention has been paid to the compatibility of the package with the pipe syntax and the operators of the tidyverse.\nsf directly uses the GDAL, GEOS and PROJ libraries.\n\n\n\n\n\nFrom r-spatial.org\n\n\n\n\n\n\nWebsite of package sf :\nSimple Features for R\n\n\n\n\n1.2.1 Format of spatial objects sf\n\n\n\n\n\nObjectssf are objects in data.frame which one of the columns contains geometries. This column is the class of sfc (simple feature column) and each individual of the column is a sfg (simple feature geometry). This format is very practical insofa as the data and the geometries are intrinsically linked in the same object.\n\n\n\n\n\n\nThumbnail describing the simple feature format:\nSimple Features for R\n\n\n\n\n\n\n\n\n\nTip\n\n\n\nA benchmark of vector processing libraries is available here."
},
{
"objectID": "01-introduction.html#package-mapsf",
"href": "01-introduction.html#package-mapsf",
"title": "1 Introduction",
"section": "1.3 Package mapsf",
"text": "1.3 Package mapsf\nThe free R software spatial ecosystem is rich, dynamic and mature and several packages allow to import, process and represent spatial data. The package mapsf (Giraud 2022) relies on this ecosystem to integrate the creation of quality thematic maps into processing chains with R.\nOther packages can be used to make thematic maps. The package ggplot2 (Wickham 2016), in association with the package ggspatial (Dunnington 2021), allows for example to display spatial objects and to make simple thematic maps. The package tmap (Tennekes 2018) is dedicated to the creation of thematic maps, it uses a syntax close to that of ggplot2 (sequence of instructions combined with the ‘+’ sign). Documentation and tutorials for using these two packages are readily available on the web.\nHere, we will mainly use the package mapsf whose functionalities are quite complete and the handling rather simple. In addition, the package is relatively light.\n\nmapsf allows you to create most of the types of map usually used in statistical cartography (choropleth maps, typologies, proportional or graduated symbols, etc.). For each type of map, several parameters are used to customize the cartographic representation. These parameters are the same as those found in the usual GIS or cartography software (for example, the choice of discretizations and color palettes, the modification of the size of the symbols or the customization of the legends). Associated with the data representation functions, other functions are dedicated to cartographic dressing (themes or graphic charters, legends, scales, orientation arrows, title, credits, annotations, etc.), the creation of boxes or the exporting maps.\nmapsf is the successor of cartography (Giraud and Lambert 2016), it offers the same main functionalities while being lighter and more ergonomic.\nTo use this package several sources can be consulted:\n\nThe package documentation accessible on the internet or directly in R (?mapsf),\nA cheat sheet,\n\n\n\n\n\n\n\nThe vignettes associated with the package show sample scripts,\nThe R Geomatics blog which provides resources and examples related to the package and more generally to the R spatial ecosystem."
},
{
"objectID": "01-introduction.html#the-package-terra",
"href": "01-introduction.html#the-package-terra",
"title": "1 Introduction",
"section": "1.4 The package terra",
"text": "1.4 The package terra\n The package terra was release in early 2020 by Robert J. Hijmans (also author of raster). Its objective is to propose methods of treatment and analysis of raster data. This package is very similar to the package raster; but it has more features, it’s easier to use, and it’s faster.\n\n\n\n\n\n\nWebsite of package terra :\nSpatial Data Science with R and “terra”\n\n\n\n\n\n\n\n\n\nTip\n\n\n\nA benchmark of raster processing libraries is available here.\n\n\n\n\n\n\nBivand, Roger, Tim Keitt, and Barry Rowlingson. 2022. “Rgdal: Bindings for the ’Geospatial’ Data Abstraction Library.” https://CRAN.R-project.org/package=rgdal.\n\n\nBivand, Roger, and Colin Rundel. 2021. “Rgeos: Interface to Geometry Engine - Open Source (’GEOS’).” https://CRAN.R-project.org/package=rgeos.\n\n\nDunnington, Dewey. 2021. “Ggspatial: Spatial Data Framework for Ggplot2.” https://CRAN.R-project.org/package=ggspatial.\n\n\nGDAL/OGR contributors. n.d. GDAL/OGR Geospatial Data Abstraction Software Library. Open Source Geospatial Foundation. https://gdal.org.\n\n\nGiraud, Timothée. 2022. “Mapsf: Thematic Cartography.” https://CRAN.R-project.org/package=mapsf.\n\n\nGiraud, Timothée, and Nicolas Lambert. 2016. “Cartography: Create and Integrate Maps in Your r Workflow” 1. https://doi.org/10.21105/joss.00054.\n\n\nHijmans, Robert J. 2022a. “Raster: Geographic Data Analysis and Modeling.” https://CRAN.R-project.org/package=raster.\n\n\n———. 2022b. “Terra: Spatial Data Analysis.” https://CRAN.R-project.org/package=terra.\n\n\nPebesma, Edzer. 2018a. “Simple Features for r: Standardized Support for Spatial Vector Data” 10. https://doi.org/10.32614/RJ-2018-009.\n\n\n———. 2018b. “Simple Features for R: Standardized Support for Spatial Vector Data.” The R Journal 10 (1): 439. https://doi.org/10.32614/rj-2018-009.\n\n\n———. 2021. “Stars: Spatiotemporal Arrays, Raster and Vector Data Cubes.” https://CRAN.R-project.org/package=stars.\n\n\nPebesma, Edzer J., and Roger S. Bivand. 2005. “Classes and Methods for Spatial Data in r” 5. https://CRAN.R-project.org/doc/Rnews/.\n\n\nPROJ contributors. 2021. PROJ Coordinate Transformation Software Library. Open Source Geospatial Foundation. https://proj.org/.\n\n\nTennekes, Martijn. 2018. “Tmap: Thematic Maps in r” 84. https://doi.org/10.18637/jss.v084.i06.\n\n\nWickham, Hadley. 2016. “Ggplot2: Elegant Graphics for Data Analysis.” https://ggplot2.tidyverse.org."
},
{
"objectID": "references.html",
"href": "references.html",
"title": "References",
"section": "",
"text": "Bivand, Roger, Tim Keitt, and Barry Rowlingson. 2022. “Rgdal:\nBindings for the ’Geospatial’ Data Abstraction Library.” https://CRAN.R-project.org/package=rgdal.\n\n\nBivand, Roger, and Colin Rundel. 2021. “Rgeos: Interface to\nGeometry Engine - Open Source (’GEOS’).” https://CRAN.R-project.org/package=rgeos.\n\n\nDunnington, Dewey. 2021. “Ggspatial: Spatial Data Framework for\nGgplot2.” https://CRAN.R-project.org/package=ggspatial.\n\n\nGDAL/OGR contributors. n.d. GDAL/OGR Geospatial Data\nAbstraction Software Library. Open Source Geospatial Foundation. https://gdal.org.\n\n\nGiraud, Timothée. 2022. “Mapsf: Thematic Cartography.” https://CRAN.R-project.org/package=mapsf.\n\n\nGiraud, Timothée, and Nicolas Lambert. 2016. “Cartography: Create\nand Integrate Maps in Your r Workflow” 1. https://doi.org/10.21105/joss.00054.\n\n\nHijmans, Robert J. 2022a. “Raster: Geographic Data Analysis and\nModeling.” https://CRAN.R-project.org/package=raster.\n\n\n———. 2022b. “Terra: Spatial Data Analysis.” https://CRAN.R-project.org/package=terra.\n\n\nPebesma, Edzer. 2018b. “Simple Features for r:\nStandardized Support for Spatial Vector Data” 10. https://doi.org/10.32614/RJ-2018-009.\n\n\n———. 2018a. “Simple Features for R: Standardized Support for\nSpatial Vector Data.” The R Journal 10 (1): 439. https://doi.org/10.32614/rj-2018-009.\n\n\n———. 2021. “Stars: Spatiotemporal Arrays, Raster and Vector Data\nCubes.” https://CRAN.R-project.org/package=stars.\n\n\nPebesma, Edzer J., and Roger S. Bivand. 2005. “Classes and Methods\nfor Spatial Data in r” 5. https://CRAN.R-project.org/doc/Rnews/.\n\n\nPROJ contributors. 2021. PROJ Coordinate Transformation\nSoftware Library. Open Source Geospatial Foundation. https://proj.org/.\n\n\nTennekes, Martijn. 2018. “Tmap: Thematic\nMaps in r” 84. https://doi.org/10.18637/jss.v084.i06.\n\n\nWickham, Hadley. 2016. “Ggplot2: Elegant Graphics for Data\nAnalysis.” https://ggplot2.tidyverse.org."
}
]