Agrimonia dataset

The AgrImOnIA dataset is a comprehensive dataset relating air quality and livestock (expressed as the density of bovines and swine bred) along with weather and other variables. This dataset is a collection of estimated daily values for a range of measurements of different dimensions as: air quality, meteorology, emissions, livestock animals and land use. Data are related to Lombardy and the surrounding area for 2016-2021, inclusive. The surrounding area is obtained by applying a 0.3° buffer on Lombardy borders. The data uses several aggregation and interpolation methods to estimate the measurement for all days. 

Repositery overview

flow_chart agrimonia

These scripts are used to build the AgrImOnIA_Dataset v.2.0.2. In particular the repositery contains:

  • AQ_LI_import_temporal_transformation
    • Data_AQ
      • EEAFunctions
        • functions
          • EEADownload.m
          • EEAImportMetadata.m
          • EEAImportfile.m
          • EEAMerge.m
          • EEAReshape.m
          • EEAVocabularyImport.m
          • SSMHourly2Daily.m
          • gaps.m
      • AQDatabase.m
      • AQHourly2Daily.m
    • Data_BDN
      • BDNFunction
        • importBDRBovinifile.m
        • importBDRSuinifile.m
        • importComunifile.m
      • BDNCreateDataset.m
      • BDNDailySpline.m
  • WE_EM_import_temporal_transformation
    • Data_WE
      • Weather.R
    • Data_EM
      • Emissions.R
    • Funtions
      • ERA5function
        • ERA5LandSinglePressure.R
        • ERA5_Land_fromHourlytoDaily.R
        • ERA5_RelativeHumidity.R
        • ERA5_SL_fromHourlytoDaily.R
        • ERA5datadownload.R
        • ERA5netcdftopoints.R
        • Notin.R
        • getmode.R
        • ma.R
      • CAMSFunctions
        • Notin.R
        • ma.R
        • getmode.R
        • getvarCAMS.R
  • AQ_WE_EM_LI_LA_spatial_interpolation
    • AQinterp.R
    • AQinterpPARALLEL.R
    • Spatial Interpolation.R
  • Merging
    • Final Merging.R
For details about every script the user is referred to the README.md in each folder.

Building steps

The building process for the AgrImOnIA Dataset follows this order:

  1. download air quality data using the script: AQDatabase.m
  2. transform from hourly observations to daily using the script: AQHourly2Daily.m
  3. download weather data, convert them from hourly to daily with different ensemble criteria, merge them: Weather.R
  4. download emission data, convert them from monthly to daily with Hermite spline: Emissions.R

Programming languages used

Air Quality and Livestock data are pre-processed using MATLAB. Weather, Emissions and Land data are pre-processed using R as well as the spatial interpolations and the final merging.

Programming language varies according to the preference of who has worked on it. 5. convert time series of livestock variables from bi-annual to daily using the script: BDNDailySpline.m 6. make the spatial interpolation between AQ localisations and variables through the script: Spatial Interpolation.R 7. merge all the dataset interpolated (es AQ_WE + AQ_EM + AQ_LA + etc) using the ID of stations as key, the script is: Final Merging.R

Further developments

The final dataset, already published on Zenodo (link), represents the first step of the AgrImOnIA project. The purpose of this data set is to give the opportunity to assess the impact of agriculture on air quality in Lombardy through statistical techniques capable of highlighting the relationship between the livestock sector and air pollutants concentrations.