StreamFuels is a collection of updated fuel sales datasets for forecasting, classification, and pattern analysis, focusing on petroleum derivatives, natural gas, and biofuels market across different regions of Brazil.
monthly_sales_state(): Monthly fuel sales data by state from the ANP database
yearly_sales_state(): Yearly fuel sales data by state from ANP database
yearly_sales_city(): Yearly fuel sales data by city from ANP database
monthly_operations_state(): Monthly oil production, NGL production, natural gas production, reinjection, flaring and losses, self-consumption, and available natural gas. It provides a comprehensive view of petroleum and gas operations.
fuel_type_classification() Comprises 14,032 time series, each with a fixed length of 12 observations (i.e., one year of sales) and eight possible class labels.
pip install streamfuelsAfter that you can import using the target python environment:
from streamfuels.datasets import DatasetLoader
loader = DatasetLoader()
result, flag = loader.yearly_sales_state()
df, metadata = loader.read_tsf(path_tsf=result)result, flag = loader.yearly_sales_state()result, flag = loader.monthly_sales_state()result, flag = loader.monthly_operations_state()result, flag = loader.yearly_sales_city()df = loader.fuel_type_classification()-
Classification (1NN, RF, Rocket, QUANT, HIVE-COTE v1)
Download Classification results -
Forecasting (ARIMA, ETS, N-HiTS, N-BEATS)
Download Forecasting results
You can explore practical use cases of the library directly via Google Colab or Binder.
- Demonstrates how to use classification algorithms to identify the fuel type.
- Shows how to perform time series forecasting using statistical and machine learning models.
- Explains how to load datasets and visualize key information graphically.
- Demonstrates how to identify and visualize repeating patterns (motifs) in time series data.
- Colab is recommended for faster and more stable execution of Python notebooks.
- Binder may take longer to build environments depending on dependencies.




