Skip to main content

Abstract

Are you sick of those drab-looking graphs and plots in Stata and SPSS? We are too! So, this chapter covers data visualization in R. Specifically, you will be working with ggplot2, a package within the tidyverse set of packages, for making high-quality, reproducible graphics. Data visualization is an accessible, aesthetically pleasing, and powerful way to explore, analyze, and convey complex information. It is an integral part of investigating data and disseminating findings to wider audiences. Learning the basics of data visualization in R can improve your workflow and make your findings easier to interpret and more impactful. This chapter reviews how to visually represent nominal and ordinal data using bar charts and how to visualize ratio and interval data using histograms, scatterplots, line graphs, and boxplots in R. Crime data from Greater Manchester, England, will be used to demonstrate these visualization techniques.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 99.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Reference

  • Wilkinson, L. (1999). The Grammar of Graphics. Springer. ISBN 978-0-387-98774-3.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Electronic Supplementary Material

Data 3.1

(CSV 99 kb)

Data 3.2

(CSV 1.92 kb)

Key Terms

Aesthetics

Describe visual characteristics that represent the data.

Data

Information used to answer a research question; typically will be stored in a data frame. Data (plural) are made up of numerous datum (singular).

Geom

Abbreviation for geometries from the ggplot2 package.

Geometries

Describe the objects that represent the data.

Themes

Customizations that can alter the general appearance of a plot.

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Wooditch, A., Johnson, N.J., Solymosi, R., Medina Ariza, J., Langton, S. (2021). Data Visualization. In: A Beginner’s Guide to Statistics for Criminology and Criminal Justice Using R. Springer, Cham. https://doi.org/10.1007/978-3-030-50625-4_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-50625-4_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-50624-7

  • Online ISBN: 978-3-030-50625-4

  • eBook Packages: Law and CriminologyLaw and Criminology (R0)

Publish with us

Policies and ethics