In [ ]:
#SLIDE STYLE
#!/usr/bin/env python3
from traitlets.config.manager import BaseJSONConfigManager
from pathlib import Path
path = Path.home() / ".jupyter" / "nbconfig"
cm = BaseJSONConfigManager(config_dir=str(path))
cm.update(
    "rise",
    {
        "theme": "serif",
        "transition": "slide"
     }
)
In [1]:
#CSS MARKDOWN STYLES
from IPython.display import HTML
style = """<style> h1 {color: darkred; font-size: 28px;}
                   h2 {color: darkred; font-size: 22px;}
                   h3 {color: darkred; font-size: 18px;} </style>"""
HTML(style)
Out[1]:

SBWL 1: Data Processing 1 (PI2.0)

SBWL 1: Data Processing 1 (PI2.0)

Announcements

Data Science

  • What is Data Science?
  • What problems does Data Science address?
  • How do Data Scientists work?
  • What tools do Data Scientists use?

What is Data Science?

  • "There’s a joke running around on Twitter that the definition of a data scientist is ‘a data analyst who lives in California"— [Malcolm Chisholm?, @nivertech?]
  • "Data Scientist (n.): Person who is better at statistics than any software engineer and better at software engineering than any statistician." Josh Wills
  • "A data scientist is that unique blend of skills that can both unlock the insights of data and tell a fantastic story via the data," — DJ Patil
  • "Data scientists are involved with gathering data, massaging it into a tractable form, making it tell its story, and presenting that story to others," — [Mike Loukides]
  • "taking all aspects of life and turning them into data." [Kenneth Neil Cukier and Viktor Mayer-Schoenberger]
  • "Data science teams need people with the skills and curiosity to ask the big questions." [DJ Patil]

What is Data Science?

... bottomline: there is no single definition, but some main recurring terms:

  • about "datafication"
  • unique blend of skills (teamwork!)
  • gathering data
  • massaging data
  • telling a story about the data

Datafication

A growing area of private and social life become reflected in computerised data to be turned into "valuable" insights.

  • user tracking on the Web
  • self-quantification
  • cyber-physical ("smart") information systems: smart vehicles, smart stores, etc.
  • "smart" marketing

... plus some recurring mention of common skills...

Data Scientists' Skills

Data analyst Data scientist
Analyt. skills Analytical thinking Excellent in math and statistics
Apply established analysis methods Visualisation, new approaches
Tech. skills Data modelling, databases Data modelling, databases
Use of analysis tools Data mining
Programming skills of advantage Algorithm development, method abstraction
Domain knowledge Detailed domain knowledge Background domain knowledge
Project management Creativity
Communication skills Team work

Data Scientists' Skills

''3 sexy skills of data geeks'' (Nathan Yau, Rise of the Data Scientist, 2009)

  • Statistics (data analyses as known to you; see course on "Data Analytics")
  • Visualization (plots, visualisation tooling like dashboards, etc.; Data Science Lab)
  • Data munging (scraping, parsing, formatting, and cleaning data) (This course)

What problems does Data Science address?

Data Science as a Process

What does a Data Science process look like?

Example of a "classic" data-driven process: ETL in dataware housing

  • ETL refers to a process in database usage and especially in data warehousing that:
  • Extracts data from homogeneous or heterogeneous data sources
  • Transforms the data for storing it in proper format or structure for querying and analysis purpose (includes cleansing of deduplications, inconsistencies, dealing with missing data,...)
  • Loads it into the final target (database, more specifically, operational data store, data mart, or data warehouse)

See., e.g. Matteo Golfarelli, Stefano Rizzi. Data Warehouse Design: Modern Principles and Methodologies. McGraw-Hill, 2009.

What does a Data Science process look like?

"Classic" views are challenged by datafication:

  • The "classic view" typically assumes: fixed, static processing pipelines vs. iterative, dynamic pipelines in DS
  • Typically assumes complete/clean data at the "load" stage vs. messy data in DS
  • Data cleansing sometimes viewed as a part of a Transform step, sometimes not

What does a Data Science Process look like?

"Knowledge Discovery in Databases (KDD)" process (often used in the course of Data Mining) </font>

image.png

Source: Howard Hamilton </font>

What does a Data Science Lifecycle look like?

Towards a ''Data Science workflow"

image.png

Cathy O'Neil, Rachel Schutt. Doing Data Science: Straight Talk from the Frontline (O'Reilly, 2013) (Chapter 2) </font>

Iterative Operationalisation (1)

image.png

Danyel Fisher & Miriah Meyer. "Making Data Visual" (O'Reilly, 2018) (Chapter 2)* </font>

Iterative Operationalisation (2)

  • Operationalisation involves searching for proxies (proxy tasks, proxy values) for the original question, standing-in for it at the level of the data set.
  • Ex. data: a list of movies with ratings (e.g., IMDB) and a list of directors
  • Q1: "Who are the best movie directors"?
  • Proxy for best director: "Having directed many good movies"
  • Q2: "What is a good movie"?
  • Proxy: Good movie: "Having many good IMDB ratings"
  • Q3: What is a "good" rating? How many ratings constitute "many" ratings?
  • Proxy: distributions of rating scores and number of ratings per movie

Iterative Operationalisation (3): Pitfalls

WARNING: At each stage, things can go wrong! Any filtering/aggregation may bias the data!

  • […] data scientists […] spend a lot more time trying to get data into shape than anyone cares to admit—maybe up to 90% of their time. Finally, they don’t find religion in tools, methods, or academic departments. They are versatile and interdisciplinary*
  • Yet far too much handcrafted work — what data scientists call "data wrangling," "data munging" and “data janitor work” — is still required. Data scientists, according to interviews and expert estimates, spend from **50 percent to 80 percent of their time** mired in this more mundane labor of collecting and preparing unruly digital data, before it can be explored for useful nuggets.

"Data wrangling is a huge — and surprisingly so — part of the job,” said Monica Rogati, vice president for data science at Jawbone, whose sensor-filled wristband and software track activity, sleep and food consumption, and suggest dietary and health tips based on the numbers. “It’s something that is not appreciated by data civilians. At times, it feels like everything we do."

New York times

Challenges in Data Science (cont'd)

image.png

The Data Science Lifecycle: your own experiences?

Which difficulties have you already experienced when working with data?

  1. ... ever had problems loading/ importing a file someone sent to you because of an unknown file format?
  2. ... ever encountered something like this: "K�snudl"?
  3. ... ever encountered blanks in your data?
  4. ... ever saw an observation (an insight, a trend) disappear when combining from different data sets (a.k.a. "Simpson's paradox")
  5. ... more on that in the next lectures!

Excursus: Data losses

image.png

Excursus: Simpson's paradox (1)

image.png

Excursus: Simpson's paradox (2)

image.png

Excursus: Simpson's paradox (3)

image.png

Excursus: Simpson's paradox (4)

image.png

Data Science Lifecycle: Summary

Again, not a single definition, but some recurring terms:

  1. find and collect all relevant data
  2. identify issues & problems within the data
  3. organise / transform / merge data
  4. systematically operationalise questions about the data: proxies
  5. select a visualisation, a statistical technique, or a machine-learning technique as an outcome of operationalisation
  6. provide interpretations and limitations of the results
  7. communicate results

Data Science Ethics

Ethics in Data Science: FACT

  • Fairness : How to avoid unfair conclusions even if they are true?
  • Accuracy : How to answer questions with a guaranteed level of accuracy?
  • Confidentiality : How to answer questions without revealing secrets?
  • Transparency : How to clarify answers such that they become indisputable?

Ethics in Data Science: FACT (cont'd)

image.png Source http://www.responsibledatascience.org/

Data Science Lifecycle: Summary

NOTE:

  • Typically, Data Science is not a one-shot process, but an (iterative) lifecycle.
  • Not ad hoc, but short-lived than building than classic processes: ETL, data mining.
  • Typically, you need to revisit/ adjust your process, either for improving it or for maintenance (sources changing, source formats changing, etc.)
  • Mind FACT in Data Science projects
  • These data-processing steps account for 80% of the working time or more;
  • This is the focus of our course ''Data Processing I'' !!!

Data Science Tools

Data Science Tools: Python and R

image.png

Source https://www.datacamp.com/community/tutorials/r-or-python-for-data-analysis

Python and R

image.png

Source https://www.datacamp.com/community/tutorials/r-or-python-for-data-analysis

Python and R

image.png

Source https://www.datacamp.com/community/tutorials/r-or-python-for-data-analysis

Why Python and R

"The Python vs R debate confines you to one programming language. You should look beyond it and embrace both tools for their respective strengths. Using more tools will only make you better as a data scientist."

TheNextWeb

  • Data Processing 1 (SBWL 1): Python
  • Data Analytics (SBWL 2): R
  • Data Processing (SBWL 3): Python