Portfolio project · Python + AI (sample data)
From campaign data to decisions that raise ROAS
Transparency note: "EcoClean Hogar" is a fictional company used to build this Google Ads analytics and prediction platform end to end. It is not a real client; it is the same kind of technical work I apply to real accounts.
An analytics and prediction platform for Google Ads campaigns, built in Python with Machine Learning and 2D/3D visualization.
The problem it solves
Google Ads reports tell you what happened. They do not tell you what will happen. When analysis stays in a spreadsheet, there is always a leak:
- The inefficient campaign that keeps getting budget out of habit.
- The cross-analysis nobody does by hand: CTR vs. CPC vs. ROAS at the same time.
- The decision to scale spend based on gut feeling, not on a model trained on your own data.
- The dataset that grows (10K, 1M rows) and the Excel file that can no longer cope.
What the platform does: measure, see and predict
KPIs: executive console dashboard
dashboard.py calculates aggregated CTR, CPC, CPA, ROAS, cost, conversions and revenue, and offers a menu to launch any chart.
Visualization: 10 2D/3D charts
graficos3d.py: scatter3D, heatmap, funnel, treemap, sunburst and more, each one crossing variables that Excel cannot.
AI prediction: future conversions
modelo_ads.py trains a neural network (MLPRegressor) that predicts conversions from impressions, clicks, CTR, CPC and cost.
How it works: from a dataset to a prediction in 4 steps
- Data: the dataset is loaded: 300, 10,000 or 1,000,000 rows, same columns, same code with no changes.
- KPIs: metrics are aggregated (CTR, CPC, CPA, ROAS, cost, conversions, revenue) and shown in the executive dashboard.
- Visualize: variables are crossed with 10 on-demand 2D/3D charts by campaign, channel, device, hour or date.
- Predict: the model estimates conversions with a neural network trained on the client's real data, and reports R² and MSE.
Tech stack: everything runs locally, no cloud or external APIs
- Python 3 — the base language of the whole platform.
- Pandas / NumPy — loading, cleaning and aggregating datasets (300 to 1M rows).
- Matplotlib — static charts for the executive dashboard and reports.
- Plotly — the 10 interactive 2D/3D visualizations.
- Scikit-Learn — neural network (MLPRegressor) that predicts conversions.
- OpenPyXL — reads the .xlsx datasets without needing a database.
Results: the model tested at three scales
| Dataset | Training rows | R² | MSE |
|---|---|---|---|
| 300 rows | 300 | 0.64 | 92.5 |
| 10,000 rows | 10,000 | 0.58 | 7,118.9 |
| 1,000,000 rows | 50,000 (sample) | 0.59 | 20,220.8 |
The 1,000,000-row dataset is sampled down to 50,000 to keep training fast, without touching the code.
How I work
- An architecture document that sets the goal, scope and rules before writing any code.
- Modular code: AI, charts and executive dashboard in separate files, each function with a single responsibility.
- Works the same with 300, 10,000 or 1,000,000 rows, tested at all three scales.
- 100% local: no database, no external API, no cloud. Full control over the client's data.
Does your Google Ads data live only in a spreadsheet?
I can build the same kind of analytics and prediction platform on your account's real data.
Talk to Daniel on WhatsApp