jorandradefig icon

rmd-shiny.rmd

jorandradefig | PRO | 06/15/21 01:15:29 AM UTC | 0 ⭐ | 9651 👁️ | Never ⏰ | []
R |

2.65 KB

|

None

|

0 👍

/

0 👎

---
output: html_document
runtime: shiny
---
 
# Tendencias en México
 
```{r setup, echo=FALSE, include = FALSE}
knitr::opts_chunk$set(echo = TRUE)
 
pacman::p_load(
  tidyverse,
  gtrendsR,
  shiny,
  sf,
  leaflet,
  plotly,
  magrittr,
  mapview,
  plainview,
  leafsync,
  htmltools
)
 
getwd()
 
statesJSON <- st_read("../input/mx-states.geo.json")
```
 
```{r, echo=FALSE}
inputPanel(
  textInput(
    inputId="keyword",
    value="Uber Eats,Didi Food,Rappi",
    label="Keyword:",
    placeholder="Bitcoin"
  ),
  shiny::tags$style(
    type="text/css",
    ".shiny-flow-layout div {width: 100%; display: flex;  justify-content: center; align-items: center;} .shiny-input-container {display: flex; flex-direction: column; justify-content: center; align-items: center;} #keyword {  }"
  )
)
 
keyword <- reactive({
  unlist(str_split(input$keyword,","))
}) %>% debounce(500)
 
trends <- reactive({
  trends <- gtrends(
    keyword=keyword(),
    geo="MX",
    tz="America/Mexico_City",
    time="now 7-d"
  )
  trendsOriginal <- trends
  trends <- trends$interest_by_region
  trends$name <- trends$location
  trends %>%
    mutate(
      name=case_when(
        name=="Mexico City" ~ "Ciudad De Mexico",
        name=="State of Mexico" ~ "Estado De Mexico",
        name=="Querétaro" ~ "Queretaro",
        name=="Michoacán" ~ "Michoacan",
        TRUE ~ name
      )
    )
})
 
states <- reactive({
  statesJSON %>% left_join(trends(),by="name")
})
 
colors <- reactive({
  colorNumeric(
    palette="RdYlBu",
    domain=states()$hits,
    reverse=TRUE
  )
})
 
renderUI({
  tagList(
    lapply(keyword(),function(x){
      data <- states() %>% filter(keyword == x)
      leaflet(data) %>%
        addTiles() %>%
        setView(
          lng=-102.5528,
          lat=23.6345,
          zoom=4
        ) %>%
        addPolygons(
          weight=1,
          color="#000000",
          opacity=0.8,
          fillOpacity=0.8,
          fillColor=colors()(data$hits)
        ) %>%
        addLegend(
          position="bottomleft",
          pal=colors(),
          values=data$hits,
          title="Hits"
        ) 
    })
  )
})
 
renderPlotly({
  trends() %>%
    group_by(keyword) %>%
    do(
      p=plot_ly(.,
        x=~reorder(name,hits),
        y=~hits,
        type="scatter",
        mode="lines",
        height=800
      ) %>%
      style(showlegend=FALSE)
    ) %>%
    subplot(
      nrows=length(keyword()),
      margin = 0.1
    )
})
 
renderTable({
  trends() %>%
    select(keyword,hits,name)
},
striped=TRUE,
hover=TRUE,
bordered=TRUE,
width="100%"
)
```
 

Comments

  • Venzetis icon
    03/30/26 01:51:45 AM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎