Skip to content

Brazil Beef 2023

View or edit on GitHub

This page is synchronized from trase/products/analysis/explainers/brazil_beef_2023/README.md. Last modified on 2025-12-13 00:30 CET by Trase Admin. Please view or edit the original file there; changes should be reflected here after a midnight build (CET time), or manually triggering it with a GitHub action (link).

Explainer code

This folder contains the code used to build the dataframes ingested on trase observable to create the plots for the beef explainer. The output dataframes should be storaged on amazon s3 in

trase-storage/brazil/beef/brazil_beef_2023/
````
## Structure and files
├── chinese
│ └── explainer_observable_chinese.py # Code used to run the chinese version of the graphs.
├── english
│ └── explainer_observable_english.py # Code used to run the english version of the graphs.
└── portuguese
└── explainer_observable_portuguese.py # Code used to run the portuguese version of the graphs.
## Workflow

The workflow consists in the following steps:
1. Change the path of `brazil/soy/indicators/out/q2_2022/br_soy_deforestation_co2_gross.csv` in each version of the script in the load() function of the Indicator class to the specific indicators document of pasture deforestation co2 gross emissions. 
2. Make sure that `brazil/indicators/impact_team/q2_2022/br_soy_pasture_indicators_q2_2022.csv` file in s3 contains columns
"BEEF_TN_EXPORT_RAW", "BEEF_TN_DOMESTIC_RAW", "PASTURE_DEFORESTATION_ABSOLUTE_TOTAL_CPCT", "PASTURE_DEFORESTATION_CO2_ABSOLUTE_TOTAL", "TERRITORIAL_DEFORESTATION_CO2_GROSS_EMISSIONS", "PASTURE_DEFORESTATION_CO2_ABSOLUTE_TOTAL_CPCT", ``` 3. Run the script on the specific desired version 4. Download the generated files to s3 and load them into the observable. To know which dataframe goes to each observable graph, you can check the names of the dataframes that have already been loaded into Observable. 5. After updating the charts in Observable, create a new insight draft in Santy, with the charts. 6. Publish the draft, which will flow to trase insights pages but will not be visible, accessible only with the link.

Explainer workflow