Data Wrangling John Meehan Jeff Rasley Working with raw - - PowerPoint PPT Presentation

data wrangling
SMART_READER_LITE
LIVE PREVIEW

Data Wrangling John Meehan Jeff Rasley Working with raw - - PowerPoint PPT Presentation

Data Wrangling John Meehan Jeff Rasley Working with raw data sucks. Data comes in all shapes and sizes CSV files, PDFs, stone tablets,


slide-1
SLIDE 1

Data ¡Wrangling ¡

John ¡Meehan ¡ Jeff ¡Rasley ¡

slide-2
SLIDE 2

Working ¡with ¡raw ¡data ¡sucks. ¡

  • Data ¡comes ¡in ¡all ¡shapes ¡and ¡sizes ¡

– CSV ¡files, ¡PDFs, ¡stone ¡tablets, ¡.jpg… ¡

  • Different ¡files ¡have ¡different ¡formaIng ¡

– Spaces ¡instead ¡of ¡NULLs, ¡extra ¡rows ¡

  • “Dirty” ¡data ¡

– Unwanted ¡anomalies ¡ – Duplicates ¡

slide-3
SLIDE 3

Current ¡Tools ¡

  • Focus ¡on ¡specific ¡problems ¡

– Resolving ¡enQQes ¡ – Removing ¡duplicates ¡ – Schema ¡matching ¡

  • Most ¡systems ¡are ¡non-­‑interacQve ¡

– Inaccessible ¡to ¡general ¡audience ¡

  • A ¡lot ¡of ¡people ¡just ¡use ¡Excel ¡or ¡regular ¡

expressions… ¡

slide-4
SLIDE 4

Data ¡Wrangling ¡

  • Goal: ¡extract ¡and ¡standardize ¡the ¡raw ¡data ¡

– Combine ¡mulQple ¡data ¡sources ¡ – Clean ¡data ¡anomalies ¡

  • Combine ¡automaQon ¡with ¡interacQve ¡

visualizaQons ¡to ¡aid ¡in ¡cleaning ¡

  • Improve ¡efficiency ¡and ¡scale ¡of ¡data ¡imporQng ¡
  • Lower ¡the ¡threshold ¡for ¡broader ¡audiences ¡
slide-5
SLIDE 5

Three ¡Data ¡Sources: ¡ Database, ¡PDF, ¡CSV ¡ Missing ¡headers, ¡ MulQple ¡date ¡formats, ¡ Merged ¡columns ¡ ¡ Success! ¡ ¡ ¡………but ¡ immediately ¡geIng ¡error: ¡ “Empty ¡cells ¡in ¡column ¡3” ¡ Ugh, ¡screw ¡it….. ¡ Back ¡to ¡imporQng. ¡ Data ¡reimported, ¡ More ¡cleaning ¡ Analysis ¡possible, ¡but ¡ data ¡quality ¡sQll ¡sucks ¡ SUCCESS!!!! ¡ Repeat ¡data ¡loading ¡ less ¡painful, ¡but ¡sQll ¡ annoying ¡

slide-6
SLIDE 6

Types ¡of ¡Data ¡Problems ¡

  • Missing ¡data ¡
  • Incorrect ¡data ¡
  • Inconsistent ¡representaQons ¡of ¡the ¡same ¡data ¡
  • About ¡75% ¡of ¡data ¡problems ¡require ¡human ¡

intervenQon ¡

  • Cleaning ¡data ¡vs ¡overly-­‑saniQzing ¡data ¡
slide-7
SLIDE 7

Diagnosing ¡data ¡problems ¡

  • VisualizaQons ¡can ¡convey ¡“raw” ¡data ¡
  • Different ¡visual ¡representaQons ¡highlight ¡

different ¡types ¡of ¡data ¡issues ¡

– Outliers ¡oaen ¡stand ¡out ¡in ¡a ¡plot ¡ – Missing ¡data ¡will ¡cause ¡gap ¡or ¡zero ¡value ¡

  • Becomes ¡increasingly ¡difficult ¡as ¡data ¡gets ¡

larger ¡

– Visual ¡design ¡coupled ¡with ¡interacQon ¡ – Sampling ¡

slide-8
SLIDE 8

Node-­‑Link ¡Diagram ¡

slide-9
SLIDE 9

Matrix ¡View ¡

slide-10
SLIDE 10

Sorted ¡Matrix ¡View ¡

slide-11
SLIDE 11
slide-12
SLIDE 12

Visualizing ¡Missing ¡Data ¡

  • Set ¡values ¡to ¡zero? ¡
  • Interpolate ¡based ¡on ¡exisQng ¡data? ¡
  • Omit ¡missing ¡data? ¡
slide-13
SLIDE 13

Visualizing ¡Uncertain ¡Data ¡

  • Can ¡arise ¡from: ¡

– Measurement ¡errors ¡ – Missing ¡data ¡ – Sampling ¡

  • VisualizaQon ¡must ¡

– Consider ¡all ¡components ¡of ¡uncertainty ¡ – Depict ¡mulQple ¡kinds ¡of ¡uncertainty ¡ – Interact ¡with ¡uncertainty ¡depicQons ¡

slide-14
SLIDE 14

Transforming ¡Data ¡

  • SpliIng ¡columns, ¡converQng ¡into ¡meaningful ¡

records ¡

  • Typical ¡methods: ¡regular ¡expressions, ¡

programming ¡by ¡demonstraQon ¡

– Prone ¡to ¡errors, ¡tedious ¡

  • InteracQve ¡tools ¡simplify ¡the ¡process ¡

– Guide ¡user ¡through ¡seIng ¡automated ¡constraints ¡ – Generates ¡scripts ¡for ¡the ¡user ¡

slide-15
SLIDE 15

Transforming ¡Data ¡(cont) ¡

  • Data ¡formaIng, ¡extracQon, ¡and ¡conversion ¡
  • CorrecQng ¡erroneous ¡values ¡
  • IntegraQng ¡mulQple ¡data ¡sets ¡
slide-16
SLIDE 16

EdiQng ¡and ¡AudiQng ¡TransformaQons ¡

  • Data ¡Provenance ¡

– Maintaining ¡the ¡data ¡history ¡ – Track ¡the ¡lineage ¡of ¡a ¡specific ¡item’s ¡origins ¡

  • Used ¡for ¡the ¡modificaQon, ¡reuse, ¡and ¡

understanding ¡of ¡a ¡transformaQon ¡

  • What ¡transformaQon ¡language ¡should ¡be ¡

used? ¡

– Extend ¡exisQng ¡languages? ¡

slide-17
SLIDE 17

Wrangling ¡in ¡the ¡Cloud ¡

  • Allows ¡the ¡sharing ¡of ¡data ¡transformaQons ¡
  • Mining ¡records ¡of ¡wrangling ¡

– Befer ¡automaQc ¡suggesQons ¡

  • User-­‑defined ¡data ¡types ¡
  • Feedback ¡from ¡downstream ¡analysts ¡

– Crowdsourcing ¡the ¡final ¡result ¡ – Allow ¡users ¡to ¡annotate ¡or ¡correct ¡the ¡data ¡

slide-18
SLIDE 18

Checkpoint-­‑Conclusion ¡

  • Data ¡wrangling ¡is ¡oaen ¡a ¡second-­‑class ¡ciQzen ¡
  • Common ¡problems, ¡very ¡Qme-­‑consuming ¡

– Manual ¡approach ¡is ¡no ¡longer ¡a ¡viable ¡opQon ¡

  • Future ¡work: ¡extend ¡visual ¡approaches ¡into ¡

the ¡data ¡wrangling ¡phase ¡

  • Plenty ¡of ¡research ¡direcQons ¡
slide-19
SLIDE 19

Secure ¡Data ¡AnalyQcs ¡

  • Private/sensiQve ¡data ¡

– SSN, ¡Medical, ¡Classified, ¡etc. ¡

  • Cloud-­‑base ¡analysis ¡currently ¡doesn’t ¡work ¡
  • Local ¡analysis ¡is ¡key ¡
  • Research ¡area? ¡
slide-20
SLIDE 20

Pofer's ¡Wheel: ¡An ¡InteracQve ¡Data ¡ Cleaning ¡System ¡

  • Vijayshankar ¡Raman ¡and ¡Joseph ¡Hellerstein ¡

(VLDB ¡‘01) ¡

  • Provide ¡a ¡graphical ¡interacQve ¡tool ¡to ¡support ¡

various ¡data ¡transformaQons ¡with ¡suggesQons ¡

slide-21
SLIDE 21

TransformaQons ¡

slide-22
SLIDE 22

Download! ¡

  • Pofer's ¡Wheel ¡A-­‑B-­‑C: ¡An ¡InteracQve ¡Tool ¡for ¡

Data ¡Analysis, ¡Cleansing, ¡and ¡TransformaQon ¡

– hfp://control.cs.berkeley.edu/abc/ ¡

  • (But ¡you ¡probably ¡don’t ¡want ¡to, ¡last ¡release ¡

was ¡Oct ¡10, ¡2000) ¡

slide-23
SLIDE 23

Data ¡Wrangler ¡

  • Wrangler: ¡InteracQve ¡Visual ¡SpecificaQon ¡of ¡

Data ¡TransformaQon ¡Scripts ¡(CHI ¡‘11) ¡

– Sean ¡Kandel, ¡Andreas ¡Paepcke, ¡Joseph ¡Hellerstein, ¡ Jeffrey ¡Heer ¡(Stanford ¡Vis ¡Group ¡+ ¡Berkeley) ¡

$4.3M ¡in ¡Series ¡A ¡funding! ¡(1/12) ¡

D3 ¡

slide-24
SLIDE 24

What’s ¡new? ¡

  • Similar ¡goals ¡as ¡Pofer’s ¡Wheel ¡
  • Improved ¡UI ¡for ¡the ¡web ¡
  • Python ¡& ¡JavaScript ¡libraries ¡
  • AddiQonal ¡transformaQons ¡such ¡as ¡fill ¡
slide-25
SLIDE 25

Demo ¡ ¡

(~10min) ¡

slide-26
SLIDE 26

7 ¡Command-­‑Line ¡Tools ¡for ¡Data ¡Science ¡

  • hfp://jeroenjanssens.com/2013/09/19/

seven-­‑command-­‑line-­‑tools-­‑for-­‑data-­‑ science.html ¡