#친환경 자동차 브랜드 마케팅 팀 보고서
“보고일: 2025년 6월 14일 (일요일)” “보고장소 수원특례시” “보고 담당자 마케팅 팀2부 000”
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
library(ggplot2) library(dbplyr) mpg\(drv <- as.factor(mpg\)drv) ggplot(mpg, aes(x = cty, fill = drv)) + geom_histogram(position = “identity”, binwidth = 2, alpha = 0.5) + labs(title = “구동방식 도시 연비 분포”, x = “도시 연비”, y = “Count”)
ggplot(mpg, aes(x = hwy, fill = drv)) + geom_histogram(alpha = 0.5, position = “identity”) + facet_grid(trans ~ class) + labs(title = “고속도로 연비 분포 비교”, x = “고속도로 연비”, y = “count”)
ggplot(mpg, aes(x = class, y = cty)) + geom_boxplot() + labs(title = “자동차 등급병 도시 연비 비교”, x =“차량등급”, y = “도시연비비”) + theme(axis.text.x = element_text(angle = 45, hjust = 1))
library(leaflet) city <- c(“Berlin”,“Amsterdam”,“Bruxelles”,“Paris”,“Zürich”) lat <- c(52.5197,52.3571,50.8759,48.8670,47.3828) lon <- c(13.4177,4.9002,4.3448,2.3820,8.5556) days <- c(1,3,2,15,10)
travelPlan <- data.frame(city = city, lat = lat, lon = lon, days = days) map <- leaflet(travelPlan) %>% addProviderTiles(providers$CartoDB.DarkMatter) %>% setView(lng=7.9477, lat=50.0917, zoom = 5) %>% addCircles(lng=~lon, lat=~lat, radius=~days*3000, color = “yellow”) %>% addMiniMap(width = 150, height = 150) %>% addPolylines(lng=~lon, lat=~lat, weight=.5, color = “yellow”); map
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.