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

Don't have a parameter within the function that is automatically overridden #6

Open
joeytalbot opened this issue Jan 4, 2021 · 1 comment

Comments

@joeytalbot
Copy link
Contributor

joeytalbot commented Jan 4, 2021

Currently, lines 57-65 of accessibility.R control the type parameter of get_jts_data()

if(grepl(pattern = "jts040", csv_filename)) {
      type = "la"
    }
    if(grepl(pattern = "jts050", csv_filename)) {
      type = "lsoa"
    }
    if(grepl(pattern = "to be confirmed!", csv_filename)) {
      type = "lpa"
    }

This means for example that even if you specify that you want to see LSOA data, you will see LA data if you pick a table that contains LA data. This is counterintuitive.

res = jts::get_jts_data(table = "jts0401", output_format = "sf", type = "lsoa")
#> Joining, by = "LA_Code"
plot(res)
#> Warning: plotting the first 9 out of 94 attributes; use max.plot = 94 to plot
#> all

Created on 2021-01-04 by the reprex package (v0.3.0)

@Robinlovelace
Copy link
Member

Well spotted, important issue to fix!

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

2 participants