Please I am having issues creating an interactive map with the dataset below

The map I created isn't interactive and its not showing color as expected.

This is the dataset.

# give state boundaries a white border
l <- list(color = toRGB("Yellow"), width = 2, set="2")
# specify some map projection/options
g <- list(
  scope = 'world',
  projection =list(type="production_countries"),
  showlakes = TRUE,
  lakecolor = toRGB('Green')
fig <- replacement %>% filter(! %>% plot_geo(locationmode = "Continent") %>% 
  add_trace(z = ~sum,
            locations = ~production_countries,
            color = ~sum,
            text = ~ label_text,
fig <- fig %>% colorbar(title="color")
figA<- fig%>% layout(
  title = "Distribution of film production by countries",
  geo = g
type or paste code here

This is the code used

1 Like

For interactive plots in general one can use plotly, but for interactive maps I would recommend leaflet.
Hope this helps,

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.