Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
geostatistics [2018/02/15 20:57]
qcbs [Books]
geostatistics [2025/12/02 15:39] (current)
qcbs [R packages]
Line 1: Line 1:
 ====== Introduction to geostatistics with R ====== ====== Introduction to geostatistics with R ======
  
- +Online. Instructor: Guillaume Larocque ([email protected]). ​
-February 16, 2018. McGill University. Instructor: Guillaume Larocque ([email protected]). ​+
  
 ===== Presentation ===== ===== Presentation =====
  
-[[https://​prezi.com/​gmp5qbmpnpds/introduction-to-geostatistics-with-r-qcbs-workshop/|Prezi presentation]]+[[https://​prezi.com/​view/yjD0wcl7coF4wBJpeNTS/|Prezi presentation]]
  
-[[http://​prezi.com/​gmp5qbmpnpds/​present/?​auth_key=3wgc103&​follow=GuillaumeLarocque&​kw=present-gmp5qbmpnpds&​rc=ref-19631691|Simultaneous presentation]]+===== R Code ===== 
 +{{ ::​qcbs_geostats_workshop_files_2023.zip ​|Click here to download the zip file containing the scripts and the datasets that will be used during the workshop.}} 
 + 
 +Please extract this zip archive to an easily accessible folder on your computer. ​
  
-{{::​qcbs_workshop_geostatistics.pdf|PDF version}} 
 ===== Ressources ===== ===== Ressources =====
  
 ==== Books ==== ==== Books ====
-  * [[https://link.springer.com/book/​10.1007/​978-1-4614-7618-4|Applied spatial data analysis with R, Bivand, ​Pebesma ​et Gómez-Rubio.]] - Provides a good overview of spatial statistical tools in R. Contains a good chapter on geostatistics. ​+  * [[https://www.routledge.com/Spatial-Data-Science-With-Applications-in-R/Pebesma-Bivand/​p/​book/​9781138311183|Spatial Data Science - With applications in R.]] - Provides a good overview of spatial statistical tools in R. Contains a good chapter on geostatistics. ​The online version of the book can be found [[https://​r-spatial.org/​book/​|here]]
   * [[http://​www.amazon.ca/​Geostatistics-Natural-Resources-Evaluation-Goovaerts/​dp/​0195115384|Geostatistics for Natural Resources Evaluation, Pierre Goovaerts.]] - Very good book, which provides a more in-depth coverage of geostatistical theory. ​   * [[http://​www.amazon.ca/​Geostatistics-Natural-Resources-Evaluation-Goovaerts/​dp/​0195115384|Geostatistics for Natural Resources Evaluation, Pierre Goovaerts.]] - Very good book, which provides a more in-depth coverage of geostatistical theory. ​
   * [[http://​www.lu.lv/​materiali/​biblioteka/​es/​pilnieteksti/​vide/​A%20Practical%20Guide%20to%20Geostatistical%20Mapping%20of%20Environmental%20Variables.pdf|A Practical Guide to Geostatistical Mapping of Environmental Variables (PDF)]]   * [[http://​www.lu.lv/​materiali/​biblioteka/​es/​pilnieteksti/​vide/​A%20Practical%20Guide%20to%20Geostatistical%20Mapping%20of%20Environmental%20Variables.pdf|A Practical Guide to Geostatistical Mapping of Environmental Variables (PDF)]]
Line 20: Line 21:
   * {{:​gisonr.pdf|Analyses spatiales sous R}} - Document préparé par Nicolas Casajus pour un cours offert à l'UQAR à l'​hiver 2013.    * {{:​gisonr.pdf|Analyses spatiales sous R}} - Document préparé par Nicolas Casajus pour un cours offert à l'UQAR à l'​hiver 2013. 
 ==== Papers of interest ==== ==== Papers of interest ====
-  * [[http://​www.esajournals.org/​doi/​abs/​10.2307/​2937096|Geostatistical Tools for Modeling and Interpreting Ecological Spatial Dependence]] 
   * [[http://​link.springer.com/​article/​10.1023/​A%3A1012734519752|GIS and geostatistics:​ Essential partners for spatial analysis]]   * [[http://​link.springer.com/​article/​10.1023/​A%3A1012734519752|GIS and geostatistics:​ Essential partners for spatial analysis]]
-  * [[http://​www.ecoscience.ulaval.ca/​en/​paper/​spatial-autocorrelation-and-statistical-tests-in-ecology-fait-parti-du-numero-thematique-sur-les-analyses-spatiales-en-ecologie-part-of-the-special-feature-on-spatial-analyses-in-ecology|Spatial autocorrelation and statistical tests in ecology]] 
   * [[http://​www.esajournals.org/​doi/​pdf/​10.1890/​0012-9658(2003)084%5B1045:​SCIPCI%5D2.0.CO%3B2|Spatial covariance in plant communities:​ intergrating ordination, geostatistics and variance testing]]   * [[http://​www.esajournals.org/​doi/​pdf/​10.1890/​0012-9658(2003)084%5B1045:​SCIPCI%5D2.0.CO%3B2|Spatial covariance in plant communities:​ intergrating ordination, geostatistics and variance testing]]
   * [[http://​link.springer.com/​article/​10.1007/​s10651-008-0090-z|Coregionalization analysis with a drift for multi-scale assessment of spatial relationships between ecological variables]]   * [[http://​link.springer.com/​article/​10.1007/​s10651-008-0090-z|Coregionalization analysis with a drift for multi-scale assessment of spatial relationships between ecological variables]]
  
 ==== R packages ==== ==== R packages ====
-  * [[http://​www.gstat.org|Gstat website.]] 
   * [[http://​cran.r-project.org/​web/​packages/​gstat/​|Gstat package]] - Gstat R package. ​   * [[http://​cran.r-project.org/​web/​packages/​gstat/​|Gstat package]] - Gstat R package. ​
   * [[http://​cran.r-project.org/​web/​packages/​geoR/​|geoR package geoR]] - Another package for geostatistics in R.    * [[http://​cran.r-project.org/​web/​packages/​geoR/​|geoR package geoR]] - Another package for geostatistics in R. 
 +  * [[https://​geodacenter.github.io/​rgeoda/​|rgeoda]] - R package for spatial data analysis. ​
 +  * [[https://​github.com/​r-spatial/​qgisprocess|qgisprocess]] - Package that allows you to run QGIS scripts within R. 
  
 ==== Educational software ==== ==== Educational software ====
Line 35: Line 35:
 {{::​e_z_kriging.zip|EZ-Kriging}} Small Windows software that facilitates understanding of kriging equations. ​ {{::​e_z_kriging.zip|EZ-Kriging}} Small Windows software that facilitates understanding of kriging equations. ​
  
-===== R Code ===== 
  
-{{::qcbs_geostats_workshop_files.zip|Click here to download the zip file containing the scripts and the datasets that will be used during the workshop.}} +==== Courses ==== 
- +[[https://www.teluq.ca/​site/​etudes/​offre/​cours/​TELUQ/​SCI%201031/​|Visualisation et analyse de données spatiales avec R. ]]. Course offered at Teluq. The course material can be found [[https://​sci1031.github.io/​sci1031/​|here.]]
-Please extract this zip archive to an easily accessible folder on your computer+
  
 ===== How to create a mask in QGIS ===== ===== How to create a mask in QGIS =====
Line 47: Line 45:
 You can digitize the boundary of your study site from a Google Satellite layer by following the following steps: ​ You can digitize the boundary of your study site from a Google Satellite layer by following the following steps: ​
   - Open QGIS.    - Open QGIS. 
-  - Activate ​the '​OpenLayers ​Plugin' in the list of Extensions +  - Install and activate ​the QuickMapServices ​Plugin= 
-  - Add a Google Satellite layer by using the OpenLayers ​extension (Web/OpenLayers Plugin). +  - Add a Google Satellite layer by using the QuickMapServices ​extension (Web/QuickMapServices). You might need to enable additional providers in the Plugin settings 
-  - Note that the CRS of the canvas is now '​Google Mercator'​ (WGS 84 / Pseudo mercator)+  - Note that the CRS of the canvas is now WGS 84 / Pseudo mercator ​and units are in meters
   - If you have other vector layer that can help you define the limits of your study area, you can add them to the canvas by clicking on the 'add vector layer' icon.   - If you have other vector layer that can help you define the limits of your study area, you can add them to the canvas by clicking on the 'add vector layer' icon.
   - Digitize the zone defining your study area. You first need to add a new polygon shapefile layer under Layer>​New>​New Shapefile layer. Specify the proper CRS depending on the extent of your study area and specify a name for your layer. It is always preferable to work with a reference system that uses meters as units, such as UTM (medium extent), MTM (small extent in Quebec) or Lambert (large extent). Refrain from using a latitude/​longitude system. ​   - Digitize the zone defining your study area. You first need to add a new polygon shapefile layer under Layer>​New>​New Shapefile layer. Specify the proper CRS depending on the extent of your study area and specify a name for your layer. It is always preferable to work with a reference system that uses meters as units, such as UTM (medium extent), MTM (small extent in Quebec) or Lambert (large extent). Refrain from using a latitude/​longitude system. ​
Line 63: Line 61:
  
 <​file>​ <​file>​
-mask<-readGDAL(file.choose())+mask<-read_stars(file.choose())
 </​file>​ </​file>​
  
Line 71: Line 69:
  
 <​file>​ <​file>​
-mask@data[mask@data==0]=NA+mask[mask==0]=NA
 </​file>​ </​file>​