Top Banner
Taking the Next Step: Using Spreadsheets to Process Library Statistics & Database Results Gwen Exner – NCknows Lynda Kellam – UNCG Presented at NCLA 2011
106
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: NCLA2011 Using Spreadsheets

Taking the Next Step: Using Spreadsheets to Process

Library Statistics & Database ResultsGwen Exner – NCknows

Lynda Kellam – UNCGPresented at NCLA 2011

Page 2: NCLA2011 Using Spreadsheets

Using Spreadsheets

• Sorting data• Filtering data• Deriving info

(Finding maximums, minimums, averages, etc.)

• Comparing data• Rearranging data• Collating data

Spreadsheets do very little that you could not do manually, with a calculator, or in a word processor.

However, they do it a lot more quickly, and with a whole lot less effort.

Page 3: NCLA2011 Using Spreadsheets

Using Spreadsheets

This presentation is designed to:• Go over universal terms & concepts.• Give general step-by step instructions on how

to perform various tasks.• Introduce project ideas that can be used in

your library.

Instructions for different programs are available online – if yours isn’t listed, just ask!

http://swissarmyspreadsheets.com/NCLA2011

Page 4: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

A row is a horizontal collection of cells.• It is referred to by the number to its left. • There are 8 rows in this example (1-8).• Row 2 is highlighted.

Page 5: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

A column is a vertical collection of cells.• It is referred to by the letter above it.• There are 5 columns showing in this

example (A-E).• Column B is highlighted.

Page 6: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

A cell is the smallest part of a spreadsheet.• It is referred to as the intersection of a

column and row. • It holds a single value or formula.• Cell B2 is highlighted.

Page 7: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

A worksheet is a single ‘page’ of cells.• It is identified by the tabs near the bottom.• It can contain cells that are not showing.• It can need 100’s of paper pages to print. • In this example we are in Sheet1.

Page 8: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

The formula bar always shows the formula.• It is generally located above the cells• It is can be preceded by = or fx or formula:

• It lets you edit the formula in the cell.• In this example it shows 37199.

Page 9: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

A formula is the equation behind the result.• They start with = either explicitly or

implicitly.

– It can be very simple. =37199– It can be more complicated. =37200-1– It can use functions.

=concatenate(“$”,37,”,”,199)

• All of these formulas could yield a cell showing the value $37,199.

Page 10: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

Text is a specific type of formula which can not be evaluated to anything else.

• Text formulas start with either ‘ or =‘.

• Cells will show exactly what is after the ‘ in a text formula, even if it contains math or a function.

• This is great when you want 27403-2600 to show as a zip+4, not evaluate to 24803.

Page 11: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

Functions are tools used in formulas.• They can let you do things more easily,

such as sum(a1:a3) instead of a1+a2+a3.• They can let you do otherwise impossible

things, like turning “Robert” and “Frost” into “Robert Frost”.

• They require specific pieces of input, in a specific order, with a specified divider between each piece of input.

Page 12: NCLA2011 Using Spreadsheets

Terminology

Rows

Columns

Cells

Worksheet

Formula Bar

Formula

Text

Function

Questions about terminology?

Page 13: NCLA2011 Using Spreadsheets

Programs & file typesThere are many spreadsheet formats/programs in existence.

These are the only formats which will allow you to retain your formulas. Everything else will only save the results of the formulas.

MS Excel (.xls / .xlsx) Google Spreadsheet

Open Office Calc (.ods) MS Works Spreadsheet (.wks/.xlr)

Etc.

Page 14: NCLA2011 Using Spreadsheets

Programs & file typesThere are some formats which can be smoothly imported to / exported from spreadsheets.

• Comma Separated Values (.csv) [also known as “comma delimited”]

• Tab Delimited Text (.txt) [also sometimes called Tab Separated Values, and saved as .tsv]

To import/export you will need to do one of these:• Open / Open as.. / Convert to.. / Import• Save as / Export to

Page 15: NCLA2011 Using Spreadsheets

Programs & file types

• HTML: copy & paste tables to (not from) spreadsheets, and use spreadsheets to create HTML code.

• Word processors : best done through c&p of tables

• Non-delimited/separated text files: needs functions to parse text

There are also data sources which often interact with spreadsheets, but don’t do so smoothly.

Page 16: NCLA2011 Using Spreadsheets

Programs & file types

Questions about programs

or file types?

Page 17: NCLA2011 Using Spreadsheets

Freezing rows & columnsSpreadsheets let you “freeze” rows (at the left), and columns (at the top), so they always show.

versus

• Useful when working with too much data for 1 screen

Page 18: NCLA2011 Using Spreadsheets

Freezing rows & columns

INSTRUCTIONS1. Go to the cell below & to the right of all the

rows & columns you want “frozen”.2. Follow the instructions for your program below.

Excel 97: “Window” menu, “Freeze” (Alt-w-f)

Excel 2007: “View” tab, “Freeze Panes” submenu

OpenOffice: “Window” menu, “Freeze” (Alt-w-f)

Google Docs: “View” menu, “Freeze rows” or “Freeze columns”

Page 19: NCLA2011 Using Spreadsheets

Special Pastes

As values

As Text

Transpose

Most spreadsheets have a separate menu for “special” pasting options.

• Some options are very helpful in multiple contexts.

• Context-sensitive menus might offer different options depending on clipboard contents or other factors.

Page 20: NCLA2011 Using Spreadsheets

Special Pastes: As Values

As Values

As Text

Transpose

Pasting “As Values” means just the results of the formulas

• Formulas are not pasted.

• Formatting is not pasted.

• Available when pasting from & to a spreadsheet.

• Has (mostly) the same effect as pasting to a word processor, & then back again.

Page 21: NCLA2011 Using Spreadsheets

Special Pastes: As Values

As Values

As Text

Transpose

Page 22: NCLA2011 Using Spreadsheets

Special Pastes: As Text

As Values

As Text

Transpose

Pasting as “Text” or “Unicode Text” pastes without formatting or images.

• Available when pasting from HTML or some other non-spreadsheet source.

• Pasting from a website to a spreadsheet without this can make a big mess that’s hard to read and harder to work with -- especially if there’s graphics.

Page 23: NCLA2011 Using Spreadsheets

Special Pastes: As Text

As Values

As Text

Transpose

Example: Original website table, from http://www.enchantedlearning.com/usa/cities/

This is a screenshot of how it appeared online.

Page 24: NCLA2011 Using Spreadsheets

Special Pastes: As Text

As Values

As Text

Transpose

Single cells broken up

Can’t auto-adjust column width without changing “wrap text” formatting.

Can’t sort without un-merging cells.

Cities & population are on different rows.

Original table source: http://www.enchantedlearning.com/usa/cities/

Example: Website table, pasted normally

Links!

Page 25: NCLA2011 Using Spreadsheets

Special Pastes: As Text

As Values

As Text

Transpose

Original table source: http://www.enchantedlearning.com/usa/cities/

Example: Website table, pasted as text

• Only one separated cell (header)• Easy to auto-adjust column width• No merged cells, so easy to sort• City & population on the same line• No links

Page 26: NCLA2011 Using Spreadsheets

Special Pastes: Transpose

As Values

As Text

Transpose

Pasting “Transpose” switches the columns and rows.

• Cell A1, B2, C3, etc. stay put.

• Cell B1 (2nd column, 1st row) moves to cell A2 (1st column, 2nd row).

This option may not appear in a converted .csv or .txt file. If so, just “save as” a spreadsheet, close, and re-open.

Page 27: NCLA2011 Using Spreadsheets

Special Pastes: Transpose

As Values

As Text

TransposeB1 moves to A2

C3 stays at C3

Original table source: https://edis.commerce.state.nc.us/EDIS/demographics.html

Page 28: NCLA2011 Using Spreadsheets

Special Pastes

As Values

As Text

Transpose

INSTRUCTIONS

Excel 97: “Edit” menu, “Paste Special” (Alt-e-s)

Excel 2007: “Home” tab, “Paste” menu, Paste Special

OpenOffice: “Edit” menu, “Paste Special”

Google Docs: “Edit” menu, “Paste Special”

Page 29: NCLA2011 Using Spreadsheets

Special Pastes

As Values

As Text

TransposeQuestions about special

pastes?

Page 30: NCLA2011 Using Spreadsheets

Rearranging

RearrangeCollate

Sort

Filter

Compare

Derive info

You might want to re-arrange data to:• Make it more readable• Make it more understandable• Make it easier to manipulate

Page 31: NCLA2011 Using Spreadsheets

Rearranging: Transposing

RearrangeCollate

Sort

Filter

Compare

Derive info

Transposing is one type of re-arranging.

It’s most useful when:

• There are few rows, and many columns

• Column headers are wider than row headers.

Page 32: NCLA2011 Using Spreadsheets

Rearranging: Transposing

RearrangeCollate

Sort

Filter

Compare

Derive info

Example: 2 pieces of data about all 100 counties in NC

You can read it this way:

• columns are too narrow to read headers• Less than 1/10th of 100 counties are

visible at any given time

Original table source: https://edis.commerce.state.nc.us/EDIS/demographics.html

Page 33: NCLA2011 Using Spreadsheets

Rearranging: Transposing

RearrangeCollate

Sort

Filter

Compare

Derive info

Example: 2 pieces of data about all 100 counties in NC

Or you can read it this way:

• columns are wide enough to headers• Only 1/50th of 100 counties are visible

at any given time

Original table source: https://edis.commerce.state.nc.us/EDIS/demographics.html

Page 34: NCLA2011 Using Spreadsheets

Rearranging: Transposing

RearrangeCollate

Sort

Filter

Compare

Derive info

Example: 2 pieces of data about all 100 counties in NC

Or you can transpose it:

Original table source: https://edis.commerce.state.nc.us/EDIS/demographics.html

Page 35: NCLA2011 Using Spreadsheets

Rearranging: Transposing

RearrangeCollate

Sort

Filter

Compare

Derive info

Questions about rearranging by transposing?

Page 36: NCLA2011 Using Spreadsheets

Rearranging: Switching

RearrangeCollate

Sort

Filter

Compare

Derive info

Switching the order of columns or rows is another type of re-arranging.

It’s most useful when:

• There are natural sub-groups that are best viewed together

• You’re comparing the data in two widely separated columns

Page 37: NCLA2011 Using Spreadsheets

Rearranging: Switching

RearrangeCollate

Sort

Filter

Compare

Derive info

Example: Many pieces of data about all 100 counties in NC

Because EDIS lists the counties in alphabetical order, industrial counties might be next to rural counties.Example: Wake ($72k average) & Warren ($36k)

Original table source: https://edis.commerce.state.nc.us/EDIS/demographics.html

Page 38: NCLA2011 Using Spreadsheets

Rearranging: Switching

RearrangeCollate

Sort

Filter

Compare

Derive info

Example: Many pieces of data about all 100 counties in NC

Switching column/row order lets you group them by region, such as in this example, where the “Eastern” counties have been grouped together.

Page 39: NCLA2011 Using Spreadsheets

Rearranging: Switching

RearrangeCollate

Sort

Filter

Compare

Derive info

INSTRUCTIONS1. Insert a column where you want the

column moved to.Excel 97: “Insert” menu, “Column”Excel 2007: “Home” tab, “Insert” menu,

“Insert Sheet Column”OpenOffice: “Edit” menu, “Paste Special” Google Docs: “Insert” menu, “Column left”

or “Column right”2. Copy old column, paste into new column3. Delete original column

Page 40: NCLA2011 Using Spreadsheets

Rearranging: Switching

RearrangeCollate

Sort

Filter

Compare

Derive info

Questions about switching column or row order?

Page 41: NCLA2011 Using Spreadsheets

Collating data

Rearrange

Collate Sort

Filter

Compare

Derive info

Collate means “put together in order”.

• Two kinds that are easier in spreadsheets

– Combining data from a single source

– Combining data from multiple sources

• Note: A “source” is a single file, or a single copy/paste.

Page 42: NCLA2011 Using Spreadsheets

Collating data: single source

Rearrange

Collate Sort

Filter

Compare

Derive info

Example: Author names

Imagine that you have a list of authors, and want to search for them in a database.

• The names are in two columns: one for first name, and one for last.

• The database needs them as “last, first”.

Page 43: NCLA2011 Using Spreadsheets

Collating data: single source

Rearrange

Collate Sort

Filter

Compare

Derive info

Solution: Author names

1. Go to any blank column.

2. Use the concatenate function to combine the two cells on the same row.

3. Extend/fill/paste the formula down for the rest of the list.

Page 44: NCLA2011 Using Spreadsheets

Collating data: single source

Rearrange

Collate Sort

Filter

Compare

Derive info

More on concatenate

• Concatenate just puts together whatever you tell it to, as text, like a toy train.

• In this it puts together B2’s value, then a comma & space, then A2’s value.

Page 45: NCLA2011 Using Spreadsheets

Collating data: single source

Rearrange

Collate Sort

Filter

Compare

Derive info

=concatenate(B2, “, ” ,A2)

comma<space>

Page 46: NCLA2011 Using Spreadsheets

Collating data: single source

Rearrange

Collate Sort

Filter

Compare

Derive info

Questions on collating data from a single source?

Page 47: NCLA2011 Using Spreadsheets

Collating data: multiple sources

Rearrange

Collate Sort

Filter

Compare

Derive info

• Example: Morningstar• You can print, but not export.• Available data is split among 5 “views”• Many lists have more than 1 page.

Original data source: https://www.morningstar.com, “Terrific 10-Year Records” screen

Page 48: NCLA2011 Using Spreadsheets

Collating data: multiple sources

Rearrange

Collate Sort

Filter

Compare

Derive info

Solution: Morningstar (part 1 of 4)• Spreadsheet (SS): Insert worksheets

until you have a total of 7 (one per view, plus 2).

• Site: Highlight & copy the entire page for the first view. (Ctrl-A, Ctrl-C.)

• SS: Paste as text in sheet1.• Repeat previous 2 steps for remaining

views, pasting in sheet2 through sheet5.

Page 49: NCLA2011 Using Spreadsheets

Collating data: multiple sources

Rearrange

Collate Sort

Filter

Compare

Derive info

Solution: Morningstar (part 2 of 4)• SS: In sheet 6, create simple formulas to

pull the data from the other sheets.• Note: It may be best to type the headers.

Page 50: NCLA2011 Using Spreadsheets

Collating data: multiple sources

Rearrange

Collate Sort

Filter

Compare

Derive info

Solution: Morningstar (part 3 of 4)• SS: Copy the contents of Sheet6.• SS: Paste as values into Sheet7.• Note: The cells look the same, but the

formula bar in Sheet7 will have the value, not the reference.

Page 51: NCLA2011 Using Spreadsheets

Collating data: multiple sources

Rearrange

Collate Sort

Filter

Compare

Derive info

Solution: Morningstar (part 4 of 4)• If there is more than one page per view,

repeat parts 1 & 3, EXCEPT that you should paste the values in Sheet7 immediately below the previously existing values.

• When pasting a second set of values you do not need to re-copy the headers.

Page 52: NCLA2011 Using Spreadsheets

Collating data: multiple sources

Rearrange

Collate Sort

Filter

Compare

Derive info

Questions about

collating data from

multiple sources?

Page 53: NCLA2011 Using Spreadsheets

Sorting data

Rearrange

Collate

Sort Filter

Compare

Derive info

Many databases allow you to sort. However, spreadsheets let you:

• sort column order, instead of row order.

• sort using multiple criteria.

• save multiple sort orders.

• sort by more than numbers & letters.

Page 54: NCLA2011 Using Spreadsheets

Sorting data: Column order

Rearrange

Collate

Sort Filter

Compare

Derive info

Example: Many pieces of data about all 100 counties in NC • You can manually shift 90+ counties

into their categories, OR…• You can insert a row, enter the region

names, and then transpose, sort by region name, & transpose back.

Note: Some spreadsheets allow you to sort column orders without transposing.

Page 55: NCLA2011 Using Spreadsheets

Sorting data: Column order

Rearrange

Collate

Sort Filter

Compare

Derive info

Questions about sorting column order?

Page 56: NCLA2011 Using Spreadsheets

Sorting data: Multiple criteria

Rearrange

Collate

Sort Filter

Compare

Derive info

Most spreadsheets let you sort 3 or more columns. • First column gets first priority, like the

first part of a call number.

• Second column gets sorted within the identical entries in the first results.

Page 57: NCLA2011 Using Spreadsheets

Sorting data: Multiple criteria

Rearrange

Collate

Sort Filter

Compare

Derive info

Questions about sorting using multiple criteria?

Page 58: NCLA2011 Using Spreadsheets

Sorting data: Storing sorts

Rearrange

Collate

Sort Filter

Compare

Derive info

If you must often re-build complicated sorts, concatenate can help.• Choose your priorities for the sort.• Concatenate your list of priorities.

=concatenate(priority1,priority2, etc.) • Paste formula the length of the table.

Note: This must be adjacent to the text you want to sort.

Page 59: NCLA2011 Using Spreadsheets

Sorting data: Storing sorts

Rearrange

Collate

Sort Filter

Compare

Derive info

Questions about using concatenate to save sorting

rules?

Page 60: NCLA2011 Using Spreadsheets

Sorting data: non-alphanumeric

Rearrange

Collate

Sort Filter

Compare

Derive info

Example: House-hunting

Imagine you’re helping a house-hunter.• They want to focus on houses that are

priced within 10% of their assessed value.

• If a house is in that category, they want it ranked by square footage, not by the percentage.

Page 61: NCLA2011 Using Spreadsheets

Sorting data: non-alphanumeric

Rearrange

Collate

Sort Filter

Compare

Derive info

Example: House-hunting

Solution: Use a sort column with an “if”.

• General syntax: if(condition,then,else)

• In other words, if “condition” is true, “then” show X, “else” show Y.

Note: Some spreadsheets allow you to sort by formatting, which can also work when combined with conditional formatting.

Page 62: NCLA2011 Using Spreadsheets

Sorting data: non-alphanumeric

Rearrange

Collate

Sort Filter

Compare

Derive info

Example: House-hunting

Solution step-by-step:• Insert two columns, called “percentage”

and “sort”. • In percentage: =abs(price-value)/value• In sort: =if(percentage<=.1,sqft, “zz”)• That will show “zz” for everything

outside of 10%, and the numerical square feet for everything within 10%

Page 63: NCLA2011 Using Spreadsheets

Sorting data: non-alphanumeric

Rearrange

Collate

Sort Filter

Compare

Derive info

Questions about sorting using non-alphanumeric

criteria?

Page 64: NCLA2011 Using Spreadsheets

Filtering data

Rearrange

Collate

Sort

Filter Compare

Derive info

Filtering:• Hides, but doesn’t delete data• Makes it easy to visually group data

without re-sorting it• Is best used with repeating fields• Allows grouping using Boolean logic• Can be faster than sorting large datasets• Lets you download a single large

dataset, and filter from there.

Page 65: NCLA2011 Using Spreadsheets

Filtering data

Rearrange

Collate

Sort

Filter Compare

Derive info

INSTRUCTIONSMost spreadsheets allow you to filter by

clicking on the column header after you have activated filtering.

Excel 97: “Data” menu, “Filter”, “Autofilter” Excel 2007: “Home” tab, “Editing” group, “Sort & Filter” menu, “Filter”

OpenOffice: “Data” menu, “Filter” submenu, “Standard Filter”

Google Docs: “View” menu, “List view”

Page 66: NCLA2011 Using Spreadsheets

Filtering data: Example1

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Checking link resolver

Imagine you want to check the accuracy of your link resolver.

• The resolver has 100,000+ journal titles listed

• Sorting will take FOREVER.• Filtering lets you extract each host, to

sort separately

Page 67: NCLA2011 Using Spreadsheets

Filtering data: Example1

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Checking link resolver

Solution:

1. Get list of hosts from “filter” options.

2. Group these hosts, if needed.

3. Add new worksheets (1 per host)

4. Filter data to show one host group.

5. Copy displayed data

6. Paste data into blank worksheet

Page 68: NCLA2011 Using Spreadsheets

Filtering data: Example2

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Team Teaching

Imagine you’re recording class statistics• You have a list of librarians who taught

classes, BUT...• When two teachers co-taught, they’re

listed in the same cell as “Teacher1 and Teacher2”

Page 69: NCLA2011 Using Spreadsheets

Filtering data: Example2

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Team Teaching

Solution:• Go to the filter menu• Select all options that include the name

of the teacher you’re checking• Manually add, or copy & paste results

into blank worksheet to use functions.

Page 70: NCLA2011 Using Spreadsheets

Filtering data: Example3

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Business planning

Imagine helping a patron who wants to open a new restaurant.

• Patron hasn’t decided where• Patron hasn’t decided type• Patron wants to evaluate multiple

factors and consider multiple scenarios before deciding.

Page 71: NCLA2011 Using Spreadsheets

Filtering data: Example3

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Business planning

Solution:• 1) Download the full data set • 2) Prepare the spreadsheet (transpose if

needed, freeze headers)• 3) Decide on most important criteria• 4) Filter by most important criteria• 5) Repeat 3-4 as needed

Page 72: NCLA2011 Using Spreadsheets

Filtering data: Example3

Rearrange

Collate

Sort

Filter Compare

Derive info

Example: Business planning

Example:• Filtered by average HH breakfast

spending (>=$95), then by total 25-34 population (>=10,000, <100,000)

Data source: SimplyMap

Page 73: NCLA2011 Using Spreadsheets

Filtering data

Rearrange

Collate

Sort

Filter Compare

Derive info

Questions about filtering?

Page 74: NCLA2011 Using Spreadsheets

Comparing data: Functions

Rearrange

Collate

Sort

Filter

CompareDerive info

There are many functions which allow you to compare one piece of data to another.• if• countif (not count!)• match• find• isnumber

Page 75: NCLA2011 Using Spreadsheets

Comparing data: Functions

Rearrange

Collate

Sort

Filter

CompareDerive info

Syntax:• if (condition,“is match”,“not match”)

Behavior:• Returns “is match” if condition is true.• Returns “not match” if false

Example:• =if(a1=“y”, “is y”, “is not y”) • If a1=“x” then it will return “is not y”.

Page 76: NCLA2011 Using Spreadsheets

Comparing data: Functions

Rearrange

Collate

Sort

Filter

CompareDerive info

Syntax:• countif (range, testvalue)

Behavior:• Returns the # of cells in the range that

equal the testvalue.

Example:• If a1=“a”, a2=“b”, a3=“c” etc. then

countif(a1:a26,“b”) would return 1.

Page 77: NCLA2011 Using Spreadsheets

Comparing data: Functions

Rearrange

Collate

Sort

Filter

CompareDerive info

Syntax:• match(testvalue, range,0)

Behavior:• Returns the location of the first cell

matching testvalue within the range.• Returns an error if no cell matches.

Example:• If a1=2,a2=4,a3=6, etc, then match(“6”,

a1:a9,0) would return “3”.

Page 78: NCLA2011 Using Spreadsheets

Comparing data: Functions

Syntax:• find(testvalue, cell)

Behavior:• Returns the location of the first

occurrence of testvalue in the cell.• Returns an error if it doesn’t occur.

Example:• If a1=“book” then =find(“k”,a1) would

return “4”

Rearrange

Collate

Sort

Filter

CompareDerive info

Page 79: NCLA2011 Using Spreadsheets

Comparing data: Functions

Rearrange

Collate

Sort

Filter

CompareDerive info

Syntax:• isnumber(cell)

Behavior:• Returns true if cell contains a number,

and false if it doesn’t

Example:• isnumber(“a”) returns false.• isnumber(1) returns true.

Page 80: NCLA2011 Using Spreadsheets

Comparing data: Function example

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Even within a single platform there might be thousands of journals.

• Checking them all by hand is slooow.

• Data can be checked quickly against list from host, if it’s in the same order.

• Variant titles can cause lists to be in different orders.

Page 81: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 1 of 5)

1. Insert 3 columns between the data sets, label 1st “sort1”, and 3rd “sort2”.

Explanation: – 1st column will hold the “sort” for 1st data set. – 3rd column will hold the “sort” for 2nd data set.– 2nd column will stay blank, so the sets can be

sorted independently.

Comparing data: Function example

Page 82: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 2 of 5):

2. In “sort1”: =if(isnumber(match(titles1, titles2)), “match”, “zz”)

Explanation for match(titles1,titles2):• This takes the value in titles1 that’s on the

same row as the formula, and looks for it in titles2. It returns a number if it finds a match, and an error if not.

Comparing data: Function example

Page 83: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 2 of 5):

2. In “sort1”: =if(isnumber(match(titles1, titles2)), “match”, “zz”)

Explanation for isnumber(match()) :• This returns true if match returned a number,

and false if match returned an error.

Comparing data: Function example

Page 84: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 2 of 5):

2. In “sort1”: =if(isnumber(match(titles1, titles2)), “match”, “zz”)

Explanation for if(is#(), “match”, “zz”):• If isnumber returned true, this returns “match”• If isnumber returned false, this returns “zz”

Comparing data: Function example

Page 85: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 2 of 5):

2. In “sort1”: =if(isnumber(match(titles1, titles2)), “match”, “zz”)

Result:• The 1st data set can now be sorted so that all

the titles with matches go to the top, and the ones without go to the bottom.

Comparing data: Function example

Page 86: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 3 of 5):

3. In “sort2”: =if(isnumber(match(titles2, titles1)), “match”, “zz”)

Explanation/Result:• Same as Step 2, except it’s checking for the

title from titles2 in the range titles1.

Comparing data: Function example

Page 87: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 4 of 5):

4. Sort the data sets, with “sort” first and the title column second

Explanation/Result:• The matching journal titles in the two data sets

should now be lined up with each other.• The shorter list of non-matching titles is easier

to check for common (fixable) variants.

Comparing data: Function example

Page 88: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Checking link resolver

Solution (step 5 of 5):

5. In the middle blank column, enter an “if” checking whatever you want.

Example: if(url1=url2,“good”,“check”)

Explanation/Result :• All journals with correct URLs labeled

“good”. • If all journals are “good”, you’re done!• If not, you still have a fewer to check by

hand!

Comparing data: Function example

Page 89: NCLA2011 Using Spreadsheets

Rearrange

Collate

Sort

Filter

CompareDerive info

Questions about comparing data using functions?

Comparing data: Function example

Page 90: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

• Intuitive understanding can be more important than perfect accuracy.

• Graphs and charts can convey more information at a glance than a large table full of numbers

Page 91: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Available space analysis

Page 92: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

Spreadsheets make it easy to create simple graphs and charts.

1. Select the data to be included

2. Click on the icon that looks like a graph, or use menus to “insert chart”

3. Select the type of chart you want (bar, line, pie, etc.)

4. Click the button to complete

Page 93: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

Title Data point

SeriesPlot area Chart area

Legend

X-axis

Data table

X-axis labelY-axis label

Y-axis

Gridline

Tick mark

Page 94: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

General tips

• To change elements: Right click it.

• To add elements: Right-click on the chart area and look for something like “chart options” to activate it.

• To change the axis maximum: Right click on the axis.

Page 95: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Historial racial census data• Original data:

Data source: American Factfinder

Page 96: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

Example: Historial racial census data• Charts:

Data source: American Factfinder

Page 97: NCLA2011 Using Spreadsheets

Comparing data: Graphs

Rearrange

Collate

Sort

Filter

CompareDerive info

Questions about

charts & graphs?

Data source: American Factfinder

Page 98: NCLA2011 Using Spreadsheets

Deriving information

Rearrange

Collate

Sort

Filter

Compare

Derive info

Deriving information is done using formulas and functions.In general, functions are what you do…• Add up cash on hand for parking /lunch• Calculate a waiter’s tip• Figure out how much time is left

…and formulas are how you do it.• Total * 20% = tip

If you calculate something, you’ve derived information.

Page 99: NCLA2011 Using Spreadsheets

Deriving information

Rearrange

Collate

Sort

Filter

Compare

Derive info

Commonly used functions: • sum(range) - adds up all the numbers• average(range) - calculates mean• median(range) - finds the middle• max(range) - finds the largest number• min(range) - finds the smallest number

These functions all work on groups (ranges) of cells.

Page 100: NCLA2011 Using Spreadsheets

Deriving information

Rearrange

Collate

Sort

Filter

Compare

Derive info

Common formulas: • Addition: a1+b1• Subtraction: a1-b1• Multiplication: a1*b1• Division: a1/b1• % change: (new-old)/old • distance/difference: abs(value1-value2)• Monthly balance:

balance*(1+rate/100/12)+credits-debits

Page 101: NCLA2011 Using Spreadsheets

Deriving information

Rearrange

Collate

Sort

Filter

Compare

Derive info

Excel has a statistical analysis add-in which analyzes data many different ways (average, standard deviation, kurtosis, t-tests, etc.)

• Included, but you have to activate it.

• More advanced statistical functions might use approximations – if precision is important, use R, SAS, SPSS, etc.

Page 102: NCLA2011 Using Spreadsheets

Deriving information

Rearrange

Collate

Sort

Filter

Compare

Derive info

Questions about deriving information using

functions and formulas?

Page 103: NCLA2011 Using Spreadsheets

Sample projects

Bibliographic Instruction Statistics

Library: North Carolina A&T• Lists teacher(s), student numbers and type, date,

requesting department, etc.• Manually updated after classes are taught.

• Automatically extracts and formats data for multiple monthly and end-of-year reports.

Page 104: NCLA2011 Using Spreadsheets

Sample projects

E-resource Management

Library: Appalachian State University• Lists e-resource name, source, coverage, cost,

renewal date, etc. • Usage statistics updated regularly using SUSHI,

resource info updated as needed.

• Allows easier analysis of e-resource value• Allows easier comparison of resources• Allows easier budgeting

Page 105: NCLA2011 Using Spreadsheets

Sample projects

Backend development (one-time)

Source: NCknows• Used concatenate function and known values to

generate large amounts of code for website during LibraryH3lp rollout.

• Reduced amount of time needed • Reduced likelihood of typos• Easily corrected, adapted, and expanded

Page 106: NCLA2011 Using Spreadsheets

Thank you!

Copies of the handout, or new ones customized for your library’s needs, can be

gotten by contacting

Gwen Exner ([email protected])

Questions?Links to step-by-step instructions for doing various tasks in different programs are available at:

http://swissarmyspreadsheets.com/NCLA2011