1. Assignment 1 McCormack
CRIM.3950.01
Open the Excel data file in the Week 5 folder.
The Excel data file contains all of the crime that was reported to
the Boston Police Department in
2017. Some edits have been made to the data in order to make it
usable in our course. Further,
some variables were removed, and some cases (1,803) were
removed because they were
unnecessary and lacked information we needed for their use,
respectively. Your file should look
like this, with several tables across the top of the file – eight in
total:
This lab will show you how, and ask you, to create various
tables and charts/graphs. Specifically,
a pie chart and bar chart will be made, and we’ll create/format
tables. We’ll use Excel for the
creation of the charts and Word (or analogous program) for the
creation and formatting of tables.
The Pie Chart
2. To begin, we need to tell Excel what values we are interested in
charting. Our first charts will
examine the “All Crime: Offense Type” data. So, select the
first frequency cell (B5) by left-
clicking it, and drag the pointer down the column to the last
frequency cell (B10). Be sure NOT to
highlight B11, that is the total. If selected, Excel w ould think
we want that to be considered as a
category, e.g. an offense type.
Assignment 1 McCormack
CRIM.3950.01
Next, click the Insert Tab on the Ribbon (the top of the page),
then select the Pie Chart option in
the Charts group.
A sub-menu will appear offering different pie chart types.
Select the first option in the 2D
menu and a pie chart will appear.
This chart has 6 slices, but we don’t know what they mean.
3. Let’s add labels to the chart along
with them.
Notice a new section called Chart Tools has appeared which
adds three new tabs to the Ribbon:
Design, Layout (depending on Excel version), and Format. My
only has “Design and Format”. All
the tools should be readily available regardless of which version
you have. The first thing we wish
to do is modify the layout of the chart. Under the Design tab, in
the Chart Layouts group which
shows the different looking charts - you’ll see a down arrow
with a horizontal line above it.
Click on it so you can see all the layout options. Since we might
have different Excel versions (or
different programs) you have some freedom based on
preference. We want to select a style with a
Legend (showing which color is which offense type) and a Chart
Title. Hopefully, the default chart
already has these. The best and clearest option in my Excel
version is the 9th chart style. This style,
instead of having a legend, has labels outside of each slice.
Chart Title
4. 1 2 3 4 5 6
Assignment 1 McCormack
CRIM.3950.01
Now, let’s add a title to the chart. Click the Chart Title, and a
box will appear around it, indicating
this part of the chart has been selected. Right-click on the box
and select Edit Text, and then delete
the current text and type Boston Crime by Offense Type, 2017.
You may have to expand the title
box. Do this by moving the cursor to a corner of the text book
where the title is located. Click and
drag horizontally until the title is presented in one line. You
may, then, want to center the title. If
this is not an option, press Enter after you’ve placed your cursor
before the years. This will move
them to a second line and center the text. Another option, as
seen below, is to simply change the
size of the text. This may make it more visually appealing, too.
Finally, we want to add labels to our Legend. Right now,
numbers appear in the Legend box (or
5. above each section if you selected the chart style as me), which
doesn’t initially inform a reader to
what they correspond. Click on the Legend or any individual
number (depending on Excel version)
and a box will appear around it, indicating this part of the chart
has been selected.
1
2
3
4
5
6
CHART TITLE
1
2
3
4
5
6
BOSTON CRIME BY OFFENSE TYPE, 2017
6. Assignment 1 McCormack
CRIM.3950.01
Right-click the selection (one of the boxes) and then choose
Select Data from the menu. A new
Select Data Source menu will appear. Click on the Edit button
from the Horizontal (Category)
Axis Labels window in this menu. A new Axis labels menu will
appear which wants you to select
the appropriate labels for the Legend. Now left-click and hold
on the Aggravated Assault cell
(A5), and drag the mouse down to Robbery (A10) cell so all 6
levels of offense type are selected.
Hit Enter, followed by OK when returned to the Select Data
Source menu, and now you can see
that the Legend is labeled correctly.
The chart may be fairly small, but you can adjust its size on the
screen by clicking and dragging
one of the resizing handles along the chart frame. You probably
have to do this, so the entire legend
box is visible, as well as the labels of the ‘sli ces’. Try doing
this now. You might also need to
7. move the legend boxes to make it more aesthetically pleasing.
Feel free to play around with the
color schemes, too.
Create similar looking pie charts for 3 offense types of your
choice. Thus, when completed,
you will have 4 pie charts: the 1 we just created and the 3 of
your choosing.
Copy/paste them into a Word document (.doc or .docx) which
will be submitted.
Beneath each new chart (3 you picked), write a 100-word
paragraph describing the
chart.
Aggravated
Assault
Burglary
Homicide
Larceny
Motor Vehicle
8. Theft
Robbery
BOSTON CRIME BY OFFENSE TYPE, 2017
Assignment 1 McCormack
CRIM.3950.01
The Bar Chart
We can easily create a bar chart as a way to display this data as
well. Select the range of values to
be charted again (the frequencies), and then select the Insert
Tab from the Ribbon. Under the
Charts group, select the Column button, and then select the first
2D Column chart option.
A chart will appear. By default, we should have a basic looking
bar chart with a “Chart Title”
available. If not, find a new chart style that give you this
option. Click on the chart title so a box
appears around it, right-click the title and select Edit Text.
Delete the Chart Title, and write Boston
Crime by Offense Type, 2017.
9. Now, we need to create and label the X-axis (the horizontal
one). These are the offense types.
Under the Design tab you should see a Quick Layouts option.
Using the dropdown menu select
the 9th option. This should add an X-axis and a Y-axis label to
our current chart. If not the 9th
option, find the appropriate chart style. Click the X-axis text
box to edit and have this label read
“Offense Type”.
The next step to take is to add labels to the bars themselves.
Right now, all that appears are
numbers, so the reader doesn’t know which bars refer to which
offense types. Click on the number
1 below the first bar. This will place a box around al l of the bar
labels (1-4). Right-click the box
and then choose Select Data from the menu. A new Select Data
Source window will appear. Click
on the Edit button from the Horizontal (Category) Axis Labels.
A new Axis labels menu will
appear which wants you to select the appropriate labels for the
bars. Now left-click and hold on
the Aggravated Assault (A5) cell in the worksheet, and drag the
mouse down to the Robbery (A10)
0
10. 2000
4000
6000
8000
10000
12000
1 2 3 4 5 6
Boston Crime by Offense Type, 2017
Assignment 1 McCormack
CRIM.3950.01
cell so all 6 types of crime are selected. Hit Enter, select OK
when returned to the Select Data
Source menu, and now the bars are labeled correctly.
Next, edit the text of the vertical axis to read “Number of
Offenses”. Finally, we don’t need the
Legend, since there’s only 1 series of data (in essence the chart
title labels this series). Click on
the Legend, and then Delete it. (Use either the DELETE key on
the keyboard, or right click and
11. select Delete). In order to view the bar for Homicide, you may
need to enlarge the image.
Furthermore, due to long labels, they may be situated at an
angle. Feel free to adjust the chart.
Widening the chart is a good option.
If you did this correctly, your chart should look something like
this:
Create similar looking bar charts for the same 3 offense types
for which you created pie
charts. Thus, when completed you will have 4 bar charts: the 1
we just created and the 3 of
your choosing.
Copy/paste them into a Word document (.doc or .docx) which
will be submitted.
Beneath each new chart (3 you picked), write a 100-word
paragraph describing the
chart.
0
13. se
s
Offense type
Boston Crime by Offense Type, 2017
Assignment 1 McCormack
CRIM.3950.01
Creating/Formatting Tables and Charts
The tables provided for you in Excel were made to allow for
easy creation of the pie and bar charts.
Often, however, the data will not be presented neatly and/or
will be done so in a way that is not
appealing. Thus, you will be required to create new,
professional-looking tables. Take the first
table in Excel, for instance:
All Crime
Day of the Week
Monday 2218
Tuesday 2391
14. Wednesday 2333
Thursday 2728
Friday 2418
Saturday 2387
Sunday 2255
16730
By itself, it is a fairly straight-forward and easy to understand
table. However, it is not necessarily
visually appealing. To import this table from Excel to Word, I
simply highlighted all cells (D2
through E12) and copied/pasted it onto this page. From here, we
could edit the table. Not all
programs allow you to copy/paste so easily. Let’s start from
scratch. Here’s what the table should
(could) look like when you are finished:
All Crime
Day of the Week
Monday 2218
Tuesday 2391
Wednesday 2333
15. Thursday 2728
Friday 2418
Saturday 2387
Sunday 2255
Total 16730
Microsoft word has a very generic, yet simple way to start a
table from scratch. On the top of the
page, click the Insert tab. Here, you will see, located j ust under
the tab, a Table option. Clicking
the drop-down menu via the arrow symbol (▼) you’ll have the
options to manually create the size
of the table you want or to use table-making functions.
For the first table we can click the Insert Table opti on. You will
see a customizing toolbox
appear:
Assignment 1 McCormack
CRIM.3950.01
For this first table, we want 10 rows and 2 columns. We also
16. want to AutoFit to contents. This
option will resize the cells based on the content
(letters/characters) within them according to our
preset margins. Your table will look like this at first:
Now, we can start to fill out the table based on our information
in the table:
All Crime
Day of the Week
Monday 2218
Tuesday 2381
Wednesday 2333
Thursday 2728
Friday 2418
Saturday 2387
17. Sunday 2255
Total 16730
Now, we have to make it look appealing. A few quick edits are
all that is required. First, we want
to Merge and Center the first and second rows, separately.
Highlight the entire first row. Once
highlighted, a “Table Tools” tab should appear to the right of
the other Word tabs. Select “Layout”
Assignment 1 McCormack
CRIM.3950.01
and then Merge Cells. Then, in the “Home” tab, from the
“Paragraph” section, center the text.
Perform this again for the second row. Your table should look
like this:
All Crime
Day of the Week
Monday 2218
Tuesday 2381
Wednesday 2333
18. Thursday 2728
Friday 2418
Saturday 2387
Sunday 2255
Total 16730
Next, we want to edit the font and text within the table.
Highlight the first row and select “B” from
the Font section of the “Home” tab to make this text bold. Then,
highlight the variable name and
select “I” from the Font section of the “Home” tab to make this
text italicized. The table should
look like this:
All Crime
Day of the Week
Monday 2218
Tuesday 2381
Wednesday 2333
Thursday 2728
Friday 2418
19. Saturday 2387
Sunday 2255
Total 16730
Highlight the crime totals (from 2218 down to 16730). Under
the paragraph section in the “Home”
tab, align the values to the right:
All Crime
Day of the Week
Monday 2218
Tuesday 2381
Wednesday 2333
Thursday 2728
Friday 2418
Saturday 2387
Sunday 2255
Total 16730
20. Assignment 1 McCormack
CRIM.3950.01
We now want to get rid of all of the extra borders and lines to
make this table look professional.
Highlight the entire table. From the “Home” tab, select the
borders dropdown arrow in the
“Paragraph” section. Select the option of No Border. Your table
will look like this:
All Crime
Day of the Week
Monday 2218
Tuesday 2381
Wednesday 2333
Thursday 2728
Friday 2418
Saturday 2387
Sunday 2255
Total 16730
Now, we just have to include a few horizontal lines. Using the
21. same borders dropdown arrow,
select the appropriate Top and Bottom Borders in order produce
the following (Yours may
slightly differ based on the type of line selected):
All Crime
Day of the Week
Monday 2218
Tuesday 2381
Wednesday 2333
Thursday 2728
Friday 2418
Saturday 2387
Sunday 2255
Total 16730
In order to change the line style (see how I have the double
lines?), select Borders and Shading…
from the borders drop-down menu found in the Paragraph
section of the Home tab.
Create similar looking tables for the same 3 offense types for
which you created charts. Thus,
22. when completed you will have 4 tables: the 1 we just created
and the 3 of your choosing.
Copy/paste them into a Word document (.doc or .docx) which
will be submitted.
Ensure all of your pie charts, bar charts, corresponding
paragraphs, and tables are submitting in
one Word (.doc or .docx) file for Assignment1.