library(twitteR)
library(tidytext)
library(stringr)
library(ggplot2)
library(dplyr)
library(knitr)
options(scipen=999, digits = 2)
num_tweets <- 1000
hash1 <- searchTwitter('expouav2016', n = num_tweets)
hash2 <- searchTwitter('UAVExpo2016', n = num_tweets)
hash3 <- searchTwitter('expouav', n = num_tweets)
hash1_df <- twListToDF(hash1) %>% mutate(Hash = 'expouav2016', CountCol = 1)
hash2_df <- twListToDF(hash2) %>% mutate(Hash = 'UAVExpo2016', CountCol = 1)
hash3_df <- twListToDF(hash3) %>% mutate(Hash = 'expouav', CountCol = 1)
FinalDF <- rbind(hash1_df, hash2_df, hash3_df) %>% mutate(ShortDate = as.Date(created, format = "%m/%d/%Y"))
# Create data frame to count how many times each hash was used
UseCount <- FinalDF %>% group_by(Hash) %>% summarize(n = n())
# Enforce the order of the bars for the chart by specifying the order explicitly
UseCount$Hash <- factor(UseCount$Hash, levels = UseCount$Hash[order(UseCount$n)])
# Create Bar Graph that displays how many times each hash was used
Plot1 <- ggplot(data = UseCount, aes(x = Hash, y = n)) +
geom_bar(fill = "deeppink2", colour = "black", stat = "identity") +
geom_text(aes(label = n, vjust = -.5)) +
labs(x = "Hash Tag") +
labs(y = "# of Times Used") +
labs(title = "Usage Chart")
# Count how many unique users used the hash tags
UniqueUsers <- n_distinct(FinalDF$screenName)
# Isolate each unique status source
FinalDF$statusSource = substr(FinalDF$statusSource,
regexpr('>', FinalDF$statusSource) + 1,
regexpr('</a>', FinalDF$statusSource) - 1)
# Summarize tweets by platform source - create data frame
FinalDF_platform <- FinalDF %>% group_by(statusSource) %>% summarize(n = n()) %>%
mutate(PercentofTweets = (n/sum(n)*100)) %>% arrange(desc(PercentofTweets)) %>% top_n(10)
# Enforce the order of the bars for the chart by specifying the order explicitly
FinalDF_platform$statusSource <- factor(FinalDF_platform$statusSource, levels = FinalDF_platform$statusSource[order(FinalDF_platform$PercentofTweets)])
# Create Horizontal Bar Chart that displays the top 10 most used platforms
Plot2 <- ggplot(data = FinalDF_platform, aes(x = statusSource, y = PercentofTweets)) +
geom_bar(fill = "dodgerblue1", colour = "black", stat = "identity") +
coord_flip() +
geom_text(aes(label = round(PercentofTweets, digits = 1), hjust = -.2)) +
labs(x = "Source Platform") +
labs(y = "% of Tweets") +
labs(title = "Platforms Used by % of Tweets")
# Summarize tweets by the person who posted the tweet (ScreenName)
FinalDF_Names <- FinalDF %>% group_by(screenName) %>% summarize(n = n()) %>% arrange(desc(n)) %>% top_n(10)
# Enforce the order of the bars for the chart by specifying the order explicitly
FinalDF_Names$screenName <- factor(FinalDF_Names$screenName, levels = FinalDF_Names$screenName[order(FinalDF_Names$n)])
# Create Horizontal Bar Chart that displays the top 10 most active users
Plot3 <- ggplot(data = FinalDF_Names, aes(x = screenName, y = n)) +
geom_bar(fill = "darkslateblue", colour = "black", stat = "identity") +
coord_flip() +
geom_text(aes(label = n, hjust = -.2)) +
labs(x = "Screen Name") +
labs(y = "# of Tweets") +
labs(title = "Top Users by # of Tweets")
# Word summary
reg <- "([^A-Za-z\\d#@']|'(?![A-Za-z\\d#@]))"
FinalDF_words <- FinalDF %>%
filter(!str_detect(text, '^"')) %>%
mutate(text = str_replace_all(text, "https://t.co/[A-Za-z\\d]+|&", "")) %>%
unnest_tokens(word, text, token = "regex", pattern = reg) %>%
filter(!word %in% stop_words$word,
str_detect(word, "[a-z]"))
# Sentiment Analysis - Create table that relates sentiments to words
nrc <- sentiments %>% filter(lexicon == "nrc") %>% select(word, sentiment)
Expo_Sentiments <- FinalDF_words %>% inner_join(nrc, by = "word")
# Create Table to display top 15 sentiments
Sentiment_Table <- Expo_Sentiments %>% group_by(sentiment) %>% summarize(n = n()) %>% arrange(desc(n)) %>% top_n(15)
# Positive word analysis - Create Table to display top 15 Positive words used
nrcPositive <- get_sentiments("nrc") %>% filter(sentiment == "positive")
uav_Positive <- FinalDF_words %>% semi_join(nrcPositive) %>% count(word, sort = TRUE) %>% arrange(desc(n)) %>% top_n(15)
# Negative word analysis - Create Table to display top 15 negative words used
nrcNegative <- get_sentiments("nrc") %>% filter(sentiment == "negative")
uav_Negative <- FinalDF_words %>% semi_join(nrcNegative) %>% count(word, sort = TRUE) %>% arrange(desc(n)) %>% top_n(15)
# Create Table to display Top 25 words used overall - not including the searched hash or rt (retweet)
Pop_Words <- FinalDF_words %>% group_by(word) %>% filter(word != "rt", word != "@expouav", word != "#uavexpo2016", word != "#expouav2016") %>% summarize(n = n()) %>% arrange(desc(n)) %>% top_n(25)
# Create table grouping by hash then date created for time series chart
CreatedDate <- FinalDF %>% group_by(Hash, ShortDate) %>% summarize(Total_Tweets = sum(CountCol))
# Create Line Graph to display hash usage by date over time
Plot4 <- ggplot(data = CreatedDate, aes(x = ShortDate, y = Total_Tweets, group = Hash, colour = Hash)) +
geom_line() +
geom_point(size = 4, shape = 20) +
scale_y_continuous(name = "# of Tweets", breaks=seq(0,400,50)) +
labs(x = "Date") +
labs(title = "Hash Use by Date")
Commercial UAV Expo & Conference 2016
October 31 to November 2
MGM Grand - Las Vegas, Nevada
Event Overview
Commercial UAV Expo and Conference is a Business to Business trade show that focuses on unmanned aerial vehicles for use in the industries of:
- Surveying & Mapping
- Civil Infrastructure
- Process, Power & Utilities
- Aggregates & Mining
- Construction
- Law Enforcement
- Emergency Response & Search and Rescue (SAR)
- Precision Agriculture
In the Conference Program, UAV industry experts share key insights into the issues asset owners face when implementing unmanned aerial systems (UAS), including systems selection and integration; developing enterprise workflows, guidelines and policies; data management and integration; and legal, safety and regulatory considerations. Plenary sessions and panels cover topics of interest to all end-users regardless of industry, while breakout sessions focus on UAV technology, applications and opportunities in the vertical markets listed above.
The international Exhibition includes drone airframe manufacturers, component and sensor manufacturers, software developers and service companies. Commercial UAV Expo has more exhibitors than any other commercial drone show.