Professional Python project for continuous intelligence.
Continuous intelligence systems monitor data streams, detect change, and respond in real time. This course builds those capabilities through working projects.
In the age of generative AI, durable skills are grounded in real work: setting up a professional environment, reading and running code, understanding the logic, and pushing work to a shared repository. Each project follows the structure of professional Python projects. We learn by doing.
This project introduces static anomaly detection.
The goal is to copy this repository, set up your environment, run the example analysis, and explore how anomalies are identified in static data.
You will run the example pipeline, read the code, and make small modifications to understand how the detection logic works.
The example pipeline reads pediatric clinic age and height
data from: data/clinic_data_case.csv.
It creates reasonable thresholds and outputs
anomalies (data outside the expected threshold).
You'll copy the Python file and make it your own (see docs/your-files.md),
and perform a similar analysis on data/clinic_data_yourname.csv
given adult clinic age and height data.
You'll work with just these areas:
- data/ - it starts with the data
- docs/ - tell the story
- src/cintel/ - where the magic happens
- pyproject.toml - update authorship & links
- zensical.toml - update authorship & links
Follow the step-by-step workflow guide to complete:
- Phase 1. Start & Run
- Phase 2. Change Authorship
- Phase 3. Read & Understand
- Phase 4. Modify
- Phase 5. Apply
Challenges are expected. Sometimes instructions may not quite match your operating system. When issues occur, share screenshots, error messages, and details about what you tried. Working through issues is part of implementing professional projects.
After completing Phase 1. Start & Run, you'll have your own GitHub project, running on your machine, and running the example will print out:
========================
Pipeline executed successfully!
========================And a new file named project.log will appear in the project folder.
The commands below are used in the workflow guide above. They are provided here for convenience.
Follow the guide for the full instructions.
Show command reference
After you get a copy of this repo in your own GitHub account,
open a machine terminal in your Repos folder:
# Replace username with YOUR GitHub username.
git clone https://github.com/Brandon112123/cintel-02-static-anomalies
cd cintel-02-static-anomalies
code .uv self update
uv python pin 3.14
uv sync --extra dev --extra docs --upgrade
uvx pre-commit install
git add -A
uvx pre-commit run --all-files
uv run python -m cintel.anomaly_detector_brandon
uv run python -m cintel.anomaly_detector_brandon_custom
uv run ruff format .
uv run ruff check . --fix
uv run zensical build
git add -A
git commit -m "update"
git push -u origin main- Use the UP ARROW and DOWN ARROW in the terminal to scroll through past commands.
- Use
CTRL+fto find (and replace) text within a file.
I modified the pipeline in three ways:
- I changed the input dataset from clinic_data_case.csv to clinic_data_brandon.csv.
- I changed the output file from anomalies_case.csv to anomalies_brandon.csv.
- I adjusted the anomaly detection thresholds by lowering the maximum reasonable age and height values.
This project applies anomaly detection techniques to a global suicide rate dataset.
The pipeline reads a CSV file, identifies unusually high suicide rate values, saves the results to a CSV file, and generates a chart to visualize the top anomalies.
The dataset includes:
- iso_code
- country
- year
- sex
- age_group
- suicide_rate
- Reads data using Polars
- Detects anomalies based on suicide rate thresholds
- Outputs anomaly results to CSV
- Generates a chart of top anomalies
- Logs execution for debugging and transparency
uv sync- I changed the problem from clinic age and height anomaly detection to global suicide rate anomaly detection.
- I changed the input file to
data/suicide_rates_custom.csv. - I changed the anomaly detection logic to use the
suicide_ratecolumn. - I changed the output file to
artifacts/suicide_rate_anomalies_brandon.csv. - I added a chart output file:
artifacts/suicide_rate_anomalies_chart_custom.png. - I customized the pipeline to better fit a real-world dataset.