One of the most frustrating aspects of the Trump administration is the lack of honesty around simple things, from President Trump’s White House visitor log to his golf outings. However, thanks to the work of Factbase, there does exist a fairly comprehensive database of the President’s public schedule, which outlines his activities in the White House and his domestic and international travel.
To see what data and trends we might be able to glean from this information, I ingested the entirety of President Trump’s public calendar and press pool schedule, and built a series of visualizations highlighting what I felt were the notable trends. Note that exact while exact amounts may be imprecise due to how Factbase’s data is collected, many of the trends are clear and meaningful. Please see my key takeaways below!
A Dramatic Spike in Campaigning Activity Before the Midterms
Late Summer and early Fall of 2018 show the President at his most active, especially compared with the long lull in activity between the end of 2017 and beginning of 2018. I think it’s reasonable to chalk a lot of this activity up to increased political campaigning - the President hosted a number of rallies and made a number of visits to states and districts with seats up for election in the House and Senate. The fact that September and October are the two highest months in terms of activity at Join Base Andrews supports this claim, with the President making many short day trips from Andrews to attend campaign events across the country.
Fewer Intelligence Briefings
President Trump has received his Presidential Daily Brief (PDB), which is produced by the CIA and covers essential national security topics, only 7.6 times per month in 2018, on average. He averaged 10.7 briefings per month in 2017, which is likely still the lowest of any modern President.
Fewer Public Meetings and Events at the White House
In tandem with President Trump’s increased travel and campaign activity, his scheduled White House activites have declined, with Cabinet briefings and Oval Office meetings particularly down relative to early in his Presidency.
Tighly Packed Days
Nearly all of President Trump’s public activities are packed into the 9 AM - 4 PM timeframe, with the highest density of events coming in the 9 AM - 10 AM block. Given the amount of [“Executive Time”](A window inside Trump’s morning ‘executive time’ - CNNPolitics https://www.cnn.com/2018/01/16/politics/executive-time-donald-trump.../index.html) the President is rumored to spend, I’m not surprised that his schedule has been designed to protect his mornings and evenings….
Reading in the Calendar Data
You’ll need to use a library to convert the JSON data provided by the Factbase feed into a data frame, but otherwise this is a very straightforward process! I used Lubridate to make working with date/times a bit easier.
require(jsonlite) require(tidyverse) require(lubridate) cal <- fromJSON("https://media-cdn.factba.se/rss/json/calendar-full.json") cal$date <- as.Date(cal$date , "%Y-%m-%d") cal <- cal %>% mutate(start_hour = hour(hms(cal$time))) by_day <- cal %>% group_by(date) %>% summarize(count = n())
Creating a Time Series Heatmap (or a Calendar Heatmap)
require(ggTimeSeries) require(viridis) require(tidyverse) ggplot_calendar_heatmap(by_day, 'date', 'count') + scale_fill_viridis(option = "D", "Events") + facet_wrap( ~ Year, ncol = 1) + theme( axis.title.x = element_blank(), axis.ticks.x = element_blank(), legend.title = element_text(size = 6), legend.title.align = 1, legend.text = element_text(size = 6), legend.position = "bottom", legend.key.size = unit(0.2, "cm"), legend.key.width = unit(1, "cm"), panel.background = element_blank(), axis.ticks.y = element_blank(), strip.background = element_rect(fill = "grey90", color = "grey90"), plot.margin = unit(c(0, 1, 0, 0), "cm") ) + labs( title = "Scheduled Events by Day", subtitle = "From the President's public calendar", caption = "Source: Factbase", x = "", y = "" )
Creating a Day of the Week and Hour of the Day Heatmap
To build a heatmap focused on hours of the day, and days of the week, I built a simple two dimensional matrix using geom_tile, with the Viridis color palette again present to provide “heat”.
library(tidyverse) require(viridis) day_hour <- cal %>% group_by(day_of_week, start_hour) %>% summarize(events = n()) day_hour$day_of_week <- ordered(day_hour$day_of_week, levels=c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) ggplot(day_hour %>% filter(start_hour > 4), aes(start_hour, day_of_week)) + geom_tile(aes(fill = events), colour = "white", na.rm = TRUE) + scale_fill_viridis(option="D", "Events") + theme_bw() + theme_minimal() + labs( title = "Weekly Scheduled Events", subtitle = "Public events by day of the week and hour", x = "Appearances Per Hour", y = "", caption = "Source: Factbase" ) + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) + theme( axis.title.x=element_blank(), axis.ticks.x=element_blank(), legend.title=element_text(size=6), legend.title.align=1, legend.text=element_text(size=6), legend.position="bottom", legend.key.size=unit(0.2, "cm"), legend.key.width=unit(1, "cm"), panel.background = element_blank(), axis.ticks.y = element_blank(), strip.background = element_rect(fill = "grey90", color = "grey90") ) + scale_y_discrete(limits = rev(levels(day_hour$day_of_week)))