Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

How to load CSV file with https:// on shinyapps?

$
0
0

I would like to load a csv-File from a https url and store it in a data frame.

On my local Windos it works without any problem, but as soon as i upload it to shinyapps.io i don't get the proper data out of the file.

library(shiny)

ui <- fluidPage(
    tableOutput("bat")
)

server <- function(input, output) {
    library(readr)
    bat <- read.csv("https://share.publibike.ch/index.php/s/S7wYDma8KE2CTqC/download")
    output$bat <- renderTable(bat)
}

shinyApp(ui = ui, server = server)

In the log-file of shinyapps.io i found this:

Warnung in file(file, "rt")
cannot open URL 'https://share.publibike.ch/index.php/s/S7wYDma8KE2CTqC/download': HTTP status was '403 Forbidden'
Warnung: Error in file: cannot open the connection to 'http://share.publibike.ch/index.php/s/S7wYDma8KE2CTqC/download'

I also tried several libraries: RCurl, curl, download.file but nothing worked so fare.


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>