Author: Caio dos Santos & Fernando Miguez
Date: 2025-11-18

# pacu: Precision Agriculture Computational Utilities

#### Caio dos Santos & Fernando Miguez

#### 2025-11-18

# Introduction

This package is intended to provide a variety of functions that are commonly used when processing data that can be characterized as precision agriculture related. For instance, there are functions to download and process raw satellite images from Sentinel 2. These can be used to investigate spatial patterns within a given area of interest. The package also includes functions that download vegetation index statistics for a given period of time, without the need to download the raw images. These can be used to investigate the temporal variability of a vegetation index across the field, or between fields, for example. There are also functions to download and visualize weather data in a historical context. These can be used to explain temporal variability in crop yield or vegetation index values from between years, or fields. Lastly, the package also contains functions to process yield monitor data. These functions can build polygons around recorded data points, evaluate the overlap between polygons, clean yield data, and smooth yield maps.

# Specific vignettes

1. Satellite data

2. Weather data

3. Yield monitor data

4. Frequently asked questions

# Appendix

Below is a list of files, in alphabetical order, contained in the “inst” folder and their description:

## inst/extdata

- 2012-baswood.(dbf, shp, shx, txt) shapefile containing the raw data used when demonstrating the yield monitor functions. This data comes from publicly available data linked to the STRIPS project.
- boundary.(dbf, prj, shp, shx) shapefile containing the boundary of the field utilized for demonstrating the yield monitor functionalities of the package.
- cobs_a_aoi.(dbf, prj, shp, shx) shapefile used as area of interest in the examples.
- ds-browse-object.rds an example object of the browse_dataspace function.
- example-ndvi-stats.rds example ndvi statistics for the area of interested downloaded with pa_get_vi_stats.
- example-ndvi-stats-2.rds example ndvi statistics for the area of interested downloaded with pa_get_vi_stats.
- S2B_MSIL2A_20230630T165849_N0509_R069_T15TVG_20230630T213917.zip example raw file downloaded from Data Space with download_dataspace. Accessed on 2024-07-31.
- S2B_MSIL2A_20230703T170859_N0509_R112_T15TVG_20230703T211843.zip example raw file downloaded from Data Space with download_dataspace. Accessed on 2024-07-31.
- example-weather.met example weather file downloaded with get_weather_shp.
- variable-names.json dictionary of variable names used by the internal function “.pa_get_variable_names()” to guess which entries represent the necessary variables when these are not supplied to “pa_yield()”.
- yield-map-(5, 6, 7).rds processed yield data that used to produce the objects ymp5, ymp6, and ymp7 in the yield monitor data vignette. This is intended to reduce the time when compiling the vignette.

## inst/js

- bsi.js javascript file passed to the Data Space Statistical API by pa_get_vi_stats.
- evi.js javascript file passed to the Data Space Statistical API by pa_get_vi_stats.
- gcvi.js javascript file passed to the Data Space Statistical API by pa_get_vi_stats.
- ndre.js javascript file passed to the Data Space Statistical API by pa_get_vi_stats.
- ndvi.js javascript file passed to the Data Space Statistical API by pa_get_vi_stats.
- reci.js javascript file passed to the Data Space Statistical API by pa_get_vi_stats.