First graph

Maximum Temperature for Different Cities in January in 2019.

ggplot(hightemp, aes(x = Jan, y = City, color = City, group = City)) +
  geom_line() +
  geom_point() +
  labs(title = "Maximum Temperature for Different Cities in January",
       x = "Max Temperature (°F)",
       y = "City") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))
## `geom_line()`: Each group consists of only one observation.
## ℹ Do you need to adjust the group aesthetic?

Second graph

Maximum Temperature for Different Cities in Fabuary in 2019.

ggplot(hightemp, aes(x = Feb, y = City, fill = City)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(title = "Maximum Temperature for Different Cities in Febuary",
      x = "Max Temperature (°F)",
      y = "City")+
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5)) 

Third graph

Maximum Temperature for Different Cities in April in 2019.

ggplot(hightemp, aes(x = Apr, y = City, fill = City)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(title = "Maximum Temperature for Different Cities in April",
      x = "Max Temperature (°F)",
      y = "City")+
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))

## Forth graph Maximum Temperature for Different Cities in June in 2019.

ggplot(hightemp, aes(x = Jun, y = City, color = City, group = City)) +
  geom_line() +
  geom_point() +
  labs(title = "Maximum Temperature for Different Cities in June",
       x = "Max Temperature (°F)",
       y = "City") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))
## `geom_line()`: Each group consists of only one observation.
## ℹ Do you need to adjust the group aesthetic?

## Fifth graph Maximum Temperature for Different Cities in August in 2019.

ggplot(hightemp, aes(x = Aug, y = City, fill = City)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(title = "Maximum Temperature for Different Cities in August",
      x = "Max Temperature (°F)",
      y = "City")+
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))

## Sixth graph Maximum Temperature for Different Cities in October in 2019.

ggplot(hightemp, aes(x = Oct, y = City, color = City, group = City)) +
  geom_line() +
  geom_point() +
  labs(title = "Maximum Temperature for Different Cities in October",
       x = "Max Temperature (°F)",
       y = "City") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))
## `geom_line()`: Each group consists of only one observation.
## ℹ Do you need to adjust the group aesthetic?

## Seventh graph Maximum Temperature for Different Cities in December in 2019.

ggplot(hightemp, aes(x = Dec, y = City, color = City, group = City)) +
  geom_line() +
  geom_point() +
  labs(title = "Maximum Temperature for Different Cities in December",
       x = "Max Temperature (°F)",
       y = "City") +
  theme_minimal() +
  theme(plot.title = element_text(hjust = 0.5))
## `geom_line()`: Each group consists of only one observation.
## ℹ Do you need to adjust the group aesthetic?

## Eighth graph Maximum Temperature for Different Cities in 2019.

data_long <- hightemp %>%
  pivot_longer(cols = -City, names_to = "Month", values_to = "Max_Temperature") %>%
  mutate(Month = factor(Month, levels = month.abb))

ggplotly(
  ggplot(data_long, aes(x = City, y = Max_Temperature, frame=Month)) +
  geom_linerange(aes(ymin = 0, ymax = Max_Temperature), color = "black") +  
  geom_point(size = 3, color = "black") +  
  theme_bw() +
  theme(
    panel.grid.major.y = element_blank(),   
    legend.position = c(1, 0.55),           
    legend.justification = c(1, 0.5)
  )+
  labs(
    title = "Maximum Temperature for Different Cities in 2019",
    y = "Temperature (°F)"
  )
)
## Warning: A numeric `legend.position` argument in `theme()` was deprecated in ggplot2
## 3.5.0.
## ℹ Please use the `legend.position.inside` argument of `theme()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.