The Data Science Workflow from Question to Conclusion
Your school produces data every day: attendance lists, test scores, canteen sales, library loans. Most of it is simply stored. Data science is a way of working that turns raw data into answers that can be used to make decisions.
Example: the school canteen
The school cooperative wants to know which menu items deserve more stock. A data analyst would work through the following cycle:
- Frame the question. The question must be specific and answerable with data, for example "Which menu item sold best from Monday to Friday during August?"
- Collect the data. The cashier's record of each transaction: date, time, item, quantity, price.
- Clean the data. Fix item names written in different ways ("Nasgor", "nasi goreng"), remove duplicate rows, handle empty cells.
- Explore. Compute totals and averages and compare groups, for example sales per day.
- Visualise. Draw a bar chart of sales per item so the pattern is visible at a glance.
- Conclude and communicate. "Chicken noodles sold 40% more on Fridays; stock should be increased on that day." A conclusion also states its limits, for example that the data covers only one month.
The cycle often repeats: exploration can raise new questions.
The shape of the data we will work with
Almost all data in this course is a table. Each row is one observation (one student, one transaction), and each column is one variable (name, class, score). Variables come in two main kinds:
- Numerical: numbers whose average makes sense, such as a maths score or hours of study.
- Categorical: labels or groups, such as class, gender, or extracurricular club.
The kind of variable decides how you process it. An average score makes sense; an average class name does not.
The tools we use
We use Python with two main libraries: pandas for working with tables and matplotlib for drawing charts. Everything runs in a notebook (Jupyter or Google Colab), a document that combines code, results, charts, and notes in one place, so your analysis is easy for others to reread.