DEV Community

sanaipei
sanaipei

Posted on Edited on

From Data Analytics to Data Science: Exploring the Python Data Science Ecosystem

By Lenapunya Sanaipei | Pastoralist in Tech

Introduction

Data has always fascinated me, not just because of the numbers, but because of the stories, questions and possibilities hidden within it.

My journey into technology started with an interest in data analytics. Over time, I developed an appreciation for working with data, understanding patterns, cleaning datasets, conducting exploratory data analysis and communicating findings that can support decision-making.

Python has been one of the tools I've particularly enjoyed working with.

However, as I continue growing in the data space, I find myself increasingly interested in exploring the broader field of Data Science, particularly statistics, predictive modelling and machine learning.

This is not necessarily about abandoning data analytics. It is about building on that foundation, strengthening my understanding and exploring what more we can do with data.

I am documenting this journey as I revisit familiar concepts, learn new ones and experiment with Python's data science ecosystem.

And as someone who identifies as a Pastoralist in Tech, I am particularly interested in exploring how data and technology can help us understand questions affecting communities, including pastoralist communities such as my own, the Ilchamus of Kenya.

Let's get started.

1. What is Data Science?

Data Science is an interdisciplinary field that combines programming, statistics, mathematics, analytical thinking and domain knowledge to extract meaningful insights from data.

It involves more than simply collecting data or creating visualisations.

Depending on the problem, data science can involve:

  • Collecting data from different sources.
  • Cleaning and preparing datasets.
  • Exploring and understanding patterns.
  • Applying statistical methods.
  • Building predictive models.
  • Evaluating machine learning algorithms.
  • Communicating findings.
  • Supporting informed decisions.

One way I like to think about Data Science is through the relationship between three important areas:

Data Analytics: Helps us understand data, identify patterns, investigate what happened and explore why it happened.

Statistics: Helps us understand distributions, relationships, uncertainty, probability and whether observations provide sufficient evidence for conclusions.

Machine Learning: Allows computers to learn patterns from data and use those patterns to make predictions or support decisions.

These areas overlap, and Data Science brings them together alongside programming and domain expertise.

2. Data Science is More Than Knowing the Tools

This is probably one of the most important things I want to emphasise throughout this learning journey.

You can learn Python, NumPy, Pandas, Seaborn, Scikit-learn and many other libraries.

But knowing how to import a library, execute a function or train a machine learning model does not automatically make you a good data scientist.

The tools are enablers. Critical thinking comes first.

Before opening a notebook or writing a single line of code, we should understand the problem we are trying to solve.

Consider an example.

Suppose we want to investigate household income patterns in parts of the Ilchamus community around Lake Baringo, Kenya.

Instead of immediately opening Python, we should begin by asking questions:

  1. What exactly do we want to understand about household income?
  2. Are we interested in income sources, income distribution or changes over time?
  3. What information would help us answer these questions?
  4. Where can we obtain reliable data?
  5. Who collected the data, and for what purpose?
  6. Are there missing values, inconsistencies or potential biases?
  7. Which analytical methods are appropriate?
  8. Would statistical analysis be sufficient, or is predictive modelling necessary?
  9. How do we communicate the findings responsibly?

Only after understanding these questions can we start deciding which tools to use.

For example, if our objective is to understand the distribution of household income, descriptive statistics and visualisations might be sufficient.

If we want to investigate whether certain household characteristics are associated with income differences, we might explore statistical methods.

If we have a well-defined predictive objective and suitable historical data, we could consider machine learning.

The important thing is that the problem determines the approach, not the availability of a particular library.

3. Why Python for Data Science?

Python is a general-purpose programming language that has become widely used in data science, scientific computing, automation and machine learning.

One of the reasons I enjoy Python is its readability.

Its syntax makes it relatively easy to express instructions, experiment with ideas and build practical applications.

Python also has a large ecosystem of libraries that support different stages of working with data.

Instead of implementing every mathematical operation, statistical method or machine learning algorithm from scratch, we can use existing libraries.

However, using a library should not replace understanding what happens behind the scenes.

We should understand the purpose of a function, the assumptions it makes, the inputs it expects and how to interpret its output.

4. Exploring the Python Data Science Libraries

Let's look at some of the libraries we will explore throughout this series.

4.1 NumPy - Numerical Computing

NumPy stands for Numerical Python.

It is a fundamental Python library for numerical computing and working with multidimensional arrays.

Its main object is called an ndarray (N-dimensional array).

NumPy provides functionality for:

  • Creating and manipulating arrays.
  • Performing mathematical operations.
  • Working with matrices.
  • Linear algebra.
  • Numerical computations.
  • Random number generation.

Why do we need it?

Imagine we have collected household income figures and want to calculate the average income, identify the minimum and maximum values or perform calculations across thousands of observations.

NumPy provides efficient operations for working with numerical data.

We will explore array creation, dimensions, indexing, slicing, reshaping and vectorised operations.

4.2 Pandas - Data Manipulation and Analysis

Pandas is a Python library designed for working with structured and tabular data.

Its most familiar data structure is the DataFrame.

Think of a DataFrame as a table containing rows and columns.

For example, a household dataset might contain:

Household Location Income Livestock
H001 Location A 15,000 8
H002 Location B 22,000 12
H003 Location A 18,000 5

With Pandas, we can:

  • Read CSV and Excel files.
  • Inspect datasets.
  • Handle missing values.
  • Remove duplicates.
  • Filter records.
  • Group and aggregate data.
  • Merge datasets.
  • Conduct exploratory data analysis.

Pandas will be particularly useful when we start working with complete datasets rather than individual numerical arrays.

4.3 Matplotlib - Data Visualisation

Matplotlib is a Python library for creating visualisations.

It allows us to communicate patterns and relationships through charts and figures.

Examples include:

  • Bar charts.
  • Line graphs.
  • Histograms.
  • Scatter plots.
  • Box plots.

For instance, we might want to visualise changes in rainfall over several years or compare household income across different locations.

Visualisation is not simply about making charts look attractive.

It is about choosing a visual representation that helps answer a particular question.

4.4 Seaborn - Statistical Data Visualisation

Seaborn is built on top of Matplotlib and provides a higher-level interface for statistical visualisation.

It makes it easier to explore:

  • Data distributions.
  • Correlations.
  • Relationships between variables.
  • Categorical comparisons.
  • Statistical patterns.

For example, we could investigate the relationship between household income and livestock ownership.

A scatter plot might help us explore whether the two variables appear to be associated.

However, a visible relationship does not automatically establish causation.

That is another important part of thinking critically about data.

4.5 SciPy - Scientific Computing

SciPy builds on NumPy and provides additional functionality for scientific and technical computing.

It includes tools for:

  • Statistical tests.
  • Optimisation.
  • Numerical integration.
  • Scientific calculations.
  • Signal processing.

We will explore it when we get deeper into statistical analysis and scientific methods.

4.6 Scikit-learn - Machine Learning

Scikit-learn is one of the most widely used Python libraries for traditional machine learning.

It provides tools for:

  • Data preprocessing.
  • Classification.
  • Regression.
  • Clustering.
  • Model selection.
  • Model evaluation.

For example, imagine we have historical agricultural production data and want to investigate whether we can predict future production using available variables.

We might explore regression algorithms.

Alternatively, if we want to classify records into predefined categories, classification algorithms might be appropriate.

But remember: we should not select an algorithm before understanding the objective, the dataset and the problem.

5. How Do These Libraries Work Together?

Let's use our household income investigation as an example.

Suppose we have collected household information for a research project.

Our workflow might look something like this:

  1. NumPy: Perform numerical operations and work with arrays.
  2. Pandas: Load, clean and organise the collected data.
  3. Matplotlib: Create visualisations to explore the dataset.
  4. Seaborn: Investigate distributions and relationships between variables.
  5. SciPy: Apply appropriate statistical tests.
  6. Scikit-learn: Build and evaluate predictive models if the research objective requires them.

These libraries do not operate independently of one another. They can be used together within the same Python workflow.

Also, not every project requires all of them.

Sometimes a well-conducted descriptive analysis is enough to answer the research question.

6. Connecting Data Science to Pastoralist Communities

This is an area I am particularly interested in exploring.

Growing up with a connection to the Ilchamus community has shaped some of the questions I find meaningful.

The Ilchamus are a Maa-speaking community associated with the Lake Baringo region of Kenya. Their history and livelihoods include pastoralism, agriculture and fishing.

This provides an interesting context for exploring how data science can be applied to questions involving livelihoods, environmental conditions, livestock, agriculture and community development.

For example, we could investigate:

  • How do household income sources vary?
  • How do rainfall patterns relate to agricultural production?
  • What patterns can we observe in livestock ownership?
  • How do market prices affect livestock-related income?
  • What can historical environmental data tell us about changing conditions?

These are potential research questions, not conclusions about the community.

Any real investigation would require appropriately collected and verified data, community participation and respect for the people whose information is being used.

I also believe communities should not only be subjects of data collection. They should have a voice in deciding what information is collected, how it is interpreted and how the resulting knowledge is used.

That is part of why I find the intersection of data science, indigenous knowledge and data governance so interesting.

7. What Are We Going to Learn?

Throughout this series, I will be revisiting and exploring the following areas:

Topic What we'll explore
Python Programming foundations
NumPy Numerical computing and arrays
Pandas Data manipulation and cleaning
Matplotlib Data visualisation
Seaborn Statistical visualisation
Statistics Probability, distributions and inference
Scikit-learn Machine learning
Algorithms Regression, classification and clustering
Practical projects Applying the concepts to real-world problems

We'll use Python and Google Colab for practical experimentation.

The goal is not simply to finish tutorials. It is to understand what we are doing, why we are doing it and when to apply what we learn.

Conclusion

Moving from Data Analytics towards Data Science is an opportunity to deepen my understanding of data, strengthen my statistical thinking and explore machine learning.

I am approaching this journey with curiosity, a willingness to revisit the fundamentals and an interest in connecting technology to real-world problems.

As a Pastoralist in Tech, I also hope to explore how these skills can contribute to conversations about pastoralist communities, indigenous knowledge and the responsible use of data.

I am documenting the journey as I go, learning in public and sharing practical experiments along the way.

Tools are enablers. Understanding the problem, asking the right questions and thinking critically about the data will always come first.

Let's see where Python takes us.


Series: From Data Analytics to Data Science with Python

Next article: Getting Started with NumPy: Understanding Numerical Computing in Python

Author: Lenapunya Sanaipei
Personal website: https://sanaipei.me

Top comments (1)

Collapse
 
lesanaipei profile image
sanaipei •

I love data