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.
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
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?
- The last chapter’s story: are there more drunk and disorderly arrests?
How much did it cost? How many people were affected? The first function: adding a series of cells with
- If functions are recipes, arguments are the ingredients
- When there’s more than one ingredient: commas and semicolons
Who’s top, who’s bottom?
MIN, and sorting
- MAX and MIN
- The last chapter’s story: drunk and disorderly arrest totals
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
Hitting the deadline: understanding and formatting the data - number or text
Best sellers and averages:
- Calculating an average: AVERAGE, MEDIAN or MODE?
- Man made or natural?
How many payments? How many people? Counting, not adding up:
- The story is what’s missing: COUNTBLANK
- The last chapter’s story: political donations
Only count if… setting criteria for a formula:
- Counting something specific
- Looking for cells containing words within sentences: the wildcards
- Trial and error: the single-cell test
- Counting against combined criteria: COUNTIFS
- The last chapter’s story: missing donations data?
If… continued: setting criteria for a sum:
- The last story: how many donations fit the bill?
Putting the story into context, or looking from a fresh angle: merging data from different tables using
- Dry run: two small tables on the same sheet
- Using VLOOKUP on data in different sheets
- Those pesky #N/A results
- The last chapter’s story: what proportion of donations came from small donors?
My data is dirty! Basic cleaning using
- Those pesky spaces
Getting rid of ‘non printing’ characters:
- And or ampersand? Substituting particular words or characters
- The last chapter’s story: baby name trends
Detour: generating consecutive numbers or dates
- Other number sequences
- Text sequences: days and months
- Getting more control over your ranges - the Fill Series option
Using more than one function at a time: nested functions
- Nesting functions
Generating categories and other extra data:
- Testing more than one thing - nested IF
- Hello operators: comparing beyond ‘greater than’ or ‘less than’
- Testing text: combining IF with other functions
- The last chapter’s story: simplifying names to make them consistent with another dataset
Detour: testing whether something is TRUE or FALSE
- Logical tests with text
- Adding up TRUE and FALSE
- Functions which return logical results
Finding errors or missing data - and testing data types:
- Functions for testing data types
- Functions that look for errors, or types of errors
ISfunctions in practice: an error-checking column
- The last chapter’s story: converting restaurant ratings into categories
Testing two things at once:
- 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
IFto avoid multiple
- Making multiple negative tests
- The last chapter’s story: classifying non-rated hygiene reports
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
- Finding the story: which outlets have consistently bad scores?
How old is someone? Ages and using
- Breaking down the problem
- Calculating the years
- Checking whether a birthday comes before or after a date
- Making an adjustment based on the results
TODAYto 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
- Finding the story: what years and months are worst for hygiene inspections?
Grabbing or checking the first, middle or last part of a piece of information:
- 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
- Finding the story: how old are Guantanamo prisoners?
Case study: When you get data in sentences: using
SEARCHand error handling to extract numbers from phrases
- Break down the steps
Identify where the years/months are detailed: using
- 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
Putting names, addresses and other data back together:
&and adding special characters with
The alternative to
- Tell the story: finding special characters
- The alternative to
More data cleaning: formatting text or numbers consistently with
Rounding and formatting numbers:
- Showing figures as millions or billions without all the zeroes
- Rounding and formatting numbers:
Changing rows into columns, and vice versa:
TRANSPOSEfunction in Excel - for when you need data to always be transposed
TRANSPOSEfunction in Google Sheets - no need for keyboard shortcuts
- The Paste Special option: the one-off transpose
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
- 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
Grabbing data from elsewhere -
Pulling data from another sheet:
Grabbing data from online CSVs and TXT files:
Grabbing data from webpage tables and lists:
Grabbing data from RSS feeds:
Grabbing data from an XML document - or a HTML webpage:
IMPORTXMLto grab data from HTML webpages
- Grabbing links and other values that are not in visible text
- Pulling data from another sheet:
Dealing with data in another language:
Detecting the language:
DETECTLANGUAGEas part of
- False friends and cognates
- Tip: translating a term to generate search URLs in other languages
IMPORTExercises - tips
- Detecting the language:
Converting currency or using stock prices:
Converting currency with
Grabbing stock values with
- Converting currency with
Publishing live data in a live chart
Exercise: grabbing and visualising live data with
IMPORTHTMLand live charts
Comparing change visually by generating sparkline charts for every row:
- Customising how the sparkline appears: bar charts
- Keeping it relative: specifying minimum and maximum scale
Last chapter exercise: grabbing and visualising live data with
IMPORTHTMLand live charts
- Writing a
Asking questions (or allowing users to), SQL-style:
Forming the question:
More complex clauses:
- 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
QUERYbeing used in code
- Forming the question:
Adding some randomness: spreading out locations randomly using
RAND: Give me a number between 1 and 0
RANDBETWEEN: Give me a number between whatever I say!
- Exercise: generate random placemarks on a map - within reason
Is this value ranked high or low? What value is 3rd?
Finding values at a particular rank:
- Using the
What percentile is this at or above?
- Percentile functions
What percent of values are smaller?
What value is at the nth percentile?
- Exercise: using both sets of functions with marathon race times
Classifying data into top, middle and bottom quarters:
- Applying quartile values to classify data into four quarters
- Using the
Cross referencing and advanced cell references: naming cells and using
- Naming cells
- Cross-referencing cells based on values in other cells
Working out which index to grab:
- Exercise: Finding where schoolchildren go outside their area
Getting statistical: correlation with
CORRELand other ways of testing data
- How strong is the relationship between two columns of numbers?
- Once you have a result
- Try it out
The final chapter: next steps
- What else can Excel do? Add-ins, templates and VBA
- Tell me your problems
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
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.
C++ Best PracticesJason Turner
Level up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
OpenIntro StatisticsDavid Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntro
A 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.
Functional Design and ArchitectureAlexander Granin
Software Design in Functional Programming, Design Patterns and Practices, Methodologies and Application Architectures. How to build real software in Haskell with less efforts and low risks. The first complete source of knowledge.
R Programming for Data ScienceRoger D. Peng
This book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
C++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
I am a Software Engineer and I am in ChargeAlexis Monville and Michael Doyle
I am a Software Engineer and I am in Charge is a real-world, practical book that helps you increase your impact and satisfaction at work no matter who you work with.
In the book, we will follow Sandrine, a fictional character who learns to think in a new way enabling her to take a different course of action.
Atomic KotlinBruce Eckel and Svetlana Isakova
For both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
Invest In Digital Health - The Medical Futurist's GuideDr. Bertalan Mesko
Artificial Intelligence and Digital Health are booming. In this book, we explain why now it's a good time to invest in Digital Health and give recommendations on where to invest by looking at the top 24 technological trends we find the most promising.
The Hundred-Page Machine Learning BookAndriy Burkov
Everything you really need to know in Machine Learning in a hundred pages.
Mastering STM32Carmine Noviello
With more than 600 microcontrollers, STM32 is probably the most complete ARM Cortex-M platform on the market. This book aims to be the first guide around that introduces the reader to this exciting MCU portfolio from ST Microelectronics and its official CubeHAL.
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...
CCIE Service Provider Ultimate Study Bundle
2 BooksPiotr 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...
The Future of Digital Health
6 BooksWe 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 and how technology giants such as Amazon or Google want to conquer...
Cisco CCNA 200-301 Complet
4 BooksCe lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301.
CCDE Practical Studies (All labs)
3 BooksCCDE lab
"The C++ Standard Library" and "Concurrency with Modern C++"
2 BooksGet my books "The C++ Standard Library" and "Concurrency with Modern C++" in a bundle. The first book gives you the details you should know about the C++ standard library; the second one dives deeper into concurrency with modern C++. In sum, you get more than 600 pages full of modern C++ and about 250 source files presenting the standard library...
Modern Management Made Easy
3 BooksRead all three Modern Management Made Easy books. Learn to manage yourself, lead and serve others, and lead the organization.
Linux Administration Complet
4 BooksCe lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité...
Programming with Ease
3 BooksAlle drei Bände der Serie Programming with Ease in einem Paket. Darin findest du alles, was ich dir zu den wichtigsten Phasen der Softwareentwicklung im Hinblick auf Clean Code Development für langfristig hohe Produktivität sagen kann.Im Band Slicing findest du die Anforderungsanalyse im Rahmen eines iterativ-inkrementellen Vorgehensmodells aus...
2 BooksUnveil the power of Ansible and Vagrant with this bundle at a special price. You'll have everything you need to get started with Vagrant - learn the basics and how to create your virtual development environments, using Ansible as provisioner! About Vagrant Cookbook Vagrant Cookbook is a complete guide to get started with Vagrant and create your...