Extract. Transform. Read.
Powerful But Messy Data
Explore the subtle power of data that may not be packaged in a conventional form.
The following short read is an excerpt from my weekly newsletter, Extract. Transform. Read. sent to 2,000+ aspiring data professionals. If you enjoy this snippet, you can sign up and receive your free project ideation guide.
As difficult as data engineering can be, 95% of the time there is a structure to data that originates from external streams, APIs and vendor file deliveries. Useful context is provided via documentation and stakeholder requirements. And specific libraries and SDKs exist to help speed up the pipeline build process.
But what about the other 5% of the time when requirements might be structured, but your data isn’t?
Unstructured data comes in many forms, including incomprehensible metadata from ioT devices; since I have the most experience with textual data, I can speak to how I recommend approaching this classification of data.
Since I nearly always work with structured data at work, I’ll be speaking from my experience scraping web data, parsing text files and reading PDFs.
- Understand the min() max() and shape of your data; for textual data, this means knowing first and last pages (or tokens) and the length of your doc
- As soon as possible, aggregate your raw data into a form you can work with; I’m partial to lists that I convert to data frame columns, but you could just as easily construct a dict()
- Once you know what you’re looking for, leverage regex string searches to avoid processing EVERYTHING; there are many regex generators that can check your expressions as you write them
- If you’re really lost, check the rendered output of your data; if this is a PDF, open your file in preview or a similar view
Finally, if you’re working with a particular type of data, understand what libraries are available to reduce the manual parsing that will be required.
I’m most familiar with PDF data; I share insights in a recent article.
And remember, the only shape you don’t want your data is (0,0).
Thanks for ingesting,
-Zach Quinn