Hi! My name is Billy Orwell. I am a statiscian in US Department of Defence. As we know, terrorism is the saddest thing nowadays. We have studied the terrorist attacks in the world between years of 1970 and 2006. In which year occurred the most attacks in the United States and in which city occurred the most attacks in that year?
Answers: -In 1970, there was 458 terrorist attacks. Highest terrorist attacks were in US in 1970.
-In 1970, there was 82 terrorist attacks in New York City. Highest terrorist attacks were in 1970 in New York City.
global_terror <- read.csv("globalterrorismdb.csv")
terrorinUS <- global_terror %>%
group_by(iyear)%>%
filter(country_txt=="United States")%>%
count(iyear)%>%
arrange(desc(n))
#In 1970, there was 458 terrorist attacks. Highest terrorist attacks were in US in 1970.#
Whichcity <- global_terror %>%
group_by(city)%>%
filter(country_txt=="United States" & iyear=="1970")%>%
select(city)%>%
count(city)%>%
arrange(desc(n))
#In 1970, there was 82 terrorist attacks in New York City. Highest terrorist attacks were in 1970 in New York City.#
Additional information
Originality
Please mark relevant information with x, (ex. [x])
Is this question
[x] Original
[ ] Inspired
[ ] Paraphrased or copied
If you select Inspired or Paraphrased please provide the links in markdown format ( [link](http://example.com) ). Please provide all relevant links. You can refer to DataCamp course pages if you're inspired by them.
Difficulty Level
According to you, what is the level of difficulty of the question (note: this can be modified by instructor after submission)
[ ] Easy / Beginner (using a single command or concept is enough to solve the question)
[x] Intermediate (combining multiple commands, concepts is needed to solve the question)
[ ] Difficult (combining multiple commands with non-default options and looking for additional information online might be needed)
Question
Hi! My name is Billy Orwell. I am a statiscian in US Department of Defence. As we know, terrorism is the saddest thing nowadays. We have studied the terrorist attacks in the world between years of 1970 and 2006. In which year occurred the most attacks in the United States and in which city occurred the most attacks in that year?
Answers: -In 1970, there was 458 terrorist attacks. Highest terrorist attacks were in US in 1970. -In 1970, there was 82 terrorist attacks in New York City. Highest terrorist attacks were in 1970 in New York City.
Additional information
Originality
Please mark relevant information with x, (ex.
[x]
)Is this question
If you select
Inspired
orParaphrased
please provide the links in markdown format ([link](http://example.com)
). Please provide all relevant links. You can refer to DataCamp course pages if you're inspired by them.Difficulty Level
According to you, what is the level of difficulty of the question (note: this can be modified by instructor after submission)