Pablo Reyes

Data Scientist

Pablo Reyes

Data Scientist · Machine Learning and Deep Learning · Santiago, Chile

Pablo Reyes

Data scientist from Universidad Mayor. For 1 year and 4 months I was a data analyst at Buses Vule S.A., an operator in Santiago’s public bus network, where I automated fuel control and supply reporting for a fleet of 2,094 buses across 20 depots, building Python and SQL pipelines, AppSheet apps and Power BI dashboards. Before that, in 2022, I coordinated the Python course of MIT’s MISTI program with Universidad Mayor, teaching programming fundamentals to more than 100 students in English and Spanish.

In my projects I build models that forecast, detect fraud and anomalies, anticipate equipment failures and measure the real effect of a decision. I also work on computer vision for low-cost devices and on agents built on local language models. I work on Chilean public data, with Python, SQL, dbt, DuckDB, FastAPI and Docker.

Featured projects

Four projects on real data with a finding that was not the expected one.

Diferencias de CAGR, Sharpe y caída máxima de cada regla en 2.000 historiasFondo A y Fondo E durante la caída de 2020 y su recuperaciónCambio en la pensión por edad, según se cambie en el piso o al cruzar -15%Distribución del costo de cambiarse según la regla, en 2.000 historias sintéticasEstrategias en el plano retorno-riesgo, frente a las mezclas fijas de A y ECosto de cambiarse según la pérdida ya sufridaVolatilidad condicional GJR-GARCH del Fondo A y régimen turbulentoRetorno de la regla de salir en turbulencia, con y sin información del futuro

Panic-switching pension funds

real data

24 years of daily unit values, in UF. Switching to Fund E at the bottom of a crash costs 1.9 points of real return a year; switching earlier gets the same Sharpe as a static mix: there is no timing, there is less equity.

duckdbcounterfactual-analysisbehavioral-finance
Real did estimatorsTargeting policy comparisonRct capture distributionEvent studyDid error distributionReal rct targeting

Causal impact in a mining fleet

real + simulated

Did the maintenance program work, and on which trucks? On real sensor data from 60,000 Scania trucks, the default DRLearner collapses (r = −0.01); the cause was isolated and it recovers to 0.61–0.79.

causal-inferenceeconmldifference-in-differences
Three models compared on RMSLE, service level and total costDecomposition of the panel's zero rows into genuine zeros and stores that had not openedHistogram of the share of zero-sales days across the 1,782 seriesCost saving versus the mean forecast across cost ratios, and quantile calibration

Retail demand as an inventory decision

real data

3,000,888 sales rows. A quarter of the "zero demand" was stores that had not opened yet, and the model with the best metric leaves a stockout on 41% of store-days.

demand-forecastinglightgbmquantile-regression
Event hours by equipment, last 200 days of plant dataMonthly silica in concentrate, animated

Mining operations agent with a local LLM

real data

An agent with Qwen 2.5 running on CPU, over real plant and ChileCompra data, measured on 100 queries: it picks the right tool 99 times but miscopies large amounts; returning them in millions lifts grounded answers from 67 to 86.

llm-agenttool-callingevaluation

Projects by kind of problem

46 projects. Each states whether it uses real or simulated data.

Sector
Data

Showing 46 projects

1.Forecasting what comes next

Macro aporteBancos modelosEstres validacionEstres escenariosEstres bancos tpmShap summaryShap local

Chilean bank delinquency (CMF)

real data

Panel from 128 CMF Excel files. Stress test with lag and signs chosen without look-ahead: only consumer and commercial beat no change (0.73 and 0.85). Per-bank LightGBM does not; SHAP shows it learns the regime.

stress-testingshapfastapi
Real hourly marginal cost by busReconstruction vs. official monthly seriesPrice WAPE by bus: model vs. persistenceMLP PyTorch loss curve, animated

Chile's power grid, hourly

real data

4 years of real hourly data read from the vector charts of the grid coordinator's daily reports (0.04 USD/MWh residual). Price by bus: 17.88% WAPE vs 21.88% naive; blending with persistence fixes Puerto Montt.

lightgbmpdf-extractiontime-series
Every hour of Chile's grid, 2018-2025Day-ahead forecast on two weeks of 2025Model and loss comparison on 2025Rolling-origin validation by yearHourly sum against the official monthly totalHourly file against the daily reports, with and without batteriesReal hourly curtailment by yearReal hourly wind vs. the weather reconstruction

Chile's power grid, in R

real data

Real hourly SEN demand, solar and wind: LightGBM with a holiday calendar forecasts the next day at 2.48% MAPE vs 3.61% naive; ARIMA and TBATS lose over the holidays; real wind has half the volatility the reconstruction implied.

rlightgbmforecasting
Copper price and realized volatilityModel comparison against persistenceForecasts in the last foldPredicted vs. actualResidual distributionMLP loss curves by activation, animated

Copper volatility

real data

14 years of real LME prices: GARCH(1,1) has the best QLIKE and only HAR-X, with the VIX and the dollar, ties it. CatBoost re-tuned in every fold does not beat it.

garchcatboostshap
Mean purchases in the holdout by calibration frequency: BG/NBD tracks the actual line closely at every level, LightGBM overshoots for low-frequency customers, the naive rate overshoots everywhere.Cumulative share of next-26-week revenue against share of customers ranked by predicted value; both models sit close below the perfect-foresight curve.Bar chart of the share of customers buying again by P(alive) band; it rises from 19% to 56% and then drops to 53% in the top band.Heatmap of monthly cohort retention; cohorts from September to December 2010 are visibly lighter than the rest.

Customer lifetime value

real data

BG/NBD and Gamma-Gamma coded from the likelihood. Predicting 26 weeks: -2% error on total purchases, against +68% for the naive rate and +24% for LightGBM.

bg-nbdgamma-gammaretention

2.Catching fraud and anomalies

each candle is 15 minutes: green up, red down; the wick is the range. Yellow lines are the milestones. Below, how much money was committed in BTC futures: it drops suddenly when people close or are liquidated.all lines start at 0% at 20:00 UTC and show how much each rose or fell from there. The grey zone is the time when nobody had said anything yet. The light grey line is tech stocks: also falling, on Amazon's and Intel's earnings.grey is what BTC would have done just by moving with the Nasdaq, dollar and gold, using their relationship in the prior week. Orange is the rest, the hack's own. Left, the first 75 minutes: the hack dominates. Right, four days later: the stock market dominates, except BNB, which keeps its punishment. ETH ended better than expected.the line is BNB divided by BTC: when it falls, BNB is falling more than the market. The grey zone runs from the theft until it was admitted. The orange dot is when the alarm rang. In 2026 it rings inside the grey zone, before any notice; in 2019 BNB barely moved until the announcement.0% is each coin's price at 20:00 UTC, when the hack began. The red dot is the worst it fell and the blue one where it stands at the last close. If blue is right of 0%, it has recovered.each dot is a coin. Right of 0% it did better than Bitcoin; left, worse. If the market feared the thief selling, the blue dots would sit left of the green ones. They do not.top, how many times normal volume traded each day: 1 is an ordinary day. Bottom, what share of volume was started by buyers in a hurry: below the 50% line sellers lead. The red line is the hack.left: when the line falls, more is sold at market than bought; pale lines are a normal night, nearly flat. Right: the same BTC selling by size of order. Note: algorithms split large orders, so small does not mean an ordinary person.

The $6.3B Binance hack

real data

Minute by minute: Nasdaq futures predict 3.4-3.7 of BTC's 5.1-point fall; a market-data alarm fired 42 minutes before the theft was admitted; 36 hacks since 2011 show no average effect; news and war data do not improve forecasts.

event-studyanomaly-detectionlightgbm
Model comparison including MLPPCA component correlation with fraudMLP validation loss per epoch by activationModel comparisonAE vs VAE vs Deep SVDD precision-recallAE vs VAE vs Deep SVDD score distributionsCost vs alert budget

Fraud and AML lab

real data

Four techniques, all with real data: the e-commerce pipeline drops from a synthetic PR-AUC of 0.993 to 0.052 on IEEE-CIS, and the unsupervised AML ensemble falls below random on Elliptic (ROC-AUC 0.17-0.33) because illicit flows are typical, not anomalous.

fraud-detectionamlxgboost
Dataset overviewSupervised Precision-Recall curvesSupervised ROC curvesConfusion matricesAnomaly score distributionsPrecision-Recall curveAutoencoder activation comparisonRanking by family

16 detectors on mobile-money fraud

real + simulated

19 detectors on PaySim and on real fraud (ULB cards, IEEE-CIS e-commerce): the ranking barely transfers (Spearman 0.28-0.38) and on e-commerce no detector exceeds PR-AUC 0.22.

isolation-forestlocal-outlier-factorimbalanced-data
Compra Ágil orders by amountExcess mass at real and fake capsOrders with a sibling by sizePlanted anomalies found by each detectorAutoencoder training curves

Public procurement anomalies

real data

13.7 M ChileCompra order lines: Compra Ágil orders pile up under the cap and the pile moved with the law, but there is little sign of split purchases. Isolation Forest finds 38.8% of planted anomalies reviewing 5%.

public-procurementbunchingisolation-forest
ROC curve comparisonActivation comparisonPrecision-Recall CurveConfusion MatrixFeature Importance

Polyglot fraud engine

real + simulated

The same C + Ruby + Python engine on 590,540 real transactions (IEEE-CIS): PR-AUC 0.098 against the synthetic 1.000, and its layers add nothing over the native features.

crubyprometheus
Student-t critical value against assumed degrees of freedomAlerts raised by each detector, split into false alarms and true detectionsBoth statistics over the full SQM session

Lithium order-flow imbalance (C++)

real + simulated

On real IEX and Binance tapes the detector alerts on 1.4-24% of windows, not 0.27%, and does not anticipate price; the Apr 2023 lithium news day was a volume event (12x), not an imbalance one.

cpporder-flowmarket-microstructure
Horizontal bar chart of NAB standard scores: published detectors from expose 16.4 to ARTime 74.9, with this repo at 49.5 in-sample, 42.4 cross-validated and 42.8 with the detector also chosen inside each fold, all above windowedGaussian 39.6.Paired bars per detector, score every row versus report only the onset: Gaussian 36.4 to 42.6, seasonal 2.4 to 41.0, robust diff 0 to 23.6, KS shift 1.9 to 8.5.Machine temperature series with four labelled anomaly windows and the detector score below; the score rises inside three windows to about 0.4-0.6, but the corpus threshold of 0.753 is above every value.Grouped bars for four detectors: Gaussian 44.6 in-sample, 30.4 cross-validated, 29.3 known-cause; Gaussian with calibration 46.2, 45.3, 49.7; seasonal 49.5, 42.4, 27.1; seasonal with calibration 49.1, 37.4, 34.8.

Anomalies in sensor streams (NAB)

real data

NAB scorer reimplemented and validated 9/9 against published results. Reporting only the onset of each excursion lifts a seasonal detector from 2.4 to 41, and calibrating each series against its own history lifts industrial failures from 29 to 50. The best detector scores 49.0 cross-validated, but once the choice of detector is cross-validated too, the honest number is 42.8.

anomaly-detectiontime-seriesbenchmark

3.Anticipating equipment failure

Summary of the four datasetsScale factor of each variable in validation and test relative to training (median over its bins)Saving against doing nothing with a 95% bootstrap interval (resampling trucks)The same model with other seeds: the selection score moves more than the gap between the best modelsConfusion matrix on test with the challenge's costs: the rule mostly recommends class 4, so it works as an “alarm / no alarm” switch and does not separate the intermediate windows wellOn held-out training trucks, the share of readouts with an alarm rises steadily from about 100–200 units before the repair: the model sees a slow drift, not the challenge's 48-unit windowWhat moves the time-to-failure forecast most is how long the truck has been running (time_step, n_readouts) and its configuration (Spec_7)Test cost with a bootstrap interval; the line is the IDA 2016 challenge winner

Predictive maintenance (4 datasets)

real data

4 public datasets (2 real Scania truck sets, a metro compressor, NASA's simulated turbofans), 8 model families and a Docker demo: SCANIA rescales each variable differently across train, validation and test (adversarial AUC 1.00); fixing it cuts predicted risk from 16.9% to 4.2% (2.7% actual). On APS, cost 9,150 vs the IDA 2016 winner's 9,920.

predictive-maintenancedistribution-shiftdeep-learning
The same two models on two feature setsMAE before and after the target fixMulti-task loss curves animatedRMS degradation curve, animatedRaw signal vs time_to_failure animatedOut-of-fold MAE by modelRaw signal, early vs. late, animatedtime_to_failure distribution

Failure from continuous signal

real data

Bearings (NASA IMS), earthquakes (LANL) and 23,550 real SCANIA trucks: spectral boosting beats a CNN by 2.5×, and the multi-task network that tied on the synthetic fleet loses on real trucks, even after correcting the validation scale (AUC 0.62 vs 0.71).

remaining-useful-lifesignal-processingfft
Kalman Filter animatedCorrelation matrixModel comparisonFeature importanceLearning curveResidual diagnosticsForecasting comparison animatedFull operational series animated

SAG mill digital twin

real + simulated

Kalman estimates ore hardness with 79% less error; energy priced with real CNE marginal costs (95 months).

digital-twinkalman-filterlightgbm

4.Measuring causes and evaluating decisions

False-positive rate against the number of daily looksRequired sample size against minimum detectable effectCUPED variance reduction and its effect on the confidence intervalGuardrail p-values against the BH critical lineInjected exponential decay against the fitted linear interactionEmpirical false-positive rate of each stopping rule against its nominal 5%Treatment effect under each adjustmentFalse-positive rates on real A/A tests

A/B experimentation

real + simulated

Sample size, SRM, CUPED, multiple testing and an mSPRT you can check daily, verified in simulation and on Criteo's real 14M-user experiment: SRM passes, but covariate adjustment moves the effect by 39%.

ab-testingcupedsequential-testing
Diferencias de CAGR, Sharpe y caída máxima de cada regla en 2.000 historiasFondo A y Fondo E durante la caída de 2020 y su recuperaciónCambio en la pensión por edad, según se cambie en el piso o al cruzar -15%Distribución del costo de cambiarse según la regla, en 2.000 historias sintéticasEstrategias en el plano retorno-riesgo, frente a las mezclas fijas de A y ECosto de cambiarse según la pérdida ya sufridaVolatilidad condicional GJR-GARCH del Fondo A y régimen turbulentoRetorno de la regla de salir en turbulencia, con y sin información del futuro

Pension funds

real data

A regime signal that "earned" 1.4–2.3% a year ties a static mix on Sharpe out of sample. In real terms, 2021–23 fell 26%.

duckdbcounterfactual-analysispensions
Bar chart of the effect of lateness on review score by band: about -1 for 1-3 days, -2.15 for 4-7 days, and about -2.5 for 8-14 and 15+ days, with naive and adjusted bars nearly equal.Histogram of cross-fitted propensity scores for on-time and late orders; both groups cover the same range, on-time orders concentrated near zero.Cumulative capture curve: share of late deliveries flagged against share of orders flagged, for orders placed April to August 2018; the model curve sits above the random diagonal, reaching about 23% at 10% and 40% at 20%.

Late deliveries on a marketplace (Olist)

real data

96k real orders. Arriving late causes -1.97 review points (AIPW), with most of the damage in the first week. Filtering out pre-delivery reviews would have dropped 74% of late orders.

causal-inferenceaipwsurvival-analysis
Bar chart of the elasticity under five estimators: -0.21 pooled, -2.10 with fixed effects, -1.47 with display and mailer, -1.50 with last week price, -1.50 with double ML.Horizontal bars of elasticity by category with 95% intervals: beer, frozen pizza, cookies and soft drinks around -2; bread and soup near -1 with intervals crossing it; yogurt near zero.

Grocery price elasticity

real data

580 products, 2,500 real households. Ignoring display and mailer overstates elasticity by 40%; double ML gives -1.50. A 10% discount only pays for itself above 50% gross margin, even for beer.

double-machine-learningfixed-effectspricing

5.Optimizing operations

Hourly silica in the concentrateR² under four validation protocolsWalk-forward resultsRecommended moves by four modelsAmine dose against earlier silica

Flotation plant

real data

Real iron-ore plant: R² 0.83 on a random split is -0.43 in time order; only recent lab results beat persistence, and four models prescribe opposite pH moves.

soft-sensorwalk-forwardoptimization
Model comparisonActivation convergence animatedActual vs predictedDemand under each model and the depots it picksReal circuity against the simulated rangesRoute length under each combinationR2 under random and spatial cross-validation

Last-mile logistics

real + simulated

Multi-depot routing with time windows on real population (Kontur rescaled to Censo 2017) and real roads (OSRM): a plan built on simulated distances is 46% longer once driven.

or-toolsvrptwh3osrm
Streamlit ROI simulatorModel comparisonConfusion matricesMLP activation loss curves animatedMLP activation metric comparison

Churn as a business decision

real data

10,000 real bank customers: the complaints column was a leak (AUC 1.00 vs 0.85); a value-based threshold recovers US$189,930 contacting 42%, vs US$143,842 contacting everyone.

mlflowfastapidocker
Bar chart of MCC by feature set under shuffled CV and a temporal holdout; every set scores much lower on later parts, measurements only falling from 0.228 to 0.061.Capture curve: percent of failures caught against percent of parts inspected on a log axis; the sequence model reaches about 74% at 5% inspected, measurement-only models about 35%, random inspection 5%.

Quality failures on a Bosch line

real data

1.18M real parts: failures come in lots (11x next to a failed part). Shuffled CV overstates (0.40 vs 0.21 on later parts). Inspecting the riskiest 5% catches 61% of failures.

lightgbmimbalanced-learningquality-control

6.Measuring and managing financial risk

Scoring engine benchmarkCombined credit and market risk heatmapEstimated hazard vs. the true generating hazardPD term structure by risk bandShrinkage by segmentMonotonicity auditConformal coverage by classWOE by binning method

Credit risk lab

real + simulated

26 techniques on simulated books (R+Python+C scorecard at 270.6M rows/s, IFRS 9 PD, shadow/canary/retraining lifecycle) and a 27th that tests them on 621k real Lending Club loans: the monotonic constraint is still free and the scorecard no longer wins.

scorecardifrs9mlops
Net Sharpe and equity curves, five strategiesKalman vs. static OLS equity curve, net of costsCorrelation by regime

Crypto quant lab

real data

Eight techniques. All five strategies lose after costs; spoofing detection works (0.92 precision).

quantitative-financecointegrationnlp
Backtest bandBacktest coverageBacktest kappaInput, parallel pricing engine, tests and real-data backtestStandard error by configuration and modelSchwartz call price against the equilibrium levelMeasured speedup against perfect linear scalingStandard error against path count, log-log

Copper Asian options (C++)

real + simulated

C++20 engine tested on 30 years of LME prices: 90% bands cover 83-87%; Heston, jumps and regimes gain at most 1.1%, the same as no model, and Schwartz reversion cannot be told from chance.

cpp20monte-carlobacktesting

7.Getting the data in order

Chile's copper sector indexed to 2005Copper output by mine in 2025Copper mining's electricity at the real spot priceSafety incidents against the equipment KPI, decomposedRisk level distribution and mean OEE per levelKPI distributions across 540 shiftsLabel coverage of the ML-ready views

Mining data warehouse

real + simulated

Real Cochilco yearbook 2000-2025 and real SEN marginal cost by bus in dbt + DuckDB: at the spot price copper mining's electricity fell from USD 518 to 262 per tonne (2022-2024); 131 tests, simulated site layer.

dbtduckdbstar-schema
Daily dashboard: copper, dollar, UF, CPI, policy rate and delinquency

Chilean data, refreshed every day

real data

dbt + DuckDB + GitHub Actions: nine public series (UF, dollar, copper, CPI, policy rate, IMACEC, unemployment, pension funds, CMF delinquency) are downloaded, tested and published every day; if mindicador is down, the UF and the dollar come from the SII.

dbtduckdbgithub-actions

8.Classifying and estimating

recall@20 and NDCG@20 per methodFeature importanceCandidate recall per generator

E-commerce recommender

real data

85M real events: a LightGBM ranker lifts recall@20 from 0.244 to 0.395, but 71% of purchases are items never viewed before.

lightgbmlearning-to-rankduckdb
Trainer comparison across 12 retrainingsFragmentation classifier metrics across 12 retrainingsP80 predicted against actual on the fresh holdoutCu grade predicted against actual on the fresh holdout

Ore grade and fragmentation (.NET)

real + simulated

ML.NET + ONNX in a desktop app; on 97 real published blasts the model explains 0.76 with a random split but -0.59 at a new mine, against the synthetic 0.957.

csharpml-netonnx
Bar chart of 5-fold AUC: 0.805 with an all-time visit count, 0.685 with random rows and honest features, 0.684 split by patient, 0.664 for logistic regression.Calibration plot of observed readmission against predicted risk by decile; points lie close to the diagonal.Decision curve: the model net benefit stays above both following up everyone and no one from a 5% to a 39% risk threshold.Two panels by group: observed vs predicted readmission rates, which match closely for large groups, and the share of readmissions flagged, which is lowest for patients with missing race at about 3%.

30-day hospital readmission

real data

99k real hospital encounters. Counting future visits inflates AUC from 0.67 to 0.80. Calibrated model with net benefit at 5-39% thresholds; no racial gap, but weaker for patients over 70.

calibrationdecision-curvefairness
Bar chart of the share of bets that are right: logistic regression 78% in CV vs 55% on test, ensemble 79% vs 56%, woman-boy rule 97% vs 93%.Dot plot of CV accuracy per model, all between 83% and 85%, with Kaggle scores as diamonds between 76.6% and 79.7%; the woman-boy rule has the highest Kaggle score.Grouped bars of CV accuracy: using training-fold labels only gives 83.7 to 84.1%, all labels except own 84.2 to 84.3%, all labels including own 89.9 to 98.9%.Left: survival by sex and class, women 97%, 92%, 50% across classes, men 37%, 16%, 14%. Right: survival by title, Mrs 80%, Miss 70%, Master 57%, Rare 29%, Mr 16%.

Titanic: when the model does not beat the rule

real data

A family-group rule (0.799 on Kaggle) beats every ML model (0.775). The model bets against the rule are right 79% in CV and 56% on test; a leak through the passenger's own label gives CV 0.99 and Kaggle 0.64.

scikit-learnnested-cvkaggle
Line chart: stack AUC on the real survey falls almost linearly from 0.994 with no flipped labels to 0.912 with 8% flipped, crossing the competition CV of 0.961 between 3.0% and 3.5%.Two dot plots. Left: CV and public leaderboard AUC per model, from 0.958 for raw LightGBM to 0.961 for the stack, with leaderboard 0.0003 to 0.0007 below CV. Right: the same models on the real survey, 0.9930 to 0.9937.Two lollipop charts of AUC change versus raw LightGBM. Left, competition CV: every group gains between 6 and 18 units of 10^-4. Right, real survey: digits 0, exact-value target encoding -2.5, other groups +1.3 to +2.7.Grouped bars. Left: 91% of competition passengers have zero departure delay vs 56% in the original survey. Right: share satisfied falls with delay in both, to 33% vs 38% for 16-60 minutes and 31% vs 36% above 60 minutes.

Airline satisfaction: a 0.961 that is really a 0.994

real data

Kaggle competition on synthetic data: the same models score 0.994 on the real 130k-passenger survey; ~3% flipped labels explain the gap. Some popular tricks only exploit the generator. Final private 0.96144, in the same order as CV.

catbooststackingkaggle

9.Text, language and images

Event hours by equipment, last 200 days of plant dataMonthly silica in concentrate, animated

Mining operations agent

real data

Agent over real plant and ChileCompra data, measured on 100 queries with local Qwen: right tool 99 times, and reporting amounts in millions lifts grounded answers from 67 to 86.

llm-agenttool-callingduckdb
GGUF BenchmarkQuantization Benchmark (illustrative)Eval Metrics

Local language model for industry

real + simulated

Evaluated on 100 real flotation-plant cases: listing tool arguments cuts invalid calls from 69 to 16, and auditing the request gives 25 of 25 correct safety decisions.

llama-cppqloraguardrails
Validation global Dice per epoch for the four runs; the 2x-input run on 8,197 scenes stays highest throughout, the three-frame run lowest.Four validation scenes in ash false colour with the human label and the model prediction side by side. Rows 1, 3 and 4 match closely; row 2 shows a contrail over complex cloud that the model misses.

Aircraft contrails in satellite imagery

real data

Segmentation on GOES-16 without downloading 451 GB: remote reads of the Kaggle zip and OpenContrails. Upsampling the input 2x is worth +0.05 Dice; stacking frames hurts. 0.597 on Kaggle private.

pytorchsegmentationsatellite-imagery

Experience

Work experience

Data Analyst · Supply and Fuel

Buses Vule S.A.Santiago public bus network (Red)January 2025 – April 2026

As a data analyst at Buses Vule S.A., an operator in Santiago’s public bus network, I automated fuel control and supply reporting for a fleet of 2,094 buses across 20 depots, building Python and SQL pipelines, AppSheet apps and Power BI dashboards.

Each of the 20 depots tracked fuel in its own Excel file. First I wrote a Python script that merges the sheets, compresses them into consolidated tables by depot, day and month, computes each bus's km per litre against its previous load and flags the ones outside their model's range. Then an AppSheet app that replaced the sheets: operators record loads, pump readings and tanks from their phone, and the app computes per-pump consumption, theoretical stock and AdBlue. Reviewing the code, I fixed three bugs: dates sorted wrongly across months, buses left without a range because of how the standard was written, and every bus's first load flagged by mistake.

Map of the work at Buses Vule: capture, ETL, control, analytics and reporting
pythonpandasappsheetexceldata-cleaning
Code of the pipelinereal job, fictitious sample data
Enduro instructor · Ecobike Training. Photo: Bonnefoy Fotografía

Sports coaching

Enduro instructor

Ecobike TrainingSantiagosince 2024

For 2 years I have been an enduro instructor at the Ecobike Training school. Classes run on Saturday mornings, and each month combines technique, fitness, circuits and a ride on a different hill around Santiago.

Groups
Advanced adultsBeginner adultsAdvanced kidsBeginner kids
Each month
1Technique2Fitness3Circuits4Ride on Santiago hills
@ecobiketrainingBasic first aid.Photo: Bonnefoy Fotografía

Open-source tool

Latest value, 12-month change and two-year path of eight indicators, downloaded with datoschileInteractive dashboard: pick an indicator and a time range, and hover to see each data pointPension funds A to E in UF, upcoming holidays computed from the law and a today's-pesos calculator2024 Census by commune: map in quintiles of the column you sort by, with search and region filter

datoschile: Chilean public data in one line

A Python library that downloads Chile's reference data, clean and in a DataFrame: 17 official Central Bank series with no key (dollar, policy rate, IMACEC, GDP, unemployment, reserves), UF, UTM, CPI, copper and other metals from Cochilco, pension funds, CMF bank delinquency, legal holidays, business days, all 346 communes with their CUT code and the 2024 Census by commune (it adds up exactly to the 18,480,432 people published). It fixes real source errors, like the dollar leaking into the UF in 2014, the CPI's four base changes (without chain-linking, 12-month inflation is off by up to 25.8 points) or mindicador's IMACEC, which keeps the first published figure and matches the current one on only 3.8% of months. It publishes an interactive dashboard that updates every week.

import datoschile as dc

dc.resumen()                          # 9 indicadores con su fuente
dc.bcentral.serie("imacec")           # serie oficial, sin clave
dc.cochilco.cobre(desde=2024)         # cobre LME del día
dc.convertir.deflactar(1_000_000, "2015-01")
pythonpandasopen-datadata-cleaninggithub-pages

Stack

LanguagesPythonSQLRC++CC#JuliaGoRuby
DatapandasPolarsNumPyDuckDBdbtParquetPydanticJupyter
ML & statisticsscikit-learnLightGBMXGBoostCatBoostPyTorchSciPyOptunaPlotly
Language, vision & edgeLangChainHugging FaceUltralytics YOLOONNXRaspberry Pi
ProductionFastAPIStreamlitMLflowDockerGitHub ActionspytestPrometheusGrafanaGitLinux
View page ↗