Is the new Raspberry Pi AI Kit better than Google Coral?
135561 Views
Build Your Own AI Assistant Part 1 - Creating the Assistant
121827 Views
Control Arduino with Python using Firmata / PyFirmata
88872 Views
How to Map with LiDAR - using a Raspberry Pi Zero 2W, RPLidar and Rviz
65602 Views
Creating a Supercomputer with a Raspberry Pi 5 Cluster and Docker Swarm!
60799 Views
Node-Red Automation, MQTT, NodeMCU & MicroPython
53953 Views
How to Keep your Raspberry Pi happy
How to Install Pi-Apps on a Raspberry Pi
Pikon II, The Ultimate DIY Raspberry Pi Camera!
Pico Plotter
LEGO Gets Lights & Sound with Tiny FX
Thinkman
DuckDB - Fast, free analytics
1h 36m
Obsidian
1h 0m
Getting Started with C on the Raspberry Pi Pico
0h 50m
Running K3s on Raspberry Pi
1h 28m
From Docker to Podman
1h 2m
MicroPython Robotics Projects with the Raspberry Pi Pico
0h 54m
Learn how to Program in Python, C, Rust, and more.
Learn Linux from the basics to advanced topics.
Learn how to use a Raspberry Pi Pico
Learn MicroPython the best language for MicroControllers
Learn Docker, the leading containerization platform. Docker is used to build, ship, and run applications in a consistent and reliable manner, making it a popular choice for DevOps and cloud-native development.
Learn how to build SMARS robots, starting with the 3D Printing the model, Designing SMARS and Programming SMARS
Learn how to build robots, starting with the basics, then move on to learning Python and MicroPython for microcontrollers, finally learn how to make things with Fusion 360.
Learn Python, the most popular programming language in the world. Python is used in many different areas, including Web Development, Data Science, Machine Learning, Robotics and more.
Learn how to create robots in 3D, using Fusion 360 and FreeCAD. The models can be printed out using a 3d printer and then assembled into a physical robot.
Learn how to create Databases in Python, with SQLite3 and Redis.
KevsRobots Learning Platform
56% Percent Complete
By Kevin McAleer, 4 Minutes
Let’s run a compact analysis workflow you can adapt to your own data. We’ll ingest CSV, transform to tidy tables, and export Parquet.
New to terms like view, table, materialize, or Parquet? See the Beginner glossary.
Note: ensure an exports/ folder exists in your project (or change the path) before running COPY commands below.
exports/
COPY
Why this matters:
Goal: get the source data into a table for stable, fast queries.
.open analytics.duckdb CREATE OR REPLACE TABLE tips AS SELECT * FROM read_csv_auto('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv');
Notes:
.open
read_csv_auto
Quality check:
SELECT COUNT(*) AS rows, MIN(total_bill), MAX(total_bill) FROM tips; SELECT * FROM tips LIMIT 5;
You try it Verify row count: SELECT COUNT(*) FROM tips; Quick peek: SELECT * FROM tips LIMIT 5;
You try it
SELECT COUNT(*) FROM tips;
SELECT * FROM tips LIMIT 5;
Goal: create helpful metrics without changing the raw table.
CREATE OR REPLACE VIEW v_tips_enriched AS SELECT *, ROUND(tip / NULLIF(total_bill,0) * 100, 2) AS tip_pct FROM tips;
NULLIF(total_bill,0)
tip_pct
SELECT * FROM v_tips_enriched LIMIT 5; SELECT AVG(tip_pct) FROM v_tips_enriched;
You try it Round tip_pct to 2 decimals as tip_pct_2dp Filter out rows where tip_pct is NULL
tip_pct_2dp
Goal: answer questions by summarizing and comparing groups.
-- Day/time revenue and tip behavior WITH day_time AS ( SELECT day, time, SUM(total_bill) AS revenue, AVG(tip_pct) AS avg_tip_pct FROM v_tips_enriched GROUP BY day, time ) SELECT * FROM day_time ORDER BY revenue DESC;
GROUP BY
SUM(total_bill)
AVG(tip_pct)
Try: filter to a specific day or time to focus the analysis.
Goal: save results you’ll reuse or share.
CREATE OR REPLACE TABLE tip_summary AS SELECT day, time, ROUND(SUM(total_bill),2) AS revenue, ROUND(AVG(tip_pct),2) AS avg_tip_pct, COUNT(*) AS orders FROM v_tips_enriched GROUP BY day, time;
SELECT * FROM tip_summary ORDER BY revenue DESC LIMIT 5;
Goal: produce a fast, portable file for downstream tools.
COPY tip_summary TO 'exports/tip_summary.parquet' (FORMAT 'parquet');
import duckdb, pandas as pd con = duckdb.connect("analytics.duckdb") df = con.execute("SELECT * FROM tip_summary ORDER BY revenue DESC").df() ax = df.plot.bar(x='day', y='revenue', title='Revenue by Day') fig = ax.get_figure() fig.tight_layout() fig.savefig('exports/revenue_by_day.png', dpi=150)
Tip:
You try it Change chart type to line or stacked bar Save the figure as exports/tips_chart.png
exports/tips_chart.png
weekend
avg_tip_pct
high_tip
tip_pct >= 18
< Previous Next >
You can use the arrows ← → on your keyboard to navigate between lessons.
← →