Data analysis with SQLite and Python for PyCon 2023
20th April 2023
I’m at PyCon 2023 in Salt Lake City this week.
Yesterday afternoon I presented a three hour tutorial on Data Analysis with SQLite and Python. I think it went well!
Update: The 2hr45m video of the tutorial is now available on YouTube.
I covered basics of using SQLite in Python through the sqlite3 module in the standard library, and then expanded that to demonstrate sqlite-utils, Datasette and even spent a bit of time on Datasette Lite.
One of the things I learned from the Carpentries teacher training a while ago is that a really great way to run a workshop like this is to have detailed, extensive notes available and then to work through those, slowly, at the front of the room.
I don’t know if I’ve quite nailed the “slowly” part, but I do find that having an extensive pre-prepared handout really helps keep things on track. It also gives attendees a chance to work at their own pace.
You can find the full 9-page workshop handout I prepared here:
sqlite-tutorial-pycon-2023.readthedocs.io
I built the handout site using Sphinx and Markdown, with myst-parser and sphinx_rtd_theme and hosted on Read the Docs. The underlying GitHub repository is here:
github.com/simonw/sqlite-tutorial-pycon-2023
I’m hoping to recycle some of the material from the tutorial to extend Datasette’s official tutorial series—I find that presenting workshops is an excellent opportunity to bulk up Datasette’s own documentation.
The Advanced SQL section in particular would benefit from being extended. It covers aggregations, subqueries, CTEs, SQLite’s JSON features and window functions—each of which could easily be expanded into their own full tutorial.
More recent articles
- Prompt injection explained, November 2023 edition - 27th November 2023
- I'm on the Newsroom Robots podcast, with thoughts on the OpenAI board - 25th November 2023
- Weeknotes: DevDay, GitHub Universe, OpenAI chaos - 22nd November 2023
- Deciphering clues in a news article to understand how it was reported - 22nd November 2023
- Exploring GPTs: ChatGPT in a trench coat? - 15th November 2023
- Financial sustainability for open source projects at GitHub Universe - 10th November 2023
- ospeak: a CLI tool for speaking text in the terminal via OpenAI - 7th November 2023
- DALL-E 3, GPT4All, PMTiles, sqlite-migrate, datasette-edit-schema - 30th October 2023
- Now add a walrus: Prompt engineering in DALL-E 3 - 26th October 2023
- Execute Jina embeddings with a CLI using llm-embed-jina - 26th October 2023