Conclusion
We have covered a lot of ground in this text. In the first part, we explored the foundations of working in R: base R syntax and data models, data wrangling with the tidyverse, functions, loops, and control flow, working with dates and times, building graphs with ggplot2 and tables with gt, and performing statistical inference. In the second part, we applied these skills to geospatial data. We created static maps with tmap; processed vector data with sf; processed raster data, multispectral imagery, and digital terrain data with terra; downloaded Earth observation data from STAC catalogs; processed airborne and close-range lidar data with lidR and arbor; accessed external geospatial software using whitebox; implemented GEOBIA; explored spatial statistics; and built interactive web maps with leaflet.
A key benefit of R is that all of these tasks can be completed in a single environment. Data can be downloaded, cleaned, processed, analyzed, visualized, and reported using code, which makes workflows reproducible, documented, and easy to update or apply to new data or study areas. Many of the examples in this text combined techniques from multiple chapters. For example, tidyverse syntax was used to wrangle the attribute tables of sf objects, and tmap and ggplot2 were used throughout to visualize data and results. We hope you have started to see how these tools fit together.
As with any language, the best way to improve your R skills is to practice. We encourage you to apply the methods discussed here to your own data and problems. You will run into issues not covered in this text. Fortunately, R has a large and active user community, and help is readily available through package documentation, vignettes, and online forums. If you would like to continue learning, we recommend Geocomputation with R by Lovelace, Nowosad, and Muenchow, Spatial Data Science with Applications in R by Pebesma and Bivand, and R for Data Science by Wickham, Çetinkaya-Rundel, and Grolemund, all of which are freely available online. For more specialized topics, The lidR Package and Arbor: The Complete R Tutorial Book offer much more detailed treatments of lidar processing with lidR and arbor than we were able to provide here. If you would like to use Quarto to combine your code, results, and writing into reproducible reports, websites, or books, as we did to create this text, we recommend Quarto for Scientists by Nicholas Tierney. If you are interested in using the skills developed here for spatial predictive mapping and modeling, our Geospatial Supervised Learning using R text explores machine learning and deep learning for geospatial applications.
Thank you for working through this text. We hope that it has provided you with a solid foundation for working with and analyzing geospatial data in R. We would also like to thank AmericaView for supporting the development of this text and its mission of advancing Earth observation education.