class: center, middle, inverse, title-slide # Visualizing GeoData with R ## Introduction to sf & tmap ### Thomas Lo Russo & Max Grütter ### 2018/18/04 --- class: center, middle 1. **Simple Features** - the simple way of working with geodata in R 2. **Tmap** - beautiful static & interactive thematic maps ## Code & Examples: https://tlorusso.github.io/geodata_workshop/sf_package https://tlorusso.github.io/geodata_workshop/tmap_package --- class: middle, inverse # Simple Features **Simple feature** access is a standard for **accessing and exchanging** spatial data (points, lines, polygons) as well as for operations defined on them that has been adopted widely over the past ten years, not only by spatial databases such as PostGIS, but also more recent standards such as GeoJSON. https://en.wikipedia.org/wiki/Simple_Features Implemented in R in the **sf-package** https://www.r-consortium.org/blog/2017/01/03/simple-features-now-on-cran http://r-spatial.github.io/sf/ --- class: middle # sf-package 1. Reading Writing and Converting Simple Features to/from various Formats 2. Manipulating Simple Features and its Geometries 3. Plotting Simple Features # Lets have a look at some examples: https://tlorusso.github.io/geodata_workshop/sf_package --- # Should i use sf instead of sp? The recent development of the sf package has modernized the implementation of spatial data in R and made it possible to integrate spatial data into the tidyverse and ggplot2 plotting system. sf has made it easier to work with spatial data in R by **minimizing the distinction between spatial data and other forms of data** you might deal with in R. However, there still remain uses for the sp package! For a detailed discussion: https://www.jessesadler.com/post/gis-with-r-intro/ Where I've started: https://www.datacamp.com/courses/spatial-analysis-in-r-with-sf-and-raster --- class: middle, inverse # tmap - thematic Maps in R ### Examples: https://tlorusso.github.io/geodata_workshop/tmap_package **Github-repository** https://github.com/mtennekes/tmap **Useful Links** https://cran.r-project.org/web/packages/tmap/vignettes/tmap-nutshell.html http://rstudio-pubs-static.s3.amazonaws.com/229482_b5b182f650434a36ace4eeef2d2bcd83.html#1