SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
@PaulBradshaw
Leanpub.com/u/paulbradshaw
Birmingham City University, City University London
Online Journalism Blog, HelpMeInvestigate
Saturday, 10 May 14
Show of hands. Who has...
- Calculated a proportion
- Used a function like SUM
- Used pivot tables
- Used a function like
VLOOKUP
Saturday, 10 May 14
PART ONE:
BASICS.
Saturday, 10 May 14
Saturday, 10 May 14
https://
pefonline.electoralcommission.org.uk/
search/searchintro.aspx
http://www.eib.org/projects/loans/list/
Download this data:
Donations or EIB loans
Saturday, 10 May 14
- Make a copy, work on that
- Use CTRL+arrow keys to skip to
edges of data
- Clean first few rows to create single
heading row
- Remove grand total row
- Remove empty rows (Open Refine)
Speed: keyboard shortcuts for
checking the data
Saturday, 10 May 14
Numbers Strings Calculations
10 John Smith =10+20+30
20 Kate Brown =A2+A3+A4
30 Mike Moore =SUM(A2:A4)
N/A Kim Smith =COUNT(A:A)
50 =COUNTA(B:B)
Row 1
Column A Column B Column C
Row 3
Row 4
Row 5
Row 6
Row 2
Saturday, 10 May 14
Granular data has row for every
payment, person, crime etc.
Aggregate has rows for total crimes,
payments, etc.
Granular always better - can calculate
your own aggregates
Two types of datasets:
Aggregate and granular
Saturday, 10 May 14
Aggregate data:
- put the focus in Rows
- numbers (money, crimes) in Values
Granular: pivot tables
Saturday, 10 May 14
Saturday, 10 May 14
= indicates this is a formula
SUM is the function to be applied
( contains the ingredients for that formula
D2:D300 this is a range (array) of cells*
, separates each ingredient
) ends the list of ingredients
Using functions - and
arguments
Saturday, 10 May 14
=SUM(D:D) ignores any text/empty cells
=MAX(D:D)
=MIN(D:D)
=AVERAGE(D:D)
More speed: use column
ranges
Saturday, 10 May 14
=AVERAGE(D:D)
=MEDIAN(D:D)
=MODE(D:D) - for ‘most common’: useful
for ordinal ratings which shouldn’t be
averaged.
Sense-checking:
misleading averages
Saturday, 10 May 14
=MAX(D:D)/SUM(D:D) - how much of
the total is accounted for by the biggest
value?
=SUM(D35:D64)/SUM(D:D) - what
proportion from one entity?
=SUM(D:D)/365 - how much per day?
(for annual data)
Combining functions to quickly
make numbers meaningful
Saturday, 10 May 14
Org spending £X per day
Company receives X% of spending
Org spent £X on Y
Stories you can report quickly
Saturday, 10 May 14
Saturday, 10 May 14
Data
health
warning!
Remember the context: e.g. spending over £500, inflation
Saturday, 10 May 14
PART TWO:
CHECKING
Saturday, 10 May 14
Saturday, 10 May 14
=COUNT(D:D)
=COUNTA(D:D)
=COUNTBLANK(D2:D15000) - have to
use specific range or blank cells
underneath table are counted
=COUNTIF(D:D, “Other”)
COUNT functions:
Checking data coverage
Saturday, 10 May 14
=COUNTIF(D:D, “Individual”)
=COUNTIFS(D:D, “Individual”,
B:B,”<10000”)
=SUMIF(D:D, “<10000”)
=IF(This, then that, otherwise this)
IF functions:
Drill down further
Saturday, 10 May 14
=COUNTIF(D:D, “*hire*”)
=COUNTIF(D:D, “Scottish*”)
=COUNTIF(D:D, “* hire*”)
COUNTIF:
Use wildcards - and spaces
Saturday, 10 May 14
Saturday, 10 May 14
=COUNTIF(D2, “*adidas*”)
=COUNTIF(D3, “*adidas*”)
=COUNTIF(D4, “*adidas*”)
...
Then sort to bring the 1s to the top
COUNTIF:
Test free text data
Saturday, 10 May 14
THE
BLACK CROSS
DOUBLE
CLICK
Saturday, 10 May 14
Saturday, 10 May 14
PART THREE:
CLEANING
Saturday, 10 May 14
Saturday, 10 May 14
=TRIM(D2)
=SUBSTITUTE(D2,“ ”, “”)
(Target cell, what you want to substitute,
what you want to replace it with)
=SEARCH(“Wales”,A2)
Gives a position of the first match
Cleaning text:
TRIM, SEARCH, SUBSTITUTE
Saturday, 10 May 14
mr SMITH
=UPPER(D2) = MR SMITH
=LOWER(D2) = mr smith
=PROPER(D2) = Mr Smith
Cleaning text:
UPPER, LOWER, PROPER
Saturday, 10 May 14
=LEFT(E2,3) = first 3 characters in E2
=RIGHT(E2,3) = last 3 characters in E2
=MID(E2,10,3) = the 3 characters in E2
starting from position 10
Cleaning text:
LEFT, RIGHT, MID
Saturday, 10 May 14
=LEN(E2) = how many characters in E2
=LEFT(E2,LEN(E2)-3) = Length of E2 -
3. Grab that many characters. i.e.
- If E2 is 5 characters, it will grab the first
2 (5-3=2)
- If E2 is 7 characters it will grab the first
4 (7-3=4)
Combine with
LEN
Saturday, 10 May 14
=SEARCH(“ ”,E2) = which position is the
first space
=LEFT(E2,SEARCH(“ ”,E2)) = Grab all
characters up to (and including) that
space
Combine with
SEARCH
Saturday, 10 May 14
=SEARCH(“ ”,E2) = which position is the
first space
=LEFT(E2,SEARCH(“ ”,E2)) = Grab all
characters up to (and including) that
space
=TRIM(LEFT(E2,SEARCH(“ ”,E2)))
Combine with
SEARCH
Saturday, 10 May 14
=ISERROR(D2) = TRUE or FALSE
See also:
ISNUMBER, ISTEXT, ISNONTEXT,
ISLOGICAL, ISEVEN, ISODD
ISERR (all but N/A)
Finding errors:
ISERROR, ISNA, ISBLANK
Saturday, 10 May 14
PART FOUR:
ADDING
Saturday, 10 May 14
Saturday, 10 May 14
Save time typing search URLs
Saturday, 10 May 14
"https://www.duedil.com/beta/search/
companies?name="&B2
Generate URL
Saturday, 10 May 14
"https://www.duedil.com/beta/search/
companies?name="&B2
"https://www.duedil.com/beta/search/
companies?
name="&SUBSTITUTE(B2," ","%20")
Generate URL
Saturday, 10 May 14
=VLOOKUP(What you’re looking for,
what range contains a match & what you
want back, which column you want back,
nearest match?)
=VLOOKUP(D2,Sheet1!D:E,2,false)
Merging data:
VLOOKUP
Saturday, 10 May 14
=TEXT(D2, “dddd”)
=YEAR(D2)
=MONTH(D2) = 1
=TEXT(D2, “mmmm”) = ‘January’
=TEXT(D2, “mmm”) = ‘Jan’
If not formatted as date, use LEFT
Convert dates to years:
TEXT functions
Saturday, 10 May 14
=IF(B2>2500,“High”,“Low”)
Convert amounts to
categories: nested IF functions
Saturday, 10 May 14
=IF(B2>2500,“High”,“Low”)
=IF(B2>2500,“High”,IF(B2<1000,“Low”
,“Mid”))
Convert amounts to
categories: nested IF functions
Saturday, 10 May 14
=IF(COUNTIF(B2, “*dropped*”),
“Dropped”, “Not dropped”)
Can’t use wildcard. Combine
with COUNTIF
Saturday, 10 May 14
1. Save time.
2. Check your data.
3. Clean your data.
4. Add to your data.
5. Feel clever. But don’t be
too clever.
Saturday, 10 May 14
Thank you
Leanpub.com/u/spreadsheetstories
@paulbradshaw
Saturday, 10 May 14

Contenu connexe

Plus de Paul Bradshaw

Plus de Paul Bradshaw (20)

Visual journalism: gifs, emoji, memes and other techniques
Visual journalism: gifs, emoji, memes and other techniquesVisual journalism: gifs, emoji, memes and other techniques
Visual journalism: gifs, emoji, memes and other techniques
 
Using narrative structures in shortform and longform journalism
Using narrative structures in shortform and longform journalismUsing narrative structures in shortform and longform journalism
Using narrative structures in shortform and longform journalism
 
Narrative and multiplatform journalism (part 1)
Narrative and multiplatform journalism (part 1)Narrative and multiplatform journalism (part 1)
Narrative and multiplatform journalism (part 1)
 
Teaching data journalism (Abraji 2021)
Teaching data journalism (Abraji 2021)Teaching data journalism (Abraji 2021)
Teaching data journalism (Abraji 2021)
 
Data journalism on the air: 3 tips
Data journalism on the air: 3 tipsData journalism on the air: 3 tips
Data journalism on the air: 3 tips
 
7 angles for data stories
7 angles for data stories7 angles for data stories
7 angles for data stories
 
Uncertain times, stories of uncertainty
Uncertain times, stories of uncertaintyUncertain times, stories of uncertainty
Uncertain times, stories of uncertainty
 
Ergodic education (online teaching and interactivity)
Ergodic education (online teaching and interactivity)Ergodic education (online teaching and interactivity)
Ergodic education (online teaching and interactivity)
 
Storytelling in the database era: uncertainty and science reporting
Storytelling in the database era: uncertainty and science reportingStorytelling in the database era: uncertainty and science reporting
Storytelling in the database era: uncertainty and science reporting
 
Cognitive bias: a quick guide for journalists
Cognitive bias: a quick guide for journalistsCognitive bias: a quick guide for journalists
Cognitive bias: a quick guide for journalists
 
The 3 chords of data journalism
The 3 chords of data journalismThe 3 chords of data journalism
The 3 chords of data journalism
 
Data journalism: what it is, how to use data for stories
Data journalism: what it is, how to use data for storiesData journalism: what it is, how to use data for stories
Data journalism: what it is, how to use data for stories
 
Teaching AI in data journalism
Teaching AI in data journalismTeaching AI in data journalism
Teaching AI in data journalism
 
10 ways AI can be used for investigations
10 ways AI can be used for investigations10 ways AI can be used for investigations
10 ways AI can be used for investigations
 
Open Data Utopia? (SciCAR 19)
Open Data Utopia? (SciCAR 19)Open Data Utopia? (SciCAR 19)
Open Data Utopia? (SciCAR 19)
 
Scraping for journalists - ideas, concepts and tips (CIJ Summer School 2019)
Scraping for journalists - ideas, concepts and tips (CIJ Summer School 2019)Scraping for journalists - ideas, concepts and tips (CIJ Summer School 2019)
Scraping for journalists - ideas, concepts and tips (CIJ Summer School 2019)
 
Scraping in 60 minutes (CIJ Summer School 2019)
Scraping in 60 minutes (CIJ Summer School 2019)Scraping in 60 minutes (CIJ Summer School 2019)
Scraping in 60 minutes (CIJ Summer School 2019)
 
MA Multiplatform and Mobile Journalism: Taster Class
MA Multiplatform and Mobile Journalism: Taster ClassMA Multiplatform and Mobile Journalism: Taster Class
MA Multiplatform and Mobile Journalism: Taster Class
 
Verification techniques, tips and tools
Verification techniques, tips and toolsVerification techniques, tips and tools
Verification techniques, tips and tools
 
Journalism, data and storytelling: navigating the battlefield
Journalism, data and storytelling: navigating the battlefieldJournalism, data and storytelling: navigating the battlefield
Journalism, data and storytelling: navigating the battlefield
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

Finding stories in spreadsheets