Geospatial data types,
CRS, and
NASS

Geospatial data types

2 main geospatial data types

  1. Vector

  2. Raster

Vector formats

Commonly known as shapefiles (ESRI nomenclature)

Format Extension

ESRI shapefile

.shp, .shx, .dbf., .prj

GeoJSON

.json, .geojson

KML

.kml, .kmz

Vector types

Vector data comprises points, lines, polygons, and their combinations.

Vector data in R

  • package sp:
    • first to be created
    • complicated file structure (data + spatial info)
    • difficult to manipulate data frame
    • not pipeable
  • package sf:
    • newer than sp
    • addresses sp shortcomings
    • this is what we will use

Raster formats

Most common in ag is .tif.

Format Extension

TIFF/COG

.tiff, .tif, .tff

ASCII Grid

.asc

Bitmap

.bmp

Full list here

Raster types

Raster data is normally originated from an imagery source OR point-based interpolated map/grid (continuous coverage).

Raster data in R

  • packages raster and terra:
    • raster was first in R
    • terra newer, faster, not pipeable
  • package stars:
    • newer than raster
    • pipeable
    • shares concepts with sf
    • this is what we will use (for the most part)

Vector vs. Raster

 

 

Coordinate reference systems (crs)

Geographic vs. Projected

Geographic coordinate systems

  • Lat/Long (WGS84) most common

Projected coordinate system

  • Universal Transverse Mercator (UTM) most common
  • UTM has zones
  • In GA, 2 zones (16N, 17N)

 

Geographic (°) vs. Projected (m)

Quick reference for different CRSs

Quiz time

Geospatial data types quiz

List each geospatial data layer in the map below (give a descriptive name), and tell me if it is vector or raster. Tip: look closely, there are more than 2.

Send me your answer by email to lmbastos@uga.edu. You have 5 min (this will count for your attendance too).

USDA National Agricultural Statistics Service (NASS) data

USDA NASS

  • LOTS of information about US agriculture
  • Some examples:
    • planted and harvested area time series
    • yield time series
    • production time series
  • For lots of different crops, and different geographic levels (from county to nation)

USDA NASS QuickStats portal

  • USDA portal to query and download NASS data
  • Free, open source data
  • Feel free to explore following this link

Advanced PA and NASS

Let’s download some data and bring into R

  • Go to the portal
  • Let’s query and download data for soybeans production in bushels in GA at the county level for all years available
  • went to browser…

Query selections

Sector: CROPS
Group: FIELD CROPS
Commodity: SOYBEANS
Category: PRODUCTION
Data item: PRODUCTION MEASURED IN BU
Geographic level: COUNTY
State: GEORGIA
Year: select all
Click “Get data”
Click “Spreadsheet”

After downloading…

Rename file to soybeans_nass.csv
In your course folder, create “02 NASS” folder
Inside it, create data, code, output
Move soybeans_nass.csv into data
Launch RStudio, create a new project at the 02 NASS folder level
Create a new script file (quarto)
Let’s explore this data set