Everyday Examples of Data Usage
Data analysis is no longer a skill reserved for companies. It now powers many services we use daily—often working silently in the background.
For example, the following services rely heavily on data analysis:
- Streaming apps recommending content you might like
- Online shopping platforms offering personalized product suggestions
- Banks monitoring transactions to detect fraud
In this lesson, you’ll use Python to practice one of the most fundamental data analysis tasks with a short hands-on example.
Python Warm-up: Calculating the Average
One of the most common concepts in data analysis is the average — a simple metric that represents the central tendency of a dataset and helps summarize information efficiently.
For example, let's calculate the average daily sales amount using price data from items sold over a week.
The formula for calculating the average is straightforward:
Average = Total sum of data ÷ Number of data points
In Python, you can easily implement this calculation using the built-in functions sum() and len():
# Weekly sales data retrieved from an internal database
sales_data = [8120, 9200, 7890, 10230, 8675, 9340, 10000]
# Calculate total sales
total_sales = sum(sales_data)
# Divide by the number of days to get the average
average_sales = total_sales / len(sales_data)
# Print the result
print("Average daily sales:", int(average_sales))
Checking the Result
Run the code on the right to check the result.
For small datasets, you can easily calculate the average using
sum()andlen(). However, when working with tens of thousands or even millions of data points, it's more efficient to use libraries likeNumPyorPandasfor faster computations.
You’ll learn how to use NumPy and Pandas for these calculations later in the course.