plotly / plotly/plotly.R

geom_GeomImage() has yet to be implemented in plotly

Abierto
#2,294 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
R
Estrellas
2.7k
Forks
641
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción


I am attempting to convert a standard ggplot2 scatterplot to a plotly graph using the ggplotly() function, but the lone caveat of the original scatterplot is that it uses headshots of NFL players for its points, rather than standard dots or other shapes. When I attempt this conversion, I am told that geom_GeomImage() has yet to be implemented in plotly. If it is possible for the plotly package to account for the geom_image() function, that would be fantastic.

Feel free to contact me at jacole@alumni.upenn.edu with any further questions about what I'm asking here.

# Scatterplot using ggplot
# Data frame is called DisguisedPassing_2018to2021_Vs_2022
# headshot_url is a column in the data frame that includes a link to each player's headshot
DisguisedRTG_ScatterPlot <- ggplot(data = DisguisedPassing_2018to2021_Vs_2022) +
  geom_image(aes(x = RTG_2018to2021_Disguise, y = RTG_2022_Disguise, image = headshot_url), size = 0.07,
             asp = asp_ratio) +
  scale_y_continuous(breaks = seq(60, 120, 15)) +
  scale_x_continuous(breaks = seq(65, 105, 10)) +
  labs(x = "Passer Rating from 2018-21", y = "Passer Rating in 2022",
       title = "Passer Rating vs. Disguised Coverages in 2022 and 2018-21",
       subtitle = "Among 27 QBs with 75+ Such Attempts in Each Time Span",
       caption = "Data from PFF") +
  theme_bw() + 
  theme(plot.title = element_text(size = 10, hjust = 0.5),
        plot.subtitle = element_text(size = 8, hjust = 0.5))

# Here's converting the above scatterplot to plotly using ggplotly() function
ggplotly(DisguisedRTG_ScatterPlot)

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo la conversión reportada de ggplotly(DisguisedRTG_ScatterPlot) con geom_image() y la estética headshot_url. Determina el alcance necesario para que plotly.R admita este geom y, a continuación, verifica que el diagrama de dispersión convertido renderice imágenes de jugadores en lugar de indicar que geom_GeomImage() no está implementado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
r
Área
data-visualization
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.