Home > front end >  How do I insert more expansive dataframe columns with text or a table or ggplot2 ouput into a popup
How do I insert more expansive dataframe columns with text or a table or ggplot2 ouput into a popup

Time:09-23

I am at the very beginning of learning my first programming language, which is R. I am really keen to learn leaflet stuff and made some good progress over the last couple of nights.

Getting stuck with populating more expansive popup content within AddPolylines function. I have got it to populate the Asset_Name from my data frame.

However, how would I approach the following few options:

  1. Using two columns from my data frame together in one popup e.g.
  addPolylines(
    data = df$Geometry,
    color = "red",
    weight = 5,
    popup = df$Asset_Name & df$Asset_Description,
    group = "Polylines"
  ) %>%

This errors in R, I think because I am using the wrong operator.

  1. How could I use html and call columns from data frame in a popup? e.g.
"Asset Name:" df$Asset_Name </br>
"Asset Description:" df$Asset_Description

I am trying to read the documentation: enter image description here

  • Related