Analyse Carburant RGPH

Author

Nizar

Published

January 18, 2026

Introduction

This report analyzes the fuel consumption data from final.xlsx, focusing on the distribution by Bur_RGPH.

Data Loading

Code
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Load data
# Using engine='openpyxl' to read .xlsx files
df = pd.read_excel("../final.xlsx", engine='openpyxl')
df.head()
Bur_RGPH Date Valeur Litre Kilometrage Matricule Nom
0 المهدية 2024-06-01 50.0 19.80 203156.0 10-360364 الحسين السعيدي
1 صفاقس 1 2024-06-01 50.5 20.00 216100.0 10-362510 عادل بنفرج
2 صفاقس 1 2024-06-01 50.5 20.00 216497.0 10-362510 عادل بنفرج
3 أريانة 2024-06-02 50.0 19.80 117176.0 10358446 مكرم السلايمي
4 أريانة 2024-06-02 65.0 25.74 68341.0 10362527 رشيد العرعوري

Data Exploration

Code
# Basic info
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 35025 entries, 0 to 35024
Data columns (total 7 columns):
 #   Column       Non-Null Count  Dtype         
---  ------       --------------  -----         
 0   Bur_RGPH     35025 non-null  object        
 1   Date         35025 non-null  datetime64[ns]
 2   Valeur       35025 non-null  float64       
 3   Litre        35004 non-null  object        
 4   Kilometrage  34726 non-null  float64       
 5   Matricule    35004 non-null  object        
 6   Nom          35009 non-null  object        
dtypes: datetime64[ns](1), float64(2), object(4)
memory usage: 1.9+ MB

Aggregation by Bur_RGPH

Code
# Group by Bur_RGPH
grouped = df.groupby('Bur_RGPH')[['Litre', 'Valeur']].sum().reset_index()
grouped = grouped.sort_values('Litre', ascending=False)
grouped.head(10)
Bur_RGPH Litre Valeur
4 المنستير 7.9410.107.945.057.9410.103.975.055.053.977.94... 67555.20
14 زغوان 40.0040.0040.0020.1540.0010.0720.1531.6040.004... 33838.35
25 نابل 1 31.6819.8050.3739.6050.3719.8039.6019.8050.371... 56287.22
26 نابل 2 27.7239.6011.8839.6039.6039.6039.6039.6039.603... 49958.75
20 قابس 25.1925.1945.8425.1929.7225.1925.1925.1925.192... 64125.00
9 تطاوين 25.1850,3750.3750.3750.3745.3445.3425.3725.375... 46435.00
8 بنزرت 25.1825.1825.1825,1825,1825,1825.1825.1825.182... 96810.00
17 سيدي بوزيد 25.1822.6719.8025.1819.8019.8019.8025.1822.672... 99196.10
23 مدنين 22.6840.0022.6822.6819.8022.6839.6045.3622.683... 127188.15
10 توزر 20202020202020252520204040404028202020202017.0... 19926.55

Visualization

Code
# Plot Top 10 Bureaux by Fuel Consumption
plt.figure(figsize=(10, 6))
sns.barplot(data=grouped.head(10), x='Litre', y='Bur_RGPH')
plt.title('Top 10 Bureaux by Fuel Consumption (Litres)')
plt.xlabel('Total Litres')
plt.ylabel('Bureau RGPH')
plt.tight_layout()
plt.show()
/tmp/ipykernel_52306/632660810.py:7: UserWarning: Tight layout not applied. The left and right margins cannot be made large enough to accommodate all Axes decorations.
  plt.tight_layout()