This is the week 3 assignment for the John Hopkins ‘Building Data Products’ Course.
In this we will:
- Create a web page presentation using R Markdown that features the date created and an interactive plot using Plotly.
2024-08-01
This is the week 3 assignment for the John Hopkins ‘Building Data Products’ Course.
In this we will:
# Load the library
library(plotly)
#Set the seed
set.seed(08012024)
#Generate some random x and y values
x <- rnorm(100)
y <- rnorm(100) *2
# Create a scatter plot using plotly
plot <- plot_ly(x = x, y = y, type = 'scatter', mode = 'markers',
marker = list(color = 'red', size = 10, line = list(color = 'pink', width = 2)))
# Display the plot
plot %>% layout(title = "Scatter Plot of Randomly Generated Data - 08-01-2024",
xaxis = list(title = "X values"),
yaxis = list(title = "Y values"))