Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hola
Buscando ayuda de cualquier persona con experiencia en R Scripts
Primera vez que intenta utilizar R Script Visual para crear un diagrama de dispersión x-y.
Tengo la siguiente tabla de datos de muestra:
| Fecha | Facilidad | DMA | VisitCount | Promedio |
| 3/3/2022 | ABECEDARIO | 188 | 979 | 67 |
| 3/4/2022 | ABECEDARIO | 43 | 679 | 47.03 |
| 3/5/2022 | ABECEDARIO | 132 | 1015 | 34.34 |
| 3/6/2022 | ABECEDARIO | 122 | 995 | 94.72 |
| 3/7/2022 | ABECEDARIO | 50 | 657 | 32.25 |
La instalación se utilizará como filtro o cortadora, por lo que no será necesario en la parcela en sí.
Mi hipótesis es que AvgTIY está influenciado por WFD y VisitCount.
Cada fecha debe representar un solo punto en la gráfica.
x=WFD, y=VisitCount, size= AvgTIY. Después de ver varios videos, he llegado a este punto:
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset <- data.frame(WFD, VisitCount, AvgTIY)
# dataset <- unique(dataset)
# Paste or type your script code here:
library(ggplot2)
ggplot(data=dataset, aes(x=VisitCount,
y=WFD))
geom_point(aes(size=AvgTIY), color= "Blue")
Pero mi visual está vacía.
Espero que alguien pueda prestarme la ayuda que necesito para generar la trama.
Gracias de antemano y saludos,
Solved! Go to Solution.
Después de más investigación, creo que encontré mi problema.
Me perdí el signo "+", que ahora sé que es necesario para que R siga leyendo el código.
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset <- data.frame(WFD, VisitCount, AvgTIY)
# dataset <- unique(dataset)
# Paste or type your script code here:
library(ggplot2)
ggplot(data=dataset, aes(x=VisitCount,
y=WFD)) +
geom_point(aes(size=AvgTIY), color= "Blue")
Después de más investigación, creo que encontré mi problema.
Me perdí el signo "+", que ahora sé que es necesario para que R siga leyendo el código.
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset <- data.frame(WFD, VisitCount, AvgTIY)
# dataset <- unique(dataset)
# Paste or type your script code here:
library(ggplot2)
ggplot(data=dataset, aes(x=VisitCount,
y=WFD)) +
geom_point(aes(size=AvgTIY), color= "Blue")
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!