Applied Data Science ProjectIntroductionAn applied data science project integrates the major practices of data science into a defensible response to a real-world problem. Unlike an isolated programming exercise, a project requires a team or individual to identify a meaningful question, understand stakeholders, obtain suitable data, prepare it responsibly, analyse patterns, build and evaluate models where appropriate, communicate uncertainty, and recommend action. The quality of a project is not determined only by model accuracy. A technically sophisticated model may be useless if it answers the wrong question, relies on biased data, cannot be implemented, or violates privacy. Conversely, a simple descriptive analysis may create substantial value when it is aligned with a decision and communicated clearly. The central principle is therefore: A successful data science project connects a well-defined decision with appropriate evidence, a transparent method, and an actionable recommendation. This chapter presents a practical project framework suitable for diploma-level study. It is designed for individual or team work and can be adapted to business, public services, education, health, environmental monitoring, or social research. Learning ObjectivesBy the end of this chapter, you should be able to: - Frame a real problem as a clear data science question.
- Identify stakeholders, decisions, assumptions, and success criteria.
- Acquire, document, assess, and prepare data for analysis.
- Select suitable descriptive, predictive, or prescriptive methods.
- Evaluate results using appropriate metrics and validation procedures.
- Recognise data quality, bias, privacy, security, and fairness risks.
- Communicate findings and limitations to technical and non-technical audiences.
- Produce recommendations, documentation, and a reproducible project deliverable.
1. From a Real Problem to a Data Science QuestionA project begins with a problem, not with a preferred algorithm. A problem statement describes an undesirable condition or an opportunity. A data science question translates it into something that can be investigated with evidence. For example, “customer service is poor” is too broad. A more useful formulation is: “Can we identify the factors associated with delayed response times and predict which incoming cases are likely to exceed the service target?” This formulation distinguishes two possible tasks: - Descriptive or diagnostic: What factors are associated with delays?
- Predictive: Which future cases are likely to be delayed?
A strong problem definition identifies: - the decision-maker and affected stakeholders;
- the decision or action that may change;
- the population and time period of interest;
- the outcome to be measured;
- constraints such as cost, time, privacy, or interpretability;
- the consequences of incorrect decisions.
1.1 Project questions and hypothesesA project may use one or more of the following question types: | Question type | Purpose | Example output |
|---|
| Descriptive | Establish what happened | Trend report | | Diagnostic | Investigate why it happened | Contributing factors | | Predictive | Estimate an unknown or future outcome | Risk score | | Prescriptive | Compare possible actions | Recommended intervention | | Exploratory | Generate plausible questions | Patterns for further study |
A hypothesis is a testable expectation, not a conclusion. For example, “cases submitted during peak hours have longer resolution times” can be investigated by defining peak hours, measuring resolution time, and controlling for relevant differences. Association does not by itself prove causation; unmeasured factors may explain the observed relationship. 1.2 Scope and success criteriaUncontrolled scope is a common cause of project failure. A project charter should specify what is included and excluded. It should also define success before results are known. For a prediction project, success might include a minimum recall, an acceptable false-positive rate, a response-time limit, and a requirement that the model be understandable to staff. A useful success criterion includes a baseline. If a classifier has accuracy of 82%, that figure has little meaning without comparison with a simple rule or majority-class classifier. In an imbalanced problem, accuracy can be especially misleading. For instance, if only 5% of cases are fraudulent, predicting “not fraud” for every case gives 95% accuracy but detects no fraud. 2. Project Lifecycle and Team OrganisationA practical lifecycle is iterative rather than strictly linear: - Frame: define the problem, stakeholders, scope, and success criteria.
- Discover: locate data sources and understand their meaning and provenance.
- Prepare: clean, integrate, transform, and document the data.
- Analyse or model: establish baselines, explore patterns, and fit suitable methods.
- Evaluate: test performance, robustness, fairness, and practical usefulness.
- Communicate and recommend: explain evidence, uncertainty, limitations, and actions.
- Deliver and monitor: package the work and define how results will be maintained.
Returning to an earlier phase is normal. Data inspection may reveal that the original question cannot be answered, or stakeholder feedback may require a different outcome definition. For a team, roles can be allocated without creating silos. A project lead coordinates scope and communication; a data steward records sources and quality; an analyst or modeller develops the analysis; and a communicator prepares visualisations and reporting. Every member should understand the complete workflow, review another member’s work, and contribute to documentation. A responsibility matrix can identify who is responsible, accountable, consulted, and informed for major tasks. Useful project controls include a schedule, issue log, decision log, version-controlled files, naming conventions, and agreed review points. A project repository should separate raw data, processed data, code, notebooks, reports, and outputs. Raw data should be preserved in read-only form whenever permitted. 3. Data Acquisition and Data UnderstandingData may be collected directly through surveys, sensors, transactions, experiments, or interviews, or obtained from administrative records, public portals, APIs, licensed datasets, and internal databases. Acquisition is not merely a technical download. The analyst must establish whether the data may legally and ethically be used for the stated purpose. For each source, record: - owner or provider;
- collection method and date;
- population represented;
- variables and units;
- sampling method;
- known exclusions and missingness;
- licence, consent, and access restrictions;
- transformations already applied;
- version or retrieval identifier.
A data dictionary defines each field, its type, allowed values, units, coding, and business meaning. For example, “income” must specify currency, time period, whether it is gross or net, and how zero or missing values are represented. 3.1 Data quality dimensionsImportant dimensions include: - Completeness: required values are present.
- Validity: values conform to rules and permitted ranges.
- Accuracy: values represent the real-world attribute correctly.
- Consistency: the same concept is represented consistently across sources.
- Timeliness: data is sufficiently current for the decision.
- Uniqueness: duplicate records are controlled.
- Representativeness: the observed data reflects the intended population.
A quality audit should quantify problems rather than merely stating that the data was “cleaned.” For example, report the percentage of missing values per field, duplicate counts, impossible values, and records removed with reasons. 3.2 Sampling and leakageA sample should be appropriate to the population about which conclusions will be made. Convenience samples can systematically exclude important groups. If the project concerns all customers but data comes only from customers who responded to a voluntary survey, conclusions may suffer from response bias. Data leakage occurs when information unavailable at the time of prediction is used to train a model. For example, using a final repayment status to predict whether a loan will default produces an apparently strong but operationally invalid model. Leakage may arise through target-derived variables, post-outcome records, or inappropriate preprocessing before data splitting. 4. Data PreparationPreparation should be guided by the project question and documented so that another person can reproduce it. Typical steps include: - preserve the original data;
- standardise field names and data types;
- inspect missing, duplicate, and invalid records;
- resolve or document inconsistent categories;
- join sources using justified keys;
- create variables with clear definitions;
- split data appropriately for evaluation;
- export a controlled analysis dataset.
4.1 Missing values and outliersMissingness may be random, associated with other variables, or itself informative. A missing income value may reflect refusal, ineligibility, system failure, or a particular user group. Replacing all missing values with zero changes the meaning of the variable and can create bias. Possible responses include deletion, simple imputation, model-based imputation, an explicit “unknown” category, or retaining a missingness indicator. The choice depends on the mechanism of missingness, the amount missing, and the consequences of error. The method and assumptions must be reported. An outlier is an observation unusual relative to other observations; it is not automatically an error. A legitimate high-value transaction may be important. Investigate its source, compare it with domain knowledge, and assess whether analysis is sensitive to its inclusion. Do not remove observations solely because they weaken a desired conclusion. 4.2 Transformation and feature creationVariables may require unit conversion, date extraction, aggregation, encoding, or scaling. A feature should have a defensible relationship to the question. Features should not encode prohibited information or create leakage. When categorical variables are encoded, the chosen representation must be compatible with the method and documented. For a quantitative variable x, standardisation is commonly defined as: z = (x − μ) ÷ σ Here x is an observed value, μ is the training-set mean, σ is the training-set standard deviation, and z is the standardised value. This transformation is dimensionless and is appropriate when a method is sensitive to scale. The mean and standard deviation must be calculated on the training data only and then applied to validation or test data. Standardisation is not a remedy for biased or invalid data. 5. Analysis, Modelling, and EvaluationBegin with exploratory data analysis. Examine distributions, trends, group differences, relationships, and unusual observations using tables and suitable charts. Visualisations should have meaningful titles, labelled axes, units, readable scales, and notes about filters or missing values. A baseline provides a reference point. For a continuous outcome, a baseline might predict the training mean. For classification, it might predict the most frequent class or use a simple business rule. More complex models should justify their additional complexity through improved performance, usefulness, or insight. 5.1 Choosing an approach- Use descriptive statistics and visualisation when the goal is understanding current conditions.
- Use regression or classification when an outcome must be estimated.
- Use clustering when meaningful groups are unknown and no labelled outcome is available.
- Use time-series methods when ordering and temporal dependence are central.
- Use optimisation or scenario analysis when decisions and constraints can be explicitly represented.
Method selection should consider interpretability, data volume, outcome type, computational resources, deployment context, and risk. 5.2 Evaluation metricsFor a binary classifier, the confusion matrix contains true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN). Common metrics are: Accuracy = (TP + TN) ÷ (TP + TN + FP + FN) Precision = TP ÷ (TP + FP) Recall = TP ÷ (TP + FN) Accuracy is the proportion of all predictions that are correct. Precision is the proportion of predicted positives that are actually positive. Recall is the proportion of actual positives detected. These formulas require non-zero denominators and should be interpreted with the class distribution and decision costs. In safety screening, missing a positive may be more serious than creating a false alarm, so recall may receive greater emphasis. For a regression outcome, mean absolute error is: MAE = (1 ÷ n) ∑ᵢ₌₁ⁿ |yᵢ − ŷᵢ| Here n is the number of evaluated cases, yᵢ is the observed value, and ŷᵢ is the prediction. MAE has the same units as the outcome and represents average absolute error. It is often easier to explain than squared-error measures, although it gives equal weight to absolute deviations. Separate training, validation, and test data where the dataset permits. The test set should be used sparingly as an estimate of final performance. For time-dependent data, use a time-ordered split rather than randomly mixing future and past observations. Cross-validation can provide more stable estimates on training data, but it does not remove sampling bias or replace an external evaluation. Uncertainty should be communicated. A single score is an estimate, not a guarantee. Report confidence intervals or variation across folds when feasible, and explain how performance may change in a different population or future period. 6. Ethics, Governance, and Responsible PracticeEthical practice is part of the technical design, not an optional paragraph at the end. Key questions include: - Was data collected with appropriate notice or consent?
- Is the proposed use compatible with the original purpose?
- Are personal and sensitive attributes minimised and protected?
- Could the analysis disadvantage a group?
- Can affected people challenge or correct a decision?
- Who is accountable for errors?
Apply data minimisation, purpose limitation, access control, secure storage, retention limits, and de-identification where appropriate. De-identification reduces risk but does not guarantee anonymity, especially when datasets can be linked. Follow applicable privacy and data-protection law, institutional policy, contractual restrictions, and sector-specific requirements. Fairness cannot be established by one universal metric. Compare error rates, coverage, calibration, or selection rates across relevant groups when legally and ethically appropriate. Differences may arise from historical inequality, measurement practices, sampling, or genuine outcome differences. A fairness assessment should lead to investigation and mitigation, not simply a numerical declaration that a model is “fair.” Explainability should match the audience and the consequences of the decision. A stakeholder may need the main factors, limitations, and appeal process rather than technical details of every parameter. Human review is important in high-impact settings, but a nominal human in the loop does not remove responsibility if staff cannot meaningfully question the output. Generative AI can assist with coding, documentation, or brainstorming, but outputs must be checked. Confidential data should not be entered into an unapproved service. Analysts remain responsible for accuracy, licensing, attribution, security, and decisions. 7. Communicating Results and RecommendationsA professional report should normally contain: - executive summary;
- problem, stakeholders, and scope;
- data sources, permissions, and quality assessment;
- methods and assumptions;
- findings with appropriate visualisations;
- evaluation and uncertainty;
- ethical and governance assessment;
- recommendations, implementation needs, and risks;
- limitations and future work;
- reproducibility information and references.
Separate evidence from interpretation and recommendation. “Average waiting time was 18 minutes” is evidence. “Waiting time increased during the evening” is an interpretation supported by analysis. “Add one evening staff member” is a recommendation requiring consideration of cost, feasibility, and alternative explanations. Recommendations should be specific and prioritised. A useful recommendation identifies the action, responsible owner, expected benefit, resources, risks, and success measure. If evidence is insufficient, recommend a pilot or additional data collection rather than overstating certainty. 8. Illustrative Case: Predicting Missed AppointmentsThis is a fictional educational case. Background and problemA community clinic experiences missed appointments, reducing service capacity. The clinic wants to identify operational factors associated with non-attendance and consider whether reminders should be targeted. The project team defines the outcome as whether a scheduled appointment is missed and limits analysis to appointments recorded during the previous year. Data and preparationThe team receives appointment time, department, lead time, prior attendance count, reminder status, and outcome. Names and telephone numbers are excluded from the analysis dataset. The team discovers that reminder status is recorded after some cancellations and therefore could contain post-outcome information. It is removed from the predictive model but discussed as a possible intervention variable. Duplicate appointment identifiers are resolved with the clinic administrator, and missing department values are reported rather than silently assigned. Analysis and approachExploratory analysis shows that missed appointments vary by lead-time category and department. The team first evaluates a baseline that predicts the most common outcome. It then fits an interpretable classification model using only information available when an appointment is scheduled. The data is divided chronologically so that earlier appointments are used for development and later appointments for evaluation. Recall and precision are both reported because excessive alerts would burden staff. The evaluation shows that the model detects more missed appointments than the baseline, but precision is moderate. The team therefore does not recommend automatically labelling patients as unreliable. Instead, it recommends a limited pilot of additional reminders for appointments with high predicted risk, accompanied by monitoring of reminder burden and outcomes across patient groups. Outcome and learning pointsThe clinic receives a dashboard showing appointment volume, observed attendance, model performance, and changes during the pilot. The project report clearly states that the analysis identifies associations, not causes. It also records limitations: some social factors are not measured, the data comes from one clinic, and behaviour may change after the intervention. The key learning is that responsible deployment combines modelling with operational design, privacy protection, fairness checks, and ongoing monitoring. 9. Project Deliverables and Assessment RubricA complete diploma-level project may include a proposal, data dictionary, analysis notebook or code repository, cleaned-data description, technical report, presentation, and reproducibility guide. The final submission should allow a reviewer to understand what was done and why, without exposing restricted personal data. An assessment rubric can allocate marks to: | Area | Evidence of quality |
|---|
| Problem framing | Clear stakeholder, question, scope, and success criteria | | Data practice | Credible sources, permissions, dictionary, and quality audit | | Method | Appropriate baseline, analysis, assumptions, and justified choices | | Evaluation | Suitable metrics, validation, uncertainty, and limitations | | Ethics | Privacy, bias, fairness, security, and accountability considered | | Communication | Accurate visuals, clear narrative, actionable recommendations | | Reproducibility | Organised files, documented steps, and version information |
Challenges and LimitationsApplied projects commonly face incomplete or inconsistent data, changing definitions, limited sample sizes, restricted access, time pressure, and disagreement among stakeholders. Models may degrade when populations, policies, or behaviours change. Correlation may be mistaken for causation, and dashboards may encourage decisions based on visible measures while ignoring unmeasured outcomes. No project can eliminate all uncertainty. The professional response is to state assumptions, test sensitivity where possible, preserve an audit trail, avoid unsupported claims, and design monitoring or review procedures. A project should also identify what evidence would change its conclusion. Best-Practice ChecklistBefore submission or deployment, confirm that: - the question is tied to a real decision;
- the population, time period, and outcome are defined;
- data provenance, permissions, and limitations are recorded;
- raw data is preserved and transformations are reproducible;
- leakage has been investigated;
- a baseline and appropriate evaluation method are included;
- metrics reflect the costs of errors;
- uncertainty and subgroup performance are considered;
- recommendations are feasible and measurable;
- privacy, security, fairness, and accountability are addressed;
- code, documentation, and visuals have been independently reviewed.
Chapter SummaryAn applied data science project is an evidence-to-action process. It begins by framing a real problem and defining the decision, stakeholders, scope, outcome, and success criteria. The project then acquires and documents data, audits quality, prepares variables without leakage, and applies methods appropriate to the question. Baselines, suitable metrics, validation strategies, and uncertainty are necessary for credible evaluation. Ethical practice requires attention to privacy, consent, purpose limitation, bias, fairness, explainability, security, and accountability. Finally, a professional project communicates evidence separately from interpretation, produces feasible recommendations, documents limitations, and establishes monitoring and reproducibility. Key TermsProblem framing: Defining a real decision, its context, stakeholders, and evidence needs. Stakeholder: A person or organisation affected by, supplying, or using project results. Success criterion: A measurable condition used to judge whether a project meets its purpose. Data provenance: The origin, history, and transformations of a dataset. Data dictionary: Documentation describing fields, types, units, codes, and meanings. Completeness: The extent to which required data values are present. Representativeness: The degree to which data reflects the target population. Data leakage: Use of information unavailable at the time of a prediction. Feature: An input variable used for analysis or modelling. Baseline: A simple reference method against which a new method is compared. Classification: Predicting a category or class label. Regression: Estimating a numerical outcome. Precision: The proportion of predicted positives that are actually positive. Recall: The proportion of actual positives that are detected. Mean absolute error: The average absolute difference between observed and predicted numerical values. Cross-validation: Repeated training and validation using different partitions of data. Fairness: The consideration of equitable effects and error patterns across groups. Reproducibility: The ability to repeat an analysis using documented data and procedures. Data minimisation: Collecting and using no more personal data than necessary. Monitoring: Ongoing review of data, performance, risks, and outcomes after delivery. Review QuestionsShort Answer Questions- Why should a data science project begin with a decision or problem rather than an algorithm?
- Distinguish descriptive, predictive, and prescriptive questions.
- What is data leakage, and why does it invalidate a predictive evaluation?
- Define precision and recall in a binary classification setting.
- State three ethical or governance issues that should be addressed in a project report.
Long Answer Questions- Explain the lifecycle of an applied data science project and show why the stages may need to be revisited.
- Discuss how a project team should assess data quality, including completeness, validity, accuracy, timeliness, and representativeness.
- Compare possible responses to missing values and explain why no single method is always correct.
- Explain how baselines, train-test separation, validation, and uncertainty contribute to credible model evaluation.
- Describe the structure of a professional data science report and explain how it supports decision-making.
Analytical / Application Questions- A fraud dataset contains 2% fraudulent transactions. Explain why a model with 98% accuracy may have no practical value, and identify additional metrics that should be examined.
- A hospital proposes using appointment history to target reminders. Design a project plan covering the outcome, permissible predictors, evaluation method, privacy risks, and monitoring measures.
- A model performs well in development but poorly after deployment. Analyse at least four possible causes and propose a monitoring and corrective-action plan.
Multiple Choice Questions with AnswersQuestion 1Which activity should normally occur first in an applied data science project? A. Select the most complex algorithm available B. Define the problem, decision, stakeholders, and success criteria C. Publish a dashboard D. Remove all unusual observations Correct Answer: B. Define the problem, decision, stakeholders, and success criteria Question 2Which example best illustrates data leakage? A. Using appointment department to predict attendance B. Calculating a feature from information available at scheduling time C. Using final repayment status to predict a future loan default D. Splitting historical data into development and test periods Correct Answer: C. Using final repayment status to predict a future loan default Question 3If TP = 30 and FN = 10, what is recall? A. 25% B. 30% C. 40% D. 75% Correct Answer: D. 75% Question 4Which metric has the same units as a continuous outcome? A. Mean absolute error B. Precision C. Recall D. Accuracy Correct Answer: A. Mean absolute error Question 5Why is a baseline useful? A. It guarantees that the model is fair B. It provides a reference for judging added value C. It removes missing values automatically D. It proves that correlation is causation Correct Answer: B. It provides a reference for judging added value Question 6For time-dependent data, which evaluation approach is generally most appropriate? A. Randomly mix all future and past records B. Use only the largest class C. Use a time-ordered split D. Delete records from the latest period Correct Answer: C. Use a time-ordered split Question 7Which practice best reflects data minimisation? A. Collect every available personal attribute B. Retain personal data indefinitely C. Collect and use only data necessary for the stated purpose D. Publish identifiable raw records for transparency Correct Answer: C. Collect and use only data necessary for the stated purpose Question 8What does precision measure? A. The proportion of actual positives detected B. The proportion of predicted positives that are actually positive C. The proportion of all predictions that are correct D. The average absolute regression error Correct Answer: B. The proportion of predicted positives that are actually positive Question 9Which statement about an outlier is most accurate? A. Every outlier must be deleted B. An outlier is always a data-entry error C. An outlier should be investigated and interpreted in context D. Outliers cannot affect conclusions Correct Answer: C. An outlier should be investigated and interpreted in context Question 10Which recommendation is most actionable? A. Improve the service somehow B. The model is interesting C. Collect more data eventually D. Run a three-month targeted reminder pilot, assign an owner, and monitor attendance and subgroup effects Correct Answer: D. Run a three-month targeted reminder pilot, assign an owner, and monitor attendance and subgroup effects
|