Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bulk_postcode_lookup does not ignore spaces #17

Open
dave-lovell opened this issue Mar 5, 2024 · 0 comments
Open

bulk_postcode_lookup does not ignore spaces #17

dave-lovell opened this issue Mar 5, 2024 · 0 comments

Comments

@dave-lovell
Copy link

The help file for bulk_postcodes_lookup() says that spaces are ignored. Spaces are ignored for postcode_lookup(), but not for bulk_postcode_lookup().

library(PostcodesioR)

postcode_lookup("S7 1FL")
#>   postcode quality eastings northings country                   nhs_ha
#> 1   S7 1FL       1   434790    385119 England Yorkshire and the Humber
#>   longitude latitude european_electoral_region primary_care_trust
#> 1 -1.478695 53.36182  Yorkshire and The Humber          Sheffield
#>                     region           lsoa          msoa incode outcode
#> 1 Yorkshire and The Humber Sheffield 042D Sheffield 042    1FL      S7
#>   parliamentary_constituency admin_district                     parish
#> 1          Sheffield Central      Sheffield Sheffield, unparished area
#>   admin_county date_of_introduction              admin_ward ced
#> 1           NA               198001 Nether Edge and Sharrow  NA
#>                   ccg      nuts             pfa admin_district_code
#> 1 NHS South Yorkshire Sheffield South Yorkshire           E08000019
#>   admin_county_code admin_ward_code parish_code parliamentary_constituency_code
#> 1         E99999999       E05010875   E43000173                       E14001467
#>    ccg_code ccg_id_code  ced_code nuts_code lsoa_code msoa_code lau2_code
#> 1 E38000146         03N E99999999     TLE32 E01008112 E02001652 E08000019
#>    pfa_code
#> 1 E23000011

bulk_postcode_lookup(list(postcodes = c("S7 1FL")))
#> Warning in extract_results(r): Bad Request (HTTP 400).

bulk_postcode_lookup(list(postcodes = c("S7 1FL", "S71FL"))) |> 
  lapply(\(x) is.null(x[["result"]]))
#> [[1]]
#> [1] TRUE
#> 
#> [[2]]
#> [1] FALSE

Created on 2024-03-05 with reprex v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant