DEV Community

Cover image for From "What Happened?" to "What Should We Do?" Understanding the Four Types of Data Analytics
Fariq
Fariq

Posted on

From "What Happened?" to "What Should We Do?" Understanding the Four Types of Data Analytics

Every day, your applications generate mountains of data. User clicks, API calls, error logs, transaction records. It all piles up. But raw data sitting in a database is like having a library where all the books are written in a language you don't speak. The real value lies in asking the right questions and knowing which analytical approach will provide the answers you need.

Let me walk you through the four types of data analytics that transform noise into insight, each answering a progressively more sophisticated question about your data.

Descriptive analytics: the rearview mirror

The question: What happened?

Descriptive analytics is your starting point. It takes historical data and organizes it into a format that humans can understand. Dashboards, reports, charts. Think of it as looking in the rearview mirror while driving. You're not trying to predict where you're going. You're simply getting a clear picture of where you've been.

Real-life example:

Imagine you're running an e-commerce platform. Descriptive analytics tells you that last month you processed 15,000 orders, your average order value was $67, and mobile traffic increased by 23% compared to the previous quarter. Is your monitoring dashboard showing API response times over the past 24 hours? That's descriptive analytics. Your weekly active users chart? Descriptive analytics.

These insights don't explain why mobile traffic jumped or what caused that spike in API latency at 3 AM last Tuesday. They just show you the facts. But those facts are crucial. You can't diagnose problems or predict the future without first understanding your baseline reality.

In practice:

Most developers encounter descriptive analytics daily through tools like Grafana, Datadog, or Google Analytics. Is that graph showing your deployment frequency? Is your error rate trending over time? Your database query performance metrics? All descriptive. It's the foundation everything else is built on.

Diagnostic analytics: the detective work

The question: Why did it happen?

Once you know what happened, the natural next question is why. Diagnostic analytics digs into your data to find causes, correlations, and connections. It's detective work. Looking for clues that explain the patterns you observed.

Real-life example:

Let's say your descriptive analytics revealed that user signups dropped 40% last week. That's concerning, but knowing it happened isn't enough. Diagnostic analytics helps you investigate. Did the drop coincide with a recent deployment? Was there a change in your ad spending? Did a particular browser start having compatibility issues with your registration form?

Maybe you drill down and discover that 95% of the drop came from mobile users on iOS, and it started exactly when you deployed version 2.4.1. You check the logs and find a JavaScript error that only triggers on Safari. Mystery solved.

In practice:

This is where you use techniques like drill-downs, filters, and correlation analysis. You might join your application logs with deployment timestamps, compare conversion rates across different user segments, or analyze A/B test results to understand why variant B performed better. Tools like your ELK stack, Splunk, or even SQL queries with GROUP BY and WHERE clauses become your investigative toolkit.

Diagnostic analytics doesn't just identify problems. It also helps you understand successes so you can replicate them.

Predictive analytics: the crystal ball

The question: What will happen?

Now we're getting into the future. Predictive analytics uses your historical data, statistical models, and often machine learning to forecast what's likely to happen next. It's not magic. It's pattern recognition at scale.

Real-life example:

Your SaaS application has been collecting user behavior data for two years. Predictive analytics can help you identify which users are at high risk of churning based on patterns like decreased login frequency, reduced feature usage, or specific sequences of actions that historically preceded cancellations.

Or consider capacity planning. Based on historical growth trends, seasonal patterns, and current trajectory, predictive models can estimate that you'll need to scale your database cluster by 30% before the holiday shopping season. This gives you time to prepare instead of scrambling when traffic spikes.

In practice:

This is where machine learning enters the chat. You might build regression models to forecast server load, classification models to predict user churn, or time series models to anticipate seasonal traffic patterns. Libraries like scikit-learn, TensorFlow, or even simpler statistical approaches can power these predictions.

The key insight: predictive analytics doesn't tell you what will happen with certainty. It tells you what's likely to happen based on what you know. It's probabilistic, not deterministic. But that probability can be incredibly valuable for planning and preparation.

Prescriptive analytics: the strategic advisor

The question: What should we do about it?

This is the most sophisticated level. Prescriptive analytics takes everything you've learned (what happened, why it happened, what's likely to happen) and recommends specific actions to achieve your goals.

Real-life example:

Your predictive model says you're likely to see a 50% traffic increase next month. That's useful information, but what should you actually do about it? Prescriptive analytics might recommend:

  • Scaling your Kubernetes cluster to 15 pods (not 10, not 20, but exactly 15 based on cost performance optimization)
  • Increasing your database connection pool size by 40%
  • Shifting 30% more budget to your CDN
  • Implementing rate limiting for endpoints that become bottlenecks under load

Or imagine a recommendation engine. It doesn't just predict that a user might like sci-fi books. It prescribes showing them specific titles in a specific order at specific times to maximize engagement and conversion.

In practice:

Prescriptive analytics often combines optimization algorithms, simulation, and business rules. It might use techniques like linear programming to optimize resource allocation, reinforcement learning to recommend actions in dynamic environments, or decision trees to map out the best course of action given multiple constraints.

This is where data science truly becomes a decision-making tool. You're not just observing or predicting. You're actively shaping outcomes.

Bringing it all together

These four types of analytics aren't separate silos. They build on each other in a natural progression:

  1. Describe what's happening in your systems and user base
  2. Diagnose why those patterns exist
  3. Predict what's likely to happen next
  4. Prescribe what actions will move you toward your goals

As developers, we often start with descriptive analytics (monitoring, logging, metrics) because it's the most accessible. But the real power comes from climbing this ladder. Each level requires more sophisticated tooling and techniques, but each also delivers exponentially more value.

The next time you're looking at a dashboard or debugging an issue, ask yourself: Am I just describing what I see, or am I working toward prescribing what I should do? Understanding which question you're trying to answer will guide you to the right analytical approach and the right insights.

What level of analytics does your team currently use? The data is already there, waiting to tell you not just what happened, but what you should do next.

Top comments (0)