Skip to content

View or edit on GitHub

This page is synchronized from trase/models/brazil/soy_supply_sheds/input_data.md. Last modified on 2025-12-14 23:19 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).

Brazil soy supply sheds input data

This notebook is a simple summary of the input data to the supply sheds model for Brazil soy.

Extracting data from source ...  took 0.2 seconds
Skipping re-process of Municipality
Extracting data from source ...  took 0.2 seconds
Skipping re-process of Production
Extracting data from source ...  took 0.2 seconds
Running pre-processing for CrushingCapacity
Report: Before processing
        | Row Count: 1,791
Report: Filtered to 2022
        | Row Count: 109
Report: Dropping zero or missing capacity
        | Row Count: 109
        | Sum of capacity: 73,000,000
Report: Consolidate over municipality
        | Row Count: 82
Report: After processing
        | Row Count: 82
Written /Users/harrybiddle/dev/TRASE/trase/models/brazil/soy_supply_sheds/2023/prepared/crushing_capacity.csv
Extracting data from source ...

/Users/harrybiddle/dev/TRASE/trase/tools/etl/pandas_wrapper.py:397: SettingWithCopyWarning:


A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy

     took 0.2 seconds
Skipping re-process of Cost
    Loading data from disk took 11.9 seconds
Extracting data from source ...  took 0.2 seconds
Skipping re-process of Flows
Category Value Value (2sf)
Production (tn) 152,144,238 150,000,000
Storage capacity (tn) 116,767,634 120,000,000
Crushing capacity (tn) 73,000,000 73,000,000

How well does crushing capacity align with storage capacity?

Overall Crush-to-Storage Ratio (crush / storage): 0.6252

Correlation between storage and crushing capacity: 0.4190

Per-Municipality Ratio Analysis:

storage_capacity crushing_capacity crush_to_storage_ratio
count 1405 1405 1398
mean 83108.6 51957.3 1.44971
std 201464 295976 36.4854
min 0 0 0
25% 8100 0 0
50% 25790 0 0
75% 70740 0 0
max 2.85643e+06 5.8765e+06 1351.85

Identifying Key Municipalities & Imbalances

Top 5 Municipalities by Storage Capacity:

storage_capacity municipality.trase_id municipality.name _id crushing_capacity crush_to_storage_ratio
1289 2.85643e+06 BR-5107925 SORRISO 1289 438000 0.153338
1258 2.11446e+06 BR-5106224 NOVA MUTUM 1258 1.825e+06 0.863105
1273 1.95487e+06 BR-5107040 PRIMAVERA DO LESTE 1273 1.095e+06 0.560138
1173 1.92623e+06 BR-5003702 DOURADOS 1173 1.898e+06 0.985343
1288 1.8591e+06 BR-5107909 SINOP 1288 0 0

Top 5 Municipalities by Crushing Capacity:

storage_capacity municipality.trase_id municipality.name _id crushing_capacity crush_to_storage_ratio
1280 727888 BR-5107602 RONDONOPOLIS 1280 5.8765e+06 8.07336
1378 1.49563e+06 BR-5218805 RIO VERDE 1378 3.4675e+06 2.31842
646 821790 BR-4119905 PONTA GROSSA 646 3.358e+06 4.0862
1058 145722 BR-4315602 RIO GRANDE 1058 2.628e+06 18.0343
241 981293 BR-3170206 UBERLANDIA 241 2.5185e+06 2.56651

Municipalities with Crushing Capacity but NO Storage:

storage_capacity municipality.trase_id municipality.name _id crushing_capacity crush_to_storage_ratio
1398 0 BR-1301902 ITACOATIARA nan 730000 nan
1399 0 BR-2914406 IRAQUARA nan 328500 nan
1400 0 BR-3539202 PIRAPOZINHO nan 109500 nan
1401 0 BR-4118204 PARANAGUA nan 730000 nan
1402 0 BR-4307708 ESTEIO nan 219000 nan

Municipalities with Storage Capacity but NO Crushing:

storage_capacity municipality.trase_id municipality.name _id crushing_capacity crush_to_storage_ratio
0 16780 BR-1100023 ARIQUEMES 0 0 0
1 4180 BR-1100031 CABIXI 1 0 0
2 38637 BR-1100049 CACOAL 2 0 0
3 1490 BR-1100072 CORUMBIARA 3 0 0
4 27090 BR-1100122 JI-PARANA 4 0 0

Now we plot crushing versus storage capacity. The below plot is a scatter, where each municipality is a dot. The x-axis represents storage capacity and the y-axis crushing capacity. Since the capacities span a huge range, both axes are log-scale.

The plot shows three distinct clusters of data points:

  1. “Storage Only” (points on bottom line). Municipalities that have storage capacity but zero crushing capacity - the largest group. This could represent gaps in the crushing data, or legitimately represent municipalities with storage but no crushing.
  2. “Crushing Only” (points on left line). Municipalities that have crushing capacity but zero storage capacity. This is a smaller group that most likely represents gaps in our storage data.
  3. “Mixed Capacity” (upper-right quadrant). These are the municipalities that have both storage and crushing capacity. There is a loose correlation between storage and crushing capacity.