Project
Gasoline Price Analysis in France
Integrated multi-source French fuel price and regional data to explore drivers of gasoline price variation and build predictive models.
View on GitHub- Team
- 2
- Role
- Data Analyst & Modeler
- Duration
- 09/2023 – 12/2023
Stack
- Python
- Pandas
- NumPy
- Scikit-learn
- Seaborn
- Matplotlib
- RandomForestRegressor
- Geospatial feature engineering
- Statistical ranking
Gallery

Overview
This two-person data-analysis project examined how fuel prices in France vary by location, station services, and time. We combined public fuel-price records with geographic and demographic data, then compared regression models using different sets of features.
Data Preparation
- Merged fuel-price records with commune-level population and regional metadata.
- Parsed CSV and JSON fields, removed redundant columns, and handled missing values.
- Encoded station services and available fuel types as model features.
- Added a highway-station indicator using address data.
Analysis and Modelling
We compared regional mean prices, highway and non-highway stations, and monthly and weekday patterns in diesel prices.
Three RandomForestRegressor variants used different feature sets: all available variables, a set excluding services and location, and a set excluding services only. Held-out predictions were compared using RMSE and an aggregate Euclidean-distance metric.
Comparing feature sets helped examine how much location and station services contributed to predictions, rather than relying on a single model's score.
Outcome
In the analysed data, location contributed more to fuel-price predictions than station-service features. Bretagne had lower average prices, while Corse and Île-de-France had higher averages. Removing regional information reduced model accuracy.
These findings describe the dataset and period studied; they are not a live price forecast or a recommendation on where to refuel today.
Possible Extensions
Further analysis could examine population density, broader geographic groupings, and alternative representations of station services.