How lvgalvao/one-billion-row-challenge-python works
This repository is a set of alternative implementations of the One Billion Row weather-measurement challenge, plus scripts to generate sample data and clean up an optional Supabase copy. The principal workflow is to generate a semicolon-delimited measurements file, run one of the processors, and print station-level minimum, mean, and maximum temperatures in station order. The processors are independent alternatives, not stages in a shared processing pipeline. The README documents the Bash implementation, which was not sampled; its internal behavior is therefore not expanded here.
Main entry points: data Measurements file · create_measurements.py Measurement generator · create_measurements_1.py Temporary generator · supabase_cleanup.py Expiry cleanup
Components 14
Data generation
- Measurement generator
src/create_measurements.py - Temporary generator
src/create_measurements_1.py
Processing alternatives
- Python processor
src/using_python.py - Python list processor
src/using_python_old.py - Pandas chunks
src/using_pandas.py - Dask processor
src/using_dask.py - Polars processor
src/using_polars.py - DuckDB processor
src/using_duckdb.py - Bash and awk
src/using_bash_and_awk.sh
Storage cleanup
- Expiry cleanup
src/supabase_cleanup.py
Data files
- Station samples
data/weather_stations.csv - Measurements file
data
Other components
- User
- Supabase Storage
Connections 23
- User → Measurement generator: runs generator
README.md - User → Temporary generator: runs generator
README.md - Measurement generator → Station samples: reads stations
src/create_measurements.py - Measurement generator → Measurements file: writes measurements
src/create_measurements.py - Temporary generator → Station samples: reads stations
src/create_measurements_1.py - Temporary generator → Measurements file: writes measurements
src/create_measurements_1.py - User → Python processor: runs processor
README.md - User → Python list processor: runs processor
- User → Pandas chunks: runs processor
README.md - User → Dask processor: runs processor
README.md - User → Polars processor: runs processor
README.md - User → DuckDB processor: runs processor
README.md - User → Bash and awk: runs script
README.md - Python processor → Measurements file: reads measurements
src/using_python.py - Python list processor → Measurements file: reads measurements
src/using_python_old.py - Pandas chunks → Measurements file: reads chunks
src/using_pandas.py - Dask processor → Measurements file: reads measurements
src/using_dask.py - Polars processor → Measurements file: scans measurements
src/using_polars.py - DuckDB processor → Measurements file: queries measurements
src/using_duckdb.py - Bash and awk → Measurements file: processes rows
README.md - User → Expiry cleanup: runs cleanup
- Expiry cleanup → Supabase Storage: downloads expiry
src/supabase_cleanup.py - Expiry cleanup → Supabase Storage: removes expired files
src/supabase_cleanup.py