CAST Lab

Computational Agricultural Statistics Laboratory

Computational statistics for agricultural surveys.

We design samples, build survey tools and publish open software for producing agricultural and rural statistics. Based at the Department of Statistics of the Federal University of Pernambuco, in Recife, with researchers in Brazil and Colombia.

Irrigated fields in the São Francisco valley near Petrolina, Pernambuco, under an area frame. The highlighted segments are the sample; most of our work starts here. Imagery: Sentinel-2 cloudless by EOX, CC BY 4.0.

What we do

The CAST Lab is a cooperative academic environment for developing and testing computational and statistical methods applied to the production and analysis of agricultural and rural data. The group grew out of the sampling research at the Department of Statistics of UFPE and works with national statistical offices, FAO programmes and universities in Brazil and abroad.

Students join through the graduate programme in Statistics at UFPE and through undergraduate research projects. Most of what we produce is released as open source, mainly as R packages on CRAN.

In 2016 and 2017 the group planned and ran experiments in Brazil for FAO comparing the efficiency of statistical and computational methods for probability-sample agricultural surveys, within the Global Strategy to Improve Agricultural and Rural Statistics endorsed by the UN Statistical Commission. Since then it has trained graduate students and staff of official statistics agencies in Brazil and abroad.

Probability sampling and survey methodology
Master sampling frames, area and list frames, multiple-frame estimation and small-area methods for agricultural censuses and surveys.
Computational tools for surveys
Open-source software for sample selection, data collection in the field, paradata and quality control, released as R packages and web applications.
Remote sensing for agriculture
Satellite imagery and spatial statistics for crop area estimation, land use change and frame construction.
Statistical modelling and data analysis
Regression models for bounded and inflated responses, nonparametric methods, record linkage and machine learning applied to official data.

CAST is a research group certified by CNPq since 2016, with 14 researchers and 12 students registered, and partnerships with Food and Agricultural Organization of the United Nations, Università degli Studi di Milano-Bicocca. Group record at the CNPq directory

Research lines registered at CNPq

ResearchersStudents
Model-based inference and data regression modelling93
Probability Sampling and Survey Methodology for Agricultural Surveys93
Computational Tools Development for Agricultural Surveys8
Métodos estatísticos e computacionais para monitoramento e vigilância epidemiológica, e de desastres naturais55
Aprendizado de Máquina (Machine Learning)46
Development and Innovation for Agricultural Remote Sensing Applications41
Sampling Methods for Big Data42
Inferencia causal11

In numbers

Counted from the sources listed in the footer.

625publications since 2000
39R packages on CRAN
12kpackage downloads in the last month
3,017citations recorded by OpenAlex

Recent publications

All 625 publications

Software

70 packages across CRAN, PyPI, crates.io, npm and Go.

All packages

PackageWhat it doesVersionDownloads, 30 days
DT2 'DataTables' 2.x for R 0.1.3 544
capesR Access to CAPES Data 0.2.0 541
datasusr Fast Access to Brazilian Public Health Data from 'DATASUS' 0.1.1 502
diario 'R' Interface to the 'Diariodeobras' Application 0.1.2 462
BigDataPE Secure and Intuitive Access to 'BigDataPE' 'API' Datasets 0.3.0 456
apifetch Token-Authenticated REST API Retrieval Toolkit 0.2.0 449
RapidFuzz String Similarity Computation Using 'RapidFuzz' 1.1.1 448
webdav A Simple Interface for Interacting with 'WebDAV' Servers 0.2.0 443

Latest releases

  • BigDataPE version 0.3.0 released (0.2.0)
  • rpic version 0.11.3 released (0.6.2)
  • crawlee version 0.1.1 released (0.1.0)
  • vrpr version 0.2.1 released (0.2.0)
  • foresight version 0.7.3 released (0.7.1)
  • cagedr Publicado no CRAN (versão 0.1.0)

Projects

All projects

  • areaframe: an area sampling frame engine

    Web platform for area-frame sampling in the FAO tradition, rewriting the lab's earlier R/Shiny tool. It builds grids of land segments over any region (GADM levels 0 to 2), supports probability designs (simple random, systematic, stratified with Neyman, Bethel and Kish allocations, PPS, spatially balanced LPM and the cube method), enriches segments with ESA WorldCover land cover, collects crowd classification of points and computes Horvitz-Thompson, Hájek and calibrated estimates with confidence intervals.

    Since 2026. André Leite, Cristiano Ferraz, Raydonal Ospina

    Open the app

  • Master sampling frames for agricultural statistics

    Analytical studies and computational simulation of the construction and use of master sampling frames for generating agricultural and rural statistics, combining area and list frames.

    Since 2016. Cristiano Ferraz, André Leite, Raydonal Ospina

  • Software for sample design and field data collection

    Open tools that support sample selection, enumerator assignment, data collection with mobile devices and quality control of agricultural surveys. Released as R packages and as the survey platform used in the field.

    Since 2016. André Leite, Cristiano Ferraz

    Packages

  • Sample design for the National Agricultural Survey (PNAGRO)

    Proposal led by the CAST Lab, through UFPE and its foundation FADE, to design the sampling plan of IBGE's new National Agricultural Survey (PNAGRO) with a dual frame combining area and list sampling, including a field study and training workshops with IBGE staff. Twelve months of work planned for 2027, under a United Nations Development Programme agreement with IBGE.

    Planned for 2027. Cristiano Ferraz, André Leite, Raydonal Ospina

Work with us

Students interested in sampling, survey computing or statistics for agriculture can join through the graduate programme in Statistics at UFPE or an undergraduate research project. Statistical offices and research groups looking for collaboration on surveys or software can write to contact@castlab.org.