• From Wednesday’s Discussion: The Big Lies People Tell In Online Dating. In particular scroll to the bottom for the discussion on self-reported bisexuality vs actual bisexuality as represented by messaging behavior.


  • Slides: Building a choropleth map of Vermont’s census tract by census tract population.
  • In-class exercise:
    • Data: Unzip
    • Code:
      • Lec15_solutions.R in Lec15
      • Lec16.R

Using Social Explorer

We will now use Social Explorer’s nice point-and-click interface to download census data.

  1. Create an account on Social Explorer using your Midd email
  2. Create a new project
  3. Select geographical aggregation level
    • In top middle of page, select “Show data by State” and turn Automatic to OFF
    • Select “Census Tract”
  4. Select survey: Decennial census, American Community Survey, etc.
    • On top right of page, click the Settings button (3 horizontal bars) and select create report.
    • On right hand panel select
      • Select a survey: Census 2010
      • Select a topic: Comprehensive is a good choice
  5. Select all Vermont census tracts
    • Zoom into VT
    • On the top right of map select Circle
    • Cast a wide net so that all census tracts in VT are captured
  6. Output results to CSV
    • Click “Create Report”
    • Select “Data Download” tab
    • Download the CSV and Data dictionary (variable codebook)

Installing Necessary Geospatial Packages on macOS Take 2

  1. Install brew by following by the instruction here:, following any instructions that may pop up. brew is a package manager for macOS that makes it much easier to UNIX (not R) packages onto macOS, which runs on a UNIX system.
  2. Install the UNIX version of the geos and gdal geospatial packages. These are packages that allow you to work with maps (project the globe onto a 2D page, import shapefiles, etc.). Run the following two lines in Terminal, following any instructions that may pop up.
    • brew install geos
    • brew install gdal
  3. Install the rgeos and rgdal R packages. These are R packages that allow R to interface with the above geospatial packages. Run the following two lines in R:
    • install.packages("rgeos", repos="", type="source")
    • install.packages("rgdal", repos="", type="source")