walkerke / tigris

Download and use Census TIGER/Line shapefiles in R
Other
324 stars 45 forks source link

Error of using tigris::call_geolocator_latlon() #179

Open Helen-Jiahuan-H opened 1 year ago

Helen-Jiahuan-H commented 1 year ago

Hello,

I have encountered an error when I run the function triggers::call_geolocator_latlon(), which is attached as a screenshot shown below.

Screen Shot 2023-10-30 at 4 03 19 PM

The error was "Bas Gateway (HTTP 502)", so I wonder whether this is a problem with the server. However, I looked into the link (https://geocoding.geo.census.gov/geocoder/geographies/coordinates?) used in the source code of call_geolocator_latlon function and it seems to be fine.

Could anyone provide any insights on how I could fix this issue? Thank you very much in advance!

Best, Helen

lpiep commented 1 year ago

Hey Helen, I can't reproduce this right now.

> tigris::call_geolocator_latlon(35, -110)
[1] "040179601002001"

Can you try the code above and make sure it's not either a transient problem on Census's end, or else being caused by some odd values in your lat/long values?

Helen-Jiahuan-H commented 1 year ago

Hey Helen, I can't reproduce this right now.

> tigris::call_geolocator_latlon(35, -110)
[1] "040179601002001"

Can you try the code above and make sure it's not either a transient problem on Census's end, or else being caused by some odd values in your lat/long values?

Hi Logan,

Thanks for getting back to my question so promptly! I tried the code and it is working. I revised my values to up to 4 decimal places and now it seems working. I wonder what is the maximum number of decimal places that the latitudes and longitudes can have to feed into the call_geolocator_latlon() function?

Thank you!

Helen