DEV Community

Cover image for Day 32 of improving my Data Science skills
Sylvester Promise
Sylvester Promise

Posted on

Day 32 of improving my Data Science skills

Today was one of those days where everything quietly stacked on top of each other.

I worked across three areas:
Data Visualization (Matplotlib): learning how to create subplots using small multiples, one figure, multiple related stories.

Plotting multiple graphs
Introduction to importing Data: loading flat files with np.loadtxt(), fast, simple, and perfect for numeric data.

Loading flat files
Intermediate importing Data (which is my main focus): scraping the web using BeautifulSoup.

Recall yesterday, I fetched raw HTML with requests. Today, I learned how to make sense of it. Which brings me to four questions 👇

1️⃣ Why is BeautifulSoup important?
If you work with data, here's a question for you:
How much valuable information do you rely on that doesn't come neatly packaged in CSVs or databases? Job postings? Market prices? Customer reviews? Competitor insights? Public reports? Most of it lives on the web, messy, inconsistent, and unstructured.

BeautifulSoup matters because it helps you turn public web pages into usable data, without needing to be a full-blown web developer.
Now that we have gotten that out of the way, I would like to know:
Where does your organization still manually copy data from websites?
What decisions could be faster if that data was structured automatically?

2️⃣ What is BeautifulSoup actually about?
In web development, there's a term called "tag soup."
It refers to HTML that's: poorly structured, inconsistent, and syntactically messy... that's the common structure of most of the web.

BeautifulSoup exists to make tag soup beautiful again. It: parses messy HTML, organizes it into a tree structure, and lets you extract exactly what you need, calmly and predictably

The core object is called BeautifulSoup, and one of its most helpful methods is prettify(), which formats ugly HTML into clean, readable, indented structure.
Think of it as: turning a noisy room into an organized library.

3️⃣ How does BeautifulSoup work? (The practical framework)
Here's the simple workflow I practiced today:

Fetch the page (using requests from yesterday)
Parse the HTML with BeautifulSoup
Navigate the structure
Extract what matters

Extracting data using BeautifulSoup
Some methods I used:
.prettify() to see clean, indented HTML

.title to get the page title

.get_text() to extract all readable text

.find_all() to collect all links or repeated elements

This is where scraping stops being "guesswork" and starts being systematic analysis.

4️⃣ What happens when you apply this to your world?
Now imagine:
Tracking competitor pricing changes automatically

Monitoring job market trends weekly

Extracting customer sentiment from reviews

Building datasets that don't officially "exist"

What questions could you answer if the web became queryable?
And more importantly: What data are you currently ignoring because it looks too messy to touch?

Today's lesson for me was simple but powerful:
Getting data isn't the hard part anymore, understanding and structuring it is.

Tomorrow, I'll keep pushing deeper into implementation and real use cases.
Still learning. Still experimenting. Still curious.

If you've ever wondered how raw web pages turn into insights, this is one of the first real steps.

-SP

Top comments (0)