Welcome to Week 13!
Welcome to week 13 of Earth Analytics! This week, you will learn about working with twitter data to better understand disturbance events such as floods.
To follow along with the class, please be sure to download the data below. Save the data in your
|9:20 - 9:30||Student Midterm Presentation|
|9:30 - 10:20||Use Twitter Data To Support Natural Disaster and Emergency Response||Lise St. Dennis|
|10:30 - 12:00||Intro to APIs & Twitter Data in ||Leah|
|12:00 - 12:20||Questions / Review|
1. Final Presentation
Please note that we will have final presentations over the next two weeks. Similar to the midterms, you will be required to evaluate your colleagues! Please plan on attending class for all of the final presentations.
2. Homework (3 Points)
Sign up for a day to give your final presentation (next week or the week after). NOTE: If you sign up to present next week, instead of the final week of class, we will grade the analysis component accordingly. We understand that you may not be completely done with your analysis at this time. If you present early, please still plan to come to the final class to support your colleagues and participate in the course wrap up.
Create a plot of the top 15 words found in the Colorado Flood tweet word counts for September 2013. This is what you did together in class. Submit your plot as an
.Rmdfile containing the code to D2L. Use this lesson to help you complete the assignment
NOTE: There is no rubric for this week’s assignment. You will get full credit if your plot is correct (see example below).
3. Bonus Opportunities (4 Points Possible):
We will not grade your code syntax for this assignment. If the plot is correct and the code to generate the plot runs, you will receive full bonus credit.
Bonus Plot 1 - Interactive Map of Boulder Flood Tweet Locations (2 Points)
Create two interactive plots of the Boulder Flood Tweet data using
leaflet(). Add pop ups to your map so when you click on each point, you can view the tweet text and twitter handle associated with that point. Follow this tutorial on creating leaflet maps in
R and search as you need to - to create the map.
For your map:
- Filter the data for the first map to show the tweets surrounding the flood event: starting Sept 13-24 2013 through November 1 2013.
- Adjust the basemap tiles in your map using the
- Color each point by whether the tweet occured during the flood or after. To do this you will need to create a new column with the during / after the flood category. The code below will help you create this column.
flood_tweet_locations <- flood_tweet_locations %>% mutate(dur_aft = ifelse(date_time <= end_flood_date,"During", "After"))
- When you format your popup, you can use the popup argument. The code below is an example of formatting the popup with bold for the username and a line break after the username as you see in the example map below. The data.frame name in the code below is
popup = paste0("<strong>", flood_tweet_locations$username, "</strong><br>", flood_tweet_locations$tweet_text)
Bonus Plot 2 - Population Projected Male Population (2 Points)
Use the Colorado Information Warehouse API get population projection data for males using the following parameters:
- Time span: 1990-2040
- Column category:
- Age range: 60-80 years old
ggplot() to create your plot and be sure to label x and y axes and give the plot a descriptive title.