Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

7.3.7 Visualization for Law and Order - Video 4: A Heatmap

December 13, 2018
by
MIT OpenCourseWare
YouTube video player
7.3.7 Visualization for Law and Order - Video 4: A Heatmap

TL;DR

This video demonstrates how to create line plots and heat maps to visualize motor vehicle theft data based on the day of the week and hour of the day, providing insights into crime patterns.

Transcript

In this video, we'll add the hour of the day to our line plot, and then create an alternative visualization using a heat map. We can do this by creating a line for each day of the week and making the x-axis the hour of the day. We first need to create a counts table for the weekday, and hour. So we'll use the table function and give as the first va... Read More

Key Insights

  • 🥳 Line plots can be created to show the variation in motor vehicle thefts based on the day of the week and hour of the day.
  • 🚦 Heat maps provide a visual representation of crime patterns, with lighter colors indicating higher crime rates at specific hours and days.
  • 🥵 The heat map reveals that Friday nights tend to have a higher occurrence of motor vehicle thefts.
  • 🥵 Customizing the colors and legend of a heat map can enhance the visualization and emphasize specific crime patterns.
  • 🫥 Both line plots and heat maps are valuable tools for understanding and analyzing crime data.
  • 🥵 Changing the color scheme in a heat map can alter the perception of crime intensity, allowing for different interpretations and emphasis.
  • 🥵 Heat maps are particularly useful in identifying crime hotspots or areas where criminal activity is more prevalent.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How can we identify which line corresponds to each day of the week in the line plot visualization?

To associate colors with the days of the week, you can add "color = Var1" after "group = Var1" in the ggplot function. This will color the lines according to the day they represent, making it easier to interpret the plot.

Q: What do the colors in the heat map represent?

In the heat map, the colors of the rectangles indicate the frequency or number of crimes occurring at a specific hour and day. Lighter colors indicate a higher number of crimes, while darker colors represent lower crime rates.

Q: Can we customize the legend in the heat map?

Yes, you can change the legend title by using "name = 'Total MV Thefts'" in the scale_fill_gradient function. To remove the y-axis label, you can add "theme(axis.title.y = element_blank())" after the scale_fill_gradient function.

Q: How can we change the color scheme of the heat map?

To modify the color scheme, you can adjust the "low" and "high" values in the scale_fill_gradient function. For example, setting "low = 'white'" and "high = 'red'" would make lower values appear as white and higher values as red.

Summary & Key Takeaways

  • The video explains how to create a line plot by categorizing motor vehicle thefts based on the day of the week and hour of the day, allowing for the visual comparison of crime counts.

  • The video then demonstrates the creation of a heat map using the same data, where each rectangle represents the frequency of crimes for a specific hour and day.

  • The heat map reveals patterns, such as higher crime rates around midnight and on weekends.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from MIT OpenCourseWare 📚

L13.8 A Simple Example thumbnail
L13.8 A Simple Example
MIT OpenCourseWare
Laplace Equation thumbnail
Laplace Equation
MIT OpenCourseWare
Recitation 10: Quiz 1 Review thumbnail
Recitation 10: Quiz 1 Review
MIT OpenCourseWare

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.