class: center, middle, inverse, title-slide # Lab 04: Wrangling spatial data ### 2018-02-08 --- ## Agenda 1. Lab logistics 2. Review of Lab 03 3. Lab 04: Wrangling spatial data 4. Getting started with lab --- ## Lab logistics - Start the lab in class: - You can read it ahead of time but wait till we do an intro to get everyone on the same page to actually start doing the lab. - Make a decision as a team -- if you want to read the lab ahead of time, all team members should do the same. - Make time to meet outside of class: We recommend that you set a weekly meeting time that all team members can commit to so that you can use that time to finish the lab. - Actually read the lab: - Don't just skip to the exercises. - Read and do everything outlined, even if you don't have to turn it in as part of an exercise. - If the expectations of an exercise is not clear, ask (and we made some formatting updated to help). --- ## Review of Lab 03 - Describe the premise of the last lab. - What did you discover in the last lab, particularly with respect to the joke "La Quinta is Spanish for next to Denny's"? --- ## Lab 04: Wrangling spatial data - Same data set - Start by eliminating non-US locations - Keep the two data frames (Denny's and La Quinta) separate - Join these data frames in a way that lists all possible pairings of Denny's and La Quinta locations in a given state  - Calculate the distances between the establishments and compare across a few states where Mitch Hedberg's joke seems more likely to hold true --- ## Getting started with lab Start new project and set up git: - Go to the course GitHub organization and find the lab-03 repo that has your team name on it. - On GitHub, click on the green Clone or download button, select Use HTTPS (this might already be selected by default, and if it is, you’ll see the text Clone with HTTPS). Click on the clipboard icon to copy the repo URL. - Go to RStudio Cloud and into the course workspace. Create a New Project from Git Repo. You will need to click on the down arrow next to the New Project button to see this option. - Copy and paste the URL of your assignment repo into the dialog box and hit OK. - Follow the instructions to configure your git credentials. To double check, run the following commands and make sure your info is correct: ``` git config --global user.email git config --global user.name ``` - Install the `tidyverse` package and make sure it's being loaded in your Lab .Rmd. - Cache your password (if you like)