The Problem
Clients need ready‑to‑run solutions for a set of public data‑science and big‑data questions posted on TestDome. The repository delivers code snippets, visualisations, and explanatory notes that can be copied into a local environment for quick validation or learning.
What This Does
The repo groups solutions by topic: Python (6 scripts), R (3 scripts), and visual assets for PowerBI, Tableau, and Spark.
Python-for-Data-Science/iris_classifier.pytrains a K‑NN model on the Iris data set.Python-for-Data-Science/marketing_costs.pycalculates cost‑per‑click and ROI from a CSV.R/login_table.Rgenerates a login table for a marketing campaign.
Each script is self‑contained; no shared libraries or database connections are referenced.
How It Is Wired
There is no single executable or import graph. The entry point for each solution is the script file itself.
- Running
python Python-for-Data-Science/iris_classifier.pyimportssklearnandpandas, loads the data from a local CSV, trains the model, and prints accuracy. R/login_table.Rloadstidyverse, readslogin_data.csv, and outputs a summary table.- The test files (
tests/test_*.py) import the same modules and assert basic invariants, but they are not wired into a CI pipeline.
Because the scripts are independent, changing one does not affect the others; there are no shared configuration files or external services.
How To Use It
# Clone the repository
git clone https://github.com/moses-y/testdome-data-science-questions
# Navigate to a language folder and run the desired script
cd Python-for-Data-Science
python iris_classifier.py
No virtual environment or dependency file is supplied; install the required packages manually (pip install pandas scikit-learn). No environment variables are required.
Real‑World Use
A data‑science trainer can copy Python-for-Data-Science/marketing_costs.py into a Jupyter notebook, feed it a real campaign CSV, and immediately obtain cost‑analysis metrics for a lesson.
Code Health & Issues
- Medium – No CI/CD pipeline;
.github/or GitHub Actions config is absent. - Medium – No
LICENSEfile; usage rights are unclear. - Low – 3 test files present (
tests/test_*), but no test runner is configured. - Low – Documentation limited to a single
README.md; no per‑script docstrings.
The repository contains 38 files, 6 Python scripts, 3 R scripts, and 2 Markdown files. No external services or databases are referenced.
The Bottom Line
The repo is a quick reference collection of small, isolated scripts that answer specific TestDome questions. It is useful for educators or interviewers who need ready code snippets but requires manual setup and lacks formal testing or licensing. Engineers who wish to integrate these solutions into a larger codebase will need to add dependencies, configure environment variables, and possibly refactor into reusable modules.