sample_data <- data.frame(
City = c("CityA", "CityB", "CityA", "CityC", "CityB"),
Longitude = c(10.0, 11.5, 10.0, 12.2, 11.5),
Latitude = c(50.1, 49.9, 50.1, 50.5, 49.9),
sentiment_score = c( 2.5, -1.0, 0.0, 3.0, -2.0),
sentiment_category= c("Positive","Negative","Neutral","Positive","Negative"),
User_Comment = c(
"Amazing rescue efforts!",
"Terrible flooding last night.",
"All calm here.",
"Hope everyone is safe.",
"Worst disaster ever."
),
Timestamp = as.POSIXct(c(
"2025-07-10 14:00", "2025-07-10 15:30",
"2025-07-11 10:00", "2025-07-11 12:45",
"2025-07-12 09:20"
))
)
scatter_plot <- create_interactive_plots(sample_data, plot_type = "scatter")
bar_plot <- create_interactive_plots(sample_data, plot_type = "bar")
bar_plot
timeline_plot <- create_interactive_plots(sample_data, plot_type = "timeline")
timeline_plot
Run the code above in your browser using DataLab