Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61635

Script works on Desktop, but not on Service. Says "unsupported conversion"

$
0
0

Hello,

 

I'm trying to use R to create a table with a single element where it displays the reverse geocoded address of a lat-lon position using Nominatim.

 

It works fine on the desktop version:  

 

print_funcionando.PNGBut it displays this error when I publish it to the web:

print_erro.PNG

This is the code I am using, nothing fancy:

library(gridExtra)
library(httr)

lat <- dataset$latitude
lon <- dataset$longitude

x <- c("http://nominatim.openstreetmap.org/reverse?format=json&lat=", lat, "&lon=", lon)
request_url <- paste(x, collapse="")

r <- GET(request_url)
r <- content(r)

address <- r$address

t <- data.frame(
    Rua=c(address$road),
    Cidade=c(address$city),
    UF=c(address$state)
)

grid.table(t)

 

What could be causing this issue "Error in iconv(x, "latin1", "ASCII") : unsupported conversion from 'latin1' to 'ASCII' in codepage 1252"? I researched it around the web, but found nothing that could give me a hint on what to do.

 

Please know that I am very new both to Power BI and R, so if anyone can lend me a hand, try to be very specific.


Viewing all articles
Browse latest Browse all 61635

Trending Articles



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