AtlasOfLivingAustralia / ALA4R

Access data and resources hosted by the Atlas of Living Australia (ALA)
https://atlasoflivingaustralia.github.io/ALA4R/
41 stars 8 forks source link

How to allow spaces in fq parameter #28

Closed snubian closed 6 years ago

snubian commented 6 years ago

There seems to be a recent change such that the following now returns zero records (was working fine several months back):

x <- ALA4R::specieslist(taxon = "Acacia", fq = c("state:New South Wales"))

If I change New South Wales to Queensland all is well:

x <- ALA4R::specieslist(taxon = "Acacia", fq = c("state:Queensland"))

I tried changing the spaces to obvious things such as + or %20 without luck. Any advice would be greatly appreciated! :)

raymondben commented 6 years ago

Use quotes:

x <- specieslist(taxon = "Acacia", fq = c("state:\"New South Wales\""))

(Needs \" not just ", because they are within quotes themselves). This gives me 412 results - does that seem right?

snubian commented 6 years ago

Magic, thanks! I did try single quotes but not the escaped double-quotes. Works perfectly for me now.

Cheers!