
Dairy Cattle Environmental Impact
Easy_Example.RmdGetting Started with a Basic Assessment
This guide will walk you through a Basic Assessment for Mature Dairy Cattle in Spain (2015). We will use a single regional identifier to link your census data to nutritional requirements and environmental impact.
Note on File Locations: All files are located in the
user_data/folder.
📂 Folder Structure
-
User Files (Update these):
livestock_census.csv,diet_profiles.csv,diet_ingredients.csv,livestock_definitions.csv,livestock_weights.csv,manure_management.csv. -
In case of usage of the automatic cycle:
reproduction_parameters.csv -
Reference Files (Expert use only):
feed_characteristics.csv,forage_yields.csv,mapping.csv,fao_crop_yields.csv,ipcc_coefficients.csv,ipcc_mm.csv.
Step 1: The Census
Open livestock_census.csv. This is where you define who
is on the farm. For this basic example, we focus on a national
level.
| animal_tag | region | subregion | class_flex | population |
|---|---|---|---|---|
| mature_dairy_cattle | spain | 848686 |
Step 2: Designing the Diet
The diet must be fulfilled manually based on nutritional reports (e.g., Informe Zootécnico 2015).
A. Check Ingredients
Open feed_characteristics.csv to see the list of
available feed items. If you wish, you can add as many new ingredients
as you want, always fulfilling all columns.
Step 3: Animal Categories and Coefficients
Open livestock_definitions.csv. This file links your
animal to the IPCC equations. Use the exact
descriptions from ipcc_coefficients.csv.
| animal_tag | region | diet_tag | c_pregnancy | milk_yield | fat_content |
|---|---|---|---|---|---|
| mature_dairy_cattle | spain | diet_dairy_mature | cattle and buffalo | 8894.38 | 3.73 |
Step 4: Body Weights
Open weights.csv. Ensure the keys match the census
exactly.
| animal_tag | region | adult_weight | weight_gain | average_weight |
|---|---|---|---|---|
| mature_dairy_cattle | spain | 675 | 0 | 675 |
Step 5: Manure Management (manure_management.csv)
- Check
ipcc_mm.csvfor validmanagement_systemandsystem_climatenames (You can also check the section X of this documentation). - If you have more than one system for the exactly same animal, duplicate the row and split the allocation.
| animal_tag | region | subregion | class_flex | system_base | management_months | system_climate | system_subclimate | climate_zone | system_variant | climate_moisture | animal_type | animal_subtype | allocation |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| mature_dairy_cattle | spain | liquid_slurry | 3 | cool | temperate | wet | with_natural_crust_cover | wet | cattle | dairy | 0.343 | ||
| mature_dairy_cattle | spain | solid_storage | temperate | dry | cattle | dairy | 0.069 |
Step 7: Running the Analysis
Once your CSVs are updated, run the following in R:
library(herdr)
results <- generate_impact_assessment(
automatic_cycle = FALSE)