Hashes prevent returning results
- Dominant language
- R
- Stars
- 778
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
## Reproducible Example
It appears that a hash (`#`) in the query of `ggmap::geocode()` will prevent returning a result. Perhaps queries should be cleaned? Below I use the same address but switch the `#` with "Suite" and it works fine.
```
> ggmap::geocode("110 Channel St #1 94158")
Source : https://maps.googleapis.com/maps/api/geocode/json?address=110+Channel+St+#1+94158&key=xxx
Warning: Geocoding "110 Channel St #1..." failed with error:
You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account
# A tibble: 1 x 2
lon lat
1 NA NA
> ggmap::geocode("110 Channel St Suite 1 94158")
Source : https://maps.googleapis.com/maps/api/geocode/json?address=110+Channel+St+Suite+1+94158&key=xxx
# A tibble: 1 x 2
lon lat
1 -122. 37.8
```
For now a simple `gsub()` appears to be the easiest workaround. For example:
`gsub("\\s#", " Suite ", "110 Channel St #1 94158)`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.