
Cleaning a Twitter Style Archive File That Is Not Quite JSON
Clean a social media archive that is JavaScript, not JSON: strip the assignment, join parts, fix string numbers and dates, unescape HTML and write Parquet.
Everything you need to level up your coding skills.

Clean a social media archive that is JavaScript, not JSON: strip the assignment, join parts, fix string numbers and dates, unescape HTML and write Parquet.

Flatten a Shopify style export of 20,000 orders into orders and line items with pandas and DuckDB: money as strings, null customers, tags and zones.

Query a GitHub style events dump of 300,000 JSON lines in DuckDB: one struct for ten event types, truncated commit lists and three-state booleans.

Turn a Stripe style webhook log into tables with DuckDB: dedupe retries, zero-decimal currencies, invoice lines and the metadata map that hides gaps.

Load JSON fixtures into PostgreSQL for tests with jsonb_populate_recordset: 25,000 rows in 0.21 s, bad fixtures caught by constraints, one typo missed.

Test a JSON API against its OpenAPI contract with Schemathesis: 1,903 generated requests found a 500 and undocumented statuses, and missed one bug.

Eight messy CSV files solved end to end with a check each: mixed dates, unquoted commas, multi-line notes, display formats, headers, bad quotes, footnotes.

Match a bank statement CSV against a ledger in SQL with a date tolerance, pair duplicate amounts correctly, and explain the difference in totals row by row.

Make quick charts from a large CSV: aggregate in DuckDB, plot with matplotlib or draw text bars in the terminal, and keep the charts honest.

Test whether a CSV column follows a normal distribution using skew, kurtosis, percentiles and Shapiro-Wilk, and why a huge file always fails the test.

Sample a large CSV for a quick first look: why the top rows mislead, random and reproducible sampling in DuckDB, and how the error shrinks with sample size.

Rank customers by revenue in a CSV with SQL, compute cumulative share and the top 10 percent, handle ties and refunds, and read the concentration curve.
We send one email when a new article is published. No spam.