Finding Stories in Spreadsheets
Finding Stories in Spreadsheets
Recipes for interviewing data - and getting answers
About the Book
One spreadsheet can tell many stories. You just have to know the right questions to ask.
Based on a decade of training journalists and working with news organisations on data-driven stories, Finding Stories In Spreadsheets outlines the techniques for asking the right questions of data using tools like Excel and Google spreadsheets.
These aren't just questions about numbers: you'll find out how spreadsheet techniques can help you find the 'needle in the haystack' in text data. You'll learn how to clean up and modify your data so that you can ask it different questions, or get it ready for maps or charts, how to create new data from raw materials, and how to combine datasets to look for connections and trends.
With regular examples from journalism and real life data to work with, Finding Stories In Spreadsheets is *full* of those questions, in the language that spreadsheets understand.
Cover image concept by @CarolineBeavon. Illustration by Matt Buck at Drawnalism.
Bundles that include this book
Table of Contents
- 1. Introduction
-
2. Stories about change, stories in context: basic calculations
- Cell references
- Calculating a change
- Calculating a proportion
- Ratios: calculating a proportion as ‘1 in 10’
- Combining both: calculating what proportion a change is
- Recap
-
3. Saving time to hit a deadline: repeating and fixing a calculation across cells
- Shortcut: repeating a calculation down hundreds of cells with one double-click
- What if I want to fix the cell reference so it doesn’t change when pasted?
- Recap
- The last chapter’s story: are there more drunk and disorderly arrests?
-
4. How much did it cost? How many people were affected? The first function: adding a series of cells with
SUM
- If functions are recipes, arguments are the ingredients
- When there’s more than one ingredient: commas and semicolons
- Recap
-
5. Who’s top, who’s bottom?
MAX
,MIN
, and sorting- MAX and MIN
- Recap
- The last chapter’s story: drunk and disorderly arrest totals
-
6. Detour: getting to know the spreadsheet - useful shortcuts and tips to avoid mistakes
- Keyboard shortcuts to explore your data quickly
- Changing your data: remove empty rows before the headings
- Recap
-
7. Hitting the deadline: understanding and formatting the data - number or text
- Numbers
- Text
- Recap
-
8. Best sellers and averages:
MEDIAN
,AVERAGE
andMODE
- Calculating an average: AVERAGE, MEDIAN or MODE?
- Man made or natural?
- Recap
-
9. How many payments? How many people? Counting, not adding up:
COUNT
- The story is what’s missing: COUNTBLANK
- Recap
- The last chapter’s story: political donations
-
10. Only count if… setting criteria for a formula:
COUNTIF
- Counting something specific
- Looking for cells containing words within sentences: the wildcards
- Trial and error: the single-cell test
- Counting against combined criteria: COUNTIFS
- Recap
- The last chapter’s story: missing donations data?
-
11. If… continued: setting criteria for a sum:
SUMIF
- Recap
- The last story: how many donations fit the bill?
-
12. Putting the story into context, or looking from a fresh angle: merging data from different tables using
VLOOKUP
- Dry run: two small tables on the same sheet
- Using VLOOKUP on data in different sheets
- Those pesky #N/A results
- Recap
- The last chapter’s story: what proportion of donations came from small donors?
-
13. My data is dirty! Basic cleaning using
TRIM
,CLEAN
andSUBSTITUTE
- Those pesky spaces
-
Getting rid of ‘non printing’ characters:
CLEAN
- And or ampersand? Substituting particular words or characters
- Recap
- The last chapter’s story: baby name trends
-
14. Detour: generating consecutive numbers or dates
- Other number sequences
- Text sequences: days and months
- Getting more control over your ranges - the Fill Series option
-
15. Using more than one function at a time: nested functions
- Nesting functions
- Recap
-
16. Generating categories and other extra data:
IF
- Testing more than one thing - nested IF
- Hello operators: comparing beyond ‘greater than’ or ‘less than’
- Testing text: combining IF with other functions
- Recap
- The last chapter’s story: simplifying names to make them consistent with another dataset
-
17. Detour: testing whether something is TRUE or FALSE
- Logical tests with text
- Adding up TRUE and FALSE
- Functions which return logical results
- Recap
-
18. Finding errors or missing data - and testing data types:
ISERR
,ISBLANK
,ISTEXT
and others- Functions for testing data types
- Functions that look for errors, or types of errors
-
Using
IS
functions in practice: an error-checking column - Recap
- The last chapter’s story: converting restaurant ratings into categories
-
19. Testing two things at once:
AND
,OR
andNOT
- Finding outliers at the top or bottom: OR
- Finding one of a series of possible text values: OR
- Finding numbers in the middle, or in a particular range: AND
- Applying criteria across multiple columns
-
Combining with
IF
to avoid multipleIF
tests - Making multiple negative tests
- Recap
- The last chapter’s story: classifying non-rated hygiene reports
-
20. What day did that date fall on? Which year was the worst? Extracting days, months and years from full dates
- Extracting dates, months and years: DAY, MONTH and YEAR
- Extracting days and months as words or years as ‘66, ‘94 etc: TEXT
- Using the Format Cells ‘Custom’ option to do the same thing to existing dates
- Hours and minutes: HOUR, MINUTE, SECOND and TEXT again
- When things don’t go as you expect them to: dealing with errors in date functions
- Recap
- Finding the story: which outlets have consistently bad scores?
-
21. How old is someone? Ages and using
TODAY
’s date- Breaking down the problem
- Calculating the years
- Checking whether a birthday comes before or after a date
- Making an adjustment based on the results
-
Using
TODAY
to calculate an age against today’s date - Making it easy to understand: breaking the formula back up
- Other ways of calculating ages: the unsupported DATEDIF function
- Watching out for leap years in other calculations
- Recap
- Finding the story: what years and months are worst for hygiene inspections?
-
22. Grabbing or checking the first, middle or last part of a piece of information:
RIGHT
,LEFT
andMID
- Grabbing characters from the beginning: LEFT
- Grabbing characters from the end: RIGHT
- Grabbing characters from the middle: MID
- What if the starting position or number of characters depends? Introducing LEN
- What if the starting position or number of characters depends? Part two: SEARCH and FIND
- Recap
- Finding the story: how old are Guantanamo prisoners?
-
23. Case study: When you get data in sentences: using
SEARCH
and error handling to extract numbers from phrases- Break down the steps
-
Identify where the years/months are detailed: using
SEARCH
- Extract the number of years/months (and correct for problems)
- Handling an unnecessary space
- Converting to a common measure
- Manual cleaning: identifying unusual words
- Adding a ‘checking’ formulae
- Key points
-
24. Putting names, addresses and other data back together:
CONCATENATE
,&
and adding special characters withCHAR
-
The alternative to
CONCATENATE
:&
- Recap
- Tell the story: finding special characters
-
The alternative to
-
25. More data cleaning: formatting text or numbers consistently with
UPPER
,LOWER
,PROPER
andFIXED
-
Rounding and formatting numbers:
FIXED
andROUND
- Showing figures as millions or billions without all the zeroes
- Recap
-
Rounding and formatting numbers:
-
26. Changing rows into columns, and vice versa:
TRANSPOSE
-
The
TRANSPOSE
function in Excel - for when you need data to always be transposed -
The
TRANSPOSE
function in Google Sheets - no need for keyboard shortcuts - The Paste Special option: the one-off transpose
- Recap
-
The
-
27. Repeating calculations across multiple cells or to create the ingredients of a single function: array formulae
- Arrays in practice: back to the drunk and disorderly data
- Changing or extending an array formula
- Multiple calculations with one result: using an array formula in a single cell
- Generating your own arrays
- Array constants used in a formula
- Recap
- The last chapter’s story: when’s the worst time to turn up at hospital?
- Detour: An introduction to Google Sheets - an always-connected spreadsheet tool
- Make sure the settings are for your country
-
28. Grabbing data from elsewhere -
IMPORT
andGOOGLE
functions in Google Sheets-
Pulling data from another sheet:
IMPORTRANGE
-
Grabbing data from online CSVs and TXT files:
IMPORTDATA
-
Grabbing data from webpage tables and lists:
IMPORTHTML
-
Grabbing data from RSS feeds:
IMPORTFEED
-
Grabbing data from an XML document - or a HTML webpage:
IMPORTXML
-
Using
IMPORTXML
to grab data from HTML webpages - Grabbing links and other values that are not in visible text
- Recap
- Exercises
-
Pulling data from another sheet:
-
29. Dealing with data in another language:
GOOGLETRANSLATE
andDETECTLANGUAGE
-
Detecting the language:
DETECTLANGUAGE
-
Using
DETECTLANGUAGE
as part ofGOOGLETRANSLATE
- False friends and cognates
- Tip: translating a term to generate search URLs in other languages
- Recap
-
IMPORT
Exercises - tips
-
Detecting the language:
-
30. Converting currency or using stock prices:
GOOGLEFINANCE
-
Converting currency with
GOOGLEFINANCE
-
Grabbing stock values with
GOOGLEFINANCE
- Recap
-
Converting currency with
-
31. Publishing live data in a live chart
- Recap
-
Exercise: grabbing and visualising live data with
IMPORTHTML
and live charts
-
32. Comparing change visually by generating sparkline charts for every row:
SPARKLINE
-
Writing a
SPARKLINE
formula - Customising how the sparkline appears: bar charts
- Keeping it relative: specifying minimum and maximum scale
- Recap
-
Last chapter exercise: grabbing and visualising live data with
IMPORTHTML
and live charts
-
Writing a
-
33. Asking questions (or allowing users to), SQL-style:
QUERY
-
Forming the question:
Select
,Where
andOrder by
-
More complex clauses:
group by
andpivot
- Writing queries with multiple or alternative criteria
- Generating ‘hackable’ URLs which allow users to see the data their own way
- Using a form to allow users to generate their own results pages
-
Examples of
QUERY
being used in code - Recap
-
Forming the question:
-
34. Extracting text that matches a pattern: regular expressions in Google Sheets
- What are regular expressions
- Scenarios when you might use a regular expression
- Google’s REGEX functions
- Regular expressions as a language: regex
- Putting this into practice with election tweets
-
Using
REGEXEXTRACT
with more advanced regex - How regex was used in the art story
- Recap
- Exercise: unduly lenient sentences
-
35. Adding some randomness: spreading out locations randomly using
RAND
-
RAND
: Give me a number between 1 and 0 -
RANDBETWEEN
: Give me a number between whatever I say! - Recap
- Exercise: generate random placemarks on a map - within reason
-
-
36. Is this value ranked high or low? What value is 3rd?
RANK
,LARGE
andSMALL
-
Using the
RANK
function -
Finding values at a particular rank:
LARGE
andSMALL
- Recap
-
Using the
-
37. What percentile is this at or above?
PERCENTRANK
andPERCENTILE
- Percentile functions
-
What percent of values are smaller?
PERCENTRANK
-
What value is at the nth percentile?
PERCENTILE
- Exercise: using both sets of functions with marathon race times
- Recap
-
38. Classifying data into top, middle and bottom quarters:
QUARTILE
-
Using the
QUARTILE
function - Applying quartile values to classify data into four quarters
- Recap
-
Using the
-
39. Cross referencing and advanced cell references: naming cells and using
INDIRECT
,INDEX
andMATCH
- Naming cells
-
INDIRECT
- Cross-referencing cells based on values in other cells
-
INDEX
-
Working out which index to grab:
MATCH
- Exercise: Finding where schoolchildren go outside their area
- Recap
-
40. Getting statistical: correlation with
CORREL
and other ways of testing data- How strong is the relationship between two columns of numbers?
-
Using the
CORREL
function - Once you have a result
- Recap
- Try it out
-
41. The final chapter: next steps
- What else can Excel do? Add-ins, templates and VBA
- Tell me your problems
Other books by this author
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Do Well. Do Good.
Authors have earned$11,577,045writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
Recipes for Decoupling
Matthias NobackSignalR on .NET 6 - the Complete Guide
Fiodar SazanavetsLearn everything there is to learn about SignalR and how to integrate it with the latest .NET 6 and C# 10 features. Learn how to connect any type of client to SignalR, including plain WebSocket client. Learn how to build interactive applications that can communicate with each other in real time without making excessive calls.
The BDD Books - Discovery (Japanese Edition)
Gáspár Nagy, Seb Rose, and Yuya Kazamaウクライナ難民を支援 - 2022年5月末まで延長!
この本の売り上げの50%は、 https://unicef.hu/veszhelyzet-ukrajnaban と https://int.depaulcharity.org/fundraising-for-depaul-ukraine/ に寄付されます。
本書籍は、振る舞い駆動開発(Behavior Driven Development, BDD)や受け入れテスト駆動開発(Acceptance Test-Driven Development, ATDD)の発見フェーズを最大限に活用する方法を提供します。
The easiest way to learn design patterns
Fiodar SazanavetsLearn design patterns in the easiest way possible. You will no longer have to brute-force your way through each one of them while trying to figure out how it works. The book provides a unique methodology that will make your understanding of design patterns stick. It can also be used as a reference book where you can find design patterns in seconds.
Agile Testing Condensed Japanese Edition
Yuya Kazama, Janet Gregory, and Lisa CrispinJanet GregoryとLisa Crispinによる2019年9月発行の書籍『Agile Testing Condensed』の日本語翻訳版です。アジャイルにおいてどのような考えでテストを行うべきなのか簡潔に書かれています!
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
Tech Giants in Healthcare
Dr. Bertalan MeskoThis comprehensive guide, Tech Giants in Healthcare, clarifies how and why big tech companies step into healthcare, and breaks it down from one market player to the other in what direction they are going, what tools they are using and what horizons they have in front of them.
Functional event-driven architecture: Powered by Scala 3
Gabriel VolpeExplore the event-driven architecture (EDA) in a purely functional way, mainly powered by Fs2 streams in Scala 3!
Leverage your functional programming skills by designing and writing stateless microservices that scale, powered by stateful message brokers.
CCIE Service Provider Version 4 Written and Lab Exam Comprehensive Guide
Nicholas RussoThe service provider landscape has changed rapidly over the past several years. Networking vendors are continuing to propose new standards, techniques, and procedures for overcoming new challenges while concurrently reducing costs and delivering new services. Cisco has recently updated the CCIE Service Provider track to reflect these changes; this book represents the author's personal journey in achieving that certification.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Top Bundles
- #1
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #2
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #3
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #4
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #6
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible... - #8
Modern C++ Collection
3 Books
Get All about Modern C++C++ Standard Library, including C++20Concurrency with Modern C++, including C++20C++20Each book has about 200 complete code examples. Updates are included. When I update one of the books, you immediately get the updated bundle. You can expect significant updates to each new C++ standard (C++23, C++26, .. ) and also...