DEV Community

Cover image for What do marketing tags, broken author arrays, and an unexpected email from Derek Sivers have in common?
Nicholas
Nicholas

Posted on

What do marketing tags, broken author arrays, and an unexpected email from Derek Sivers have in common?

Hey guys 👋

I don't have a massive technical feature to showcase today, but I do have a solid batch of data pipeline updates, a bug fix story, and a pretty inspiring personal highlight.

While refining the secondary parser for the Ukrainian book market, I ran into classic data pollution issues, stripped out marketing noise, and got a reminder of why building side projects should be fun.

Here is the weekly progress report!

Fixing the "Comma-in-Category" Bug

After rewriting the extended scraper, I noticed a subtle data formatting bug during early inspection.

Certain books on retail platforms list multiple authors. My initial DOM selection logic grabbed only the primary author string. However, because of how the HTML elements were structured, the trailing author separators (commas and secondary tags) bled directly into the Category column!

Corrupted: Category = ", Fiction, Bestsellers"
Cleaned:   Category = "Fiction"
Enter fullscreen mode Exit fullscreen mode

To fix this:

  • Updated the scraper logic to properly parse multi-author arrays.
  • Manually sanitized and patched 20 affected JSON objects in the clean dataset to keep data integrity intact.

Stripping "Garbage" Categories & Preprocessing

I’m currently finishing up the final data preparation script, specifically handling empty values (NaNs) and filtering non-standard categories.

Originally, I expected platform categories to function purely as literary sub-genres (e.g., Sci-Fi, Historical Fiction, Biography). However, e-commerce platforms heavily mix genre metadata with promotional marketing tags:

  • "Reader's Choice"
  • "Top Bestsellers 2023"
  • "Must-Read Recommendations"

These tags provide zero value when trying to analyze actual genre trends over time. My preprocessing script is currently dropping these noise categories along with empty rows to leave a pure, genre-focused analytical dataset.

Code for cleaning categories

Jsonl fragment

An Unexpected Reply from Derek Sivers

On a non-technical note, something really cool happened this week.

I recently finished reading Anything You Want by Derek Sivers-a short, brilliant book about entrepreneurship, independence, and doing things your own way. At the end of the book, Derek invites readers to send him an email, introduce themselves, and share what they are working on.

I decided to write to him, not really expecting a reply. To my surprise, he actually responded! He shared some thoughtful feedback and even recommended a few more great books to check out.

It was a great reminder that building side projects-whether it's a Python chess engine or a market scraper-should come from a place of curiosity and freedom.

Email from Derek

What's Next?

  • Finishing the final NaN drop and category mapping pass in Pandas.
  • Running exploratory data analysis (EDA) to generate our very first trend charts.
  • Starting one of Derek's recommended books during my 3-day rest period!

Have you ever reached out directly to an author or creator who inspired you? How do you handle promotional marketing tags when cleaning e-commerce data? Let's chat in the comments below! 👇

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.