Skip to content

Fix the area_lookup data - #182

Open
Moohan wants to merge 2 commits into
dep/r_4-1from
fix_area_lookup
Open

Moohan wants to merge 2 commits into
dep/r_4-1from
fix_area_lookup

Conversation

@Moohan

@Moohan Moohan commented Jul 17, 2026

Copy link
Copy Markdown
Member

This data is used in the match_area() function. I think we have spoken previously about deprecating that function (and so the area_lookup data too.

In the meantime, I wanted to make it work without the magrittr pipe %>% ... It wasn't that simple as the {SPARQL} package was removed from CRAN > 4 years ago, and the query didn't work anymore either.

I've overhauled the script, so 1) it's working and 2) as far as I can tell is as close as possible to the old behaviour. One change will be that area names with non-ASCII characters now seem to work, so I've just left them in; previously, the query wasn't returning them, so full ASCII versions of the names were being hardcoded.

I also added some tests to make comparing future updates of this simpler!

This data is used in the `match_area()` function. I think we have spoken previously about deprecating that function (and so the `area_lookup` data too.

In the meantime, I wanted to make it work without the magrittr pipe `%>%` ... It wasn't that simple as the `{SPARQL}` package was removed from CRAN > 4 years ago, and the query didn't work anymore either.

I've overhauled the script, so 1) it's working and 2) as far as I can tell is as close as possible to the old behaviour. One change will be that area names with non-ASCII characters now seem to work, so I've just left them in; previously, the query wasn't returning them, so full ASCII versions of the names were being hardcoded.

I also added some tests to make comparing future updates of this simpler!
@Moohan
Moohan force-pushed the fix_area_lookup branch from 8911aff to 57e219b Compare July 20, 2026 08:45
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

1 participant