Skip to content

Motivating toy example of a reproducible workflow to do cool things with data

License

Notifications You must be signed in to change notification settings

mikoontz/motivating-example-geocode

Repository files navigation

Where are we coming from and where are we going?

This repository contains a short, motivating example of a reproducible workflow.

It is intended to be the first exercise in a Carpentries-esque workshop or course and is designed to accomplish several goals at once:

  1. Motivate learners about the kinds of things we can do with a flexible, reproducible workflow
  2. Connect learners to the material and to each other by having their own "data" (their hometowns) used in an interesting way
  3. Demonstrate the interactive structure of the workshop (including using a collaborative document and embracing sticky notes)

Guide to running this exercise:

Setup

  1. Clone this repository to the computer you are using to present
  2. Create a collaborative document using, for example, Etherpad or Google Docs
  3. Make sure the collaborative document is available to everyone for editing
  4. Have a link to the collaborative document accessible-- either on the course website that everyone can find, or use a URL shortening service (e.g., tinyurl.com) to make a short URL that learners will be able to copy into their browser's location bar
  5. Make sure you have a spreadsheet application that can save files in a .csv format
  6. In the dc_origins.R file, be sure to change the currentLocation object so that it represents the workshop location. The object should be a character string.

Execution

  1. Tell learners to put all sticky notes down on the side of their computer
  2. Each student should open up the collaborative document, add their name to the list, and write down their hometown (as though they're searching Google Maps) on a separate line
  3. Green sticky notes up when finished; red sticky notes up if help is needed
  4. Instructor will copy the column of hometowns, open a spreadsheet program, paste the data inside, and add the column header "location". Feel free to add additional columns if you wish (student ID, for instance) to mimic more realistic data.
  5. Instructor will save the file as dc_origins.csv inside the motivating-example-geocode project folder
  6. Instructor will open the motivating-example-geocode.Rproj project and open the dc_origins.R file.
  7. Highlight all of the dc_origins.R code and run it
  8. Tell students not to focus on the details of this code, but let it wash over them to get a feel for what is possible and what they'll learn to piece something like this together
  9. Give a brief description the code will import the data we just generated: interact with online service (Google Maps or DataScienceToolkit) to "geocode" each hometown-- get its latitude and longitude, plot the locations on a world map, draw a line from hometowns to current workshop location, then save that world map as an image file.

Notes

  1. The punchline, while showing the saved plot, goes something like this: "Here is where we are all from (*pointing to hometown points*), here is where we are now (*pointing to current workshop location point*), and all of this is where we are headed (*gesturing to the whole plot and the code*)-- creating flexible, reproducible workflows to do cool things with data"
  2. I'd like to better incorporate feedback to use this motivating exercise as a way to orient learners (see related slides regarding Bloom's, metacognition, and sustainable learning: https://www.academia.edu/35830333/Short-_and_long-_form_training_lessons_from_education_and_cognitive_science_for_effectiveness_)
  3. I'm considering adding a level of complexity to this to generate an interactive map with leaflet or some such. This would add an additional (perhaps unnecessary) 'wow' factor, but would also allow me to zoom in on a smaller segment of the world if it turns out that everyone is from a small geographic extent and the plot isn't that impressive.
  4. There is a dc_origins_backup.csv file to use for testing and if something breaks unexpectedly. You'd certainly lose much of the benefit of using the data that connects the learners to the material though, so use at your own discretion!

About

Motivating toy example of a reproducible workflow to do cool things with data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages