![]() Visualizing States and Cities by Lollipop chartĪnother way to represent the same information is a lollipop chart. It looks like most of the lights seen are either white, orange, red, or blue lights. the size of the box is proportional to its count among all lights treemap(speed, index ="bigram", vSize ="n", type ="index", fontsize.labels = 6, title = 'UFO Speed Words' ) Hopefully this will tell us something interesting about the most common characteristics of UFOs. In this case, we have counts of the bigrams, so we will set the size of the rectangles to reflect the count of each pair. Treemaps work by making the area of the rectangles proportional to some variable in our dataframe. big % unnest_tokens(word, comments, token ='ngrams', n =2) %>% anti_join(stop_words) %>% count(word, sort =TRUE) #solve problem of bigrams with stop words bigrams_separated % separate(word, c("word1", "word2"), sep = " ") #keep only alphabetical words and longer than 2 letters bigrams_filtered % filter( !word1 %in% stop_words $word) %>% filter( !word2 %in% stop_words $word) %>% filter(str_detect(word1, ']')) %>% filter(str_detect(word2, ']')) %>% filter(nchar(word1) > 2) %>% filter(nchar(word2) > 2) %>% filter(word1 != 'ufo') %>% filter(word2 != 'ufo') #most common types of lights seen lights % filter(word2 = 'light' | word2 = 'lights') %>% unite('bigram', -n, sep =' ') #What type of shapes? shapes % filter(word2 = 'shape' | word2 = 'shaped') %>% unite('bigram', -n, sep =' ') #movement mvt % filter(word2 ='movement' | word2 = 'movements') %>% unite('bigram', -n, sep =' ') speed % filter(word2 = 'speed' | word2 = 'speeds') %>% unite('bigram', -n, sep =' ') Visualizing UFO Characteristics by Treemap Now we can use the great tidytext package to dive into the reports and see what we can find in the text descriptions. Data Clean Up and Counting library(tidyverse) library(tidytext) library(ggmap) library(stringr) df % count(city, state, shape) %>% arrange(desc(n)) %>% head() # A tibble: 6 x 4 # city state shape n # 1 seattle wa light 113 # 2 phoenix az light 90 # 3 san diego ca light 78 # 4 portland or light 77 # 5 las vegas nv light 68 # 6 los angeles ca light 63 Let’s see if we can find out anything that might help us to decide whether UFOs are indeed human or alien. Could a government be so stupid as to test secret, highly-advanced technology in the middle of the day in San Diego? Not likely. Can Data Analysis Help us Figure Out the Mysteries of UFOs?Įver since then, I’ve tried to figure out what exactly UFOs might be. It simply vanished upwards, like a piece of dust being vacuumed up a tube. Eventually, the UFO shot up into the atmosphere at a hyper-drive-like speed that can only be described as physically impossible. All in all, I believe we had at least five witnesses. Shocked, we ran and told our confused but intrigued parents, who then came and watched with us for another ten minutes or so. I distinctly remember the way the sun glared off the metallic exterior of the craft - it was just like the UFOs in the movies and the ones you hear about on your local news. The UFO was not far from us, either, at a height you might see a helicopter. If you were facing the paper, unaware of the pencil moving behind the paper, the holes would appear “instantaneously.” In reality, the pencil is simply moving in another “hidden,” third dimension. The best way I can describe it would be to imagine taking a pencil and poking holes in a two-dimensional sheet of paper. I mean it did not move - it simply appeared at different locations. We looked up to watch a shiny, silver disk hovering effortlessly and silently in the blue sky, shooting across the lengths of entire clouds instantaneously. As my buddy and I were skateboarding, something in the sky caught my eye. The year must have been around 1993 or so. It was just another Sunday afternoon at the local park in La Mesa, CA. My UFO StoryĮver since I saw a UFO in the middle of broad daylight in the 3rd grade, I’ve been interested in aliens and UFOs. You might even learn some nifty R tricks for cleaning and visualizing your data. What might we learn from this? At the very least, if we want to maximize our chances of seeing a UFO, we might learn where and when to look for one. In the course of this investigation, we’ll be using a host of methods in R, from treemaps, lollipop charts, and network diagrams, to geographical maps and even a couple of statistical tests. ![]() ![]() In this post, we dig into 80,000+ NUFORC ( National UFO Reporting Center) UFO sighting reports. If the words data and aliens interest you, you’re in the right place.
0 Comments
Leave a Reply. |