Last updated: 2024-12-27

Checks: 7 0

Knit directory: R_tutorial/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20241223) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 81a8887. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/Basic_Operations_with_Raster_Data.Rmd

Unstaged changes:
    Modified:   analysis/_site.yml
    Deleted:    analysis/about.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/Understanding_Geospatial_Data.Rmd) and HTML (docs/Understanding_Geospatial_Data.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 81a8887 Ohm-Np 2024-12-27 wflow_publish("analysis/Understanding_Geospatial_Data.Rmd")
html 4bc3232 Ohm-Np 2024-12-25 Build site.
Rmd 0d2b4ca Ohm-Np 2024-12-25 wflow_publish("analysis/Understanding_Geospatial_Data.Rmd")
html 2f2da2a Ohm-Np 2024-12-25 Build site.
Rmd 6070788 Ohm-Np 2024-12-25 wflow_publish("analysis/Understanding_Geospatial_Data.Rmd")
html cb616b9 Ohm-Np 2024-12-24 Build site.
Rmd 9df556f Ohm-Np 2024-12-24 wflow_publish("analysis/Understanding_Geospatial_Data.Rmd")

Geospatial data refers to data that is associated with a specific location on the Earth’s surface. This data often includes both geographic coordinates (e.g., latitude and longitude) and information about the features or phenomena at those locations. Understanding geospatial data is essential for performing spatial analysis, as it helps you examine patterns, relationships, and distributions across geographical areas. Geospatial data can be represented in two main forms: vector data and raster data, each serving different purposes and requiring different approaches for analysis.

Types of Geospatial Data

1. Vector Data:

Vector data represents geographical features as points, lines, and polygons. These features are defined by their precise coordinates, making vector data ideal for representing discrete geographic objects like roads, rivers, cities, or boundaries. Vector data is highly efficient for modeling complex shapes with detailed attributes (e.g., a city boundary with population data). The most common types of vector data are:

  • Points: Represent specific locations, such as a city or a well.
  • Lines: Represent linear features, such as rivers, roads, or railway tracks.
  • Polygons: Represent areas, such as countries, lakes, or land parcels.

2. Raster Data:

Raster data represents geographical features using a grid of cells or pixels, where each cell holds a value representing some characteristic (e.g., temperature, elevation, or land cover). Each pixel in the raster corresponds to a specific area of the Earth’s surface. Raster data is ideal for continuous data, such as satellite imagery, climate data, or elevation models. Raster datasets are commonly used in environmental studies, remote sensing, and terrain analysis, as they can capture large-scale phenomena over broad regions.

Common File Formats

Geospatial data is stored in various file formats, depending on the type of data and the software being used. Some of the most common file formats for vector and raster data include:

1. Shapefile:

The Shapefile format (.shp) is one of the most widely used formats for storing vector data. It stores geometric shapes (points, lines, or polygons) and their associated attribute data in separate files, which must be used together. The Shapefile format consists of a set of files with extensions like .shp (geometry), .shx (shape index), and .dbf (attribute data). Shapefiles are supported by most GIS software, making them highly interoperable.

2. GeoPackage:

The GeoPackage (.gpkg) is an open, standardized format for storing both vector and raster data. Unlike Shapefiles, which require multiple files to store different data types, GeoPackages store all the data in a single SQLite database file. This makes GeoPackage a more compact and efficient format for managing complex datasets. It supports spatial data types and is becoming increasingly popular due to its flexibility and ability to handle both types of geospatial data in one file.

3. GeoTIFF:

The GeoTIFF (.tif) format is a raster data format that stores geospatial information (such as coordinates, projection, and resolution) along with pixel values. This format is commonly used for satellite imagery, elevation models, and other geospatial raster data. The GeoTIFF format preserves spatial reference information, which is crucial for accurate geospatial analysis. It is widely supported by both open-source and commercial GIS tools, making it a go-to format for working with raster data.

These formats, along with the understanding of vector and raster data, provide a solid foundation for conducting geospatial analysis. Depending on the type of data you work with and the analysis you wish to perform, you may choose the appropriate file format to suit your needs.

However, in this tutorial, we will primarily work with geopackage and tiff format.


sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=English_Germany.utf8  LC_CTYPE=English_Germany.utf8   
[3] LC_MONETARY=English_Germany.utf8 LC_NUMERIC=C                    
[5] LC_TIME=English_Germany.utf8    

time zone: Europe/Berlin
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] workflowr_1.7.1

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       httr_1.4.7        cli_3.6.3         knitr_1.48       
 [5] rlang_1.1.4       xfun_0.47         stringi_1.8.4     processx_3.8.4   
 [9] promises_1.3.0    jsonlite_1.8.8    glue_1.7.0        rprojroot_2.0.4  
[13] git2r_0.33.0      htmltools_0.5.8.1 httpuv_1.6.15     ps_1.8.1         
[17] sass_0.4.9        fansi_1.0.6       rmarkdown_2.28    jquerylib_0.1.4  
[21] tibble_3.2.1      evaluate_0.24.0   fastmap_1.2.0     yaml_2.3.10      
[25] lifecycle_1.0.4   whisker_0.4.1     stringr_1.5.1     compiler_4.4.0   
[29] fs_1.6.4          pkgconfig_2.0.3   Rcpp_1.0.13       rstudioapi_0.16.0
[33] later_1.3.2       digest_0.6.36     R6_2.5.1          utf8_1.2.4       
[37] pillar_1.9.0      callr_3.7.6       magrittr_2.0.3    bslib_0.8.0      
[41] tools_4.4.0       cachem_1.1.0      getPass_0.2-4