Skip to content

Datos y JSONs

Mindset & Code edited this page May 29, 2026 · 2 revisions

Data & JSONs

🇬🇧 English first · 🇪🇸 Español más abajo.

Synthetic data generation

Data is synthetic, generated with Python to simulate a realistic B2B SaaS business with seasonality, segmentation and coherent trends.

import pandas as pd, numpy as np

months = pd.date_range('2022-01', periods=36, freq='MS')
base_mrr, growth = 480_000, 0.07          # 7% monthly growth
mrr = [base_mrr * (1 + growth) ** i for i in range(36)]

generate_data.py produces 5 CSV tables in data/; generate_executive_json.mjs (in project-sales-weather-etl) converts them to the JSONs the dashboard consumes.

Dataset design principles

Principle Detail
Internal coherence MRR × 12 = ARR; LTV/CAC > 3× in good months
Seasonality Stronger Q4, softer Q1 (typical B2B pattern)
Realistic segmentation 60% SMB · 30% Mid-Market · 10% Enterprise
Coherent churn Higher on month-to-month vs annual contracts
Reproducibility np.random.seed(42) → identical output every run

Output tables

File Rows Consumed by
executive_summary 36 KPI cards + trends
revenue_by_segment 108 Segment donut
revenue_by_channel 144 Channel bars
marketing_funnel 36 Funnel
pipeline_stages 180 Pipeline funnel

🇪🇸 Español

Datos y JSONs

Generación de datos sintéticos

Los datos son sintéticos, generados con Python para simular un negocio SaaS B2B realista con estacionalidad, segmentación y tendencias coherentes.

import pandas as pd, numpy as np

months = pd.date_range('2022-01', periods=36, freq='MS')
base_mrr, growth = 480_000, 0.07          # 7% crecimiento mensual
mrr = [base_mrr * (1 + growth) ** i for i in range(36)]

generate_data.py produce 5 tablas CSV en data/; generate_executive_json.mjs (en project-sales-weather-etl) las convierte a los JSON que consume el dashboard.

Principios de diseño del dataset

Principio Detalle
Coherencia interna MRR × 12 = ARR; LTV/CAC > 3× en meses buenos
Estacionalidad Q4 más fuerte, Q1 más débil (patrón B2B típico)
Segmentación realista 60% SMB · 30% Mid-Market · 10% Enterprise
Churn coherente Mayor en mes a mes vs contratos anuales
Reproducibilidad np.random.seed(42) → salida idéntica cada vez

Tablas de salida

Archivo Filas Consumido por
executive_summary 36 Tarjetas KPI + tendencias
revenue_by_segment 108 Donut de segmento
revenue_by_channel 144 Barras de canal
marketing_funnel 36 Funnel
pipeline_stages 180 Funnel de pipeline