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

"Your local authority area is null" #9

Closed
harry-wood opened this issue Mar 30, 2021 · 7 comments · Fixed by #19
Closed

"Your local authority area is null" #9

harry-wood opened this issue Mar 30, 2021 · 7 comments · Fixed by #19
Assignees

Comments

@harry-wood
Copy link

I'm filling in a postcode (tried a few different ones) and choosing a waste type and all I'm getting is "Your local authority area is null" at the moment.

Screen Shot 2021-03-30 at 14 49 34

@JackGilmore JackGilmore self-assigned this Aug 19, 2021
@JackGilmore
Copy link
Owner

Hi @harry-wood. So sorry it's taken me so long to get back to you.

I've been using the postcodes.io API for this and working off the basis that postcodes in Scotland use the admin_district attribute (as they don't have multi-tier authorities) whilst the rest of the UK uses the admin_county attribute.

However, it appears in the case of the postcode you've entered it doesn't have an admin_county attribute. Would I be correct in assuming that the admin_district value of "Westminster" would be the correct local authority you'd expect to see here? Also, do you know of a recycling centre that would be contained within the local authority area? That way when I fix this issue I can make sure there's at least 1 HWRC on the map for that area.

@DsposalTom
Copy link
Collaborator

@JackGilmore I am having the same issue.

My postcode is PR9 0LX, which returns "Your local authority area is null"

On postcodes.io it is returning:
"admin_district": "Sefton"
"admin_county": null,

My local HWRC is Southport Household Waste Recycling Centre

@JackGilmore
Copy link
Owner

Hey @DsposalTom. I've managed to create a fix for this to fall back to admin_district if admin_county is null. Have deployed this to https://staging.openwastemap.uk/ if you want to check before I merge and put it live?

This should fix the issue Harry was having too, but I've noticed another issue regarding the postcode he's used in his example above. The recycling centre for Westminster (Smugglers Way Household Recycling & Waste Centre) sits outside that London borough area and provides for multiple councils (Hammersmith & Fullham, Kensington & Chelsea, Lambeth, Wandsworth and Westminster).

At the moment I don't think the lookup would work for all 5 boroughs so I'll probably have to open another issue off the back of this to investigate how we solve that issue. I think Jez had mentioned in the past that we can tag the owner on these sorts of HWRCs with the different councils/counties/boroughs with commas separating them...

@DsposalTom
Copy link
Collaborator

@JackGilmore works like a dream.

Yeah we need to think about areaServed - this is what we found from the workshops https://github.com/OpenDataManchester/Open3R/blob/main/docs/2_Key_Concepts/2_1_Key_Concepts.md#area-served

@DsposalTom
Copy link
Collaborator

I have had a quick look and actually my postcode is a good example of the admin_district not being the whole story when it comes to access to the HWRCS.

So PR9 0LX is in Sefton.
Sefton has 4 HWRCs.
But these sites are actually part of Merseyside Recycling & Waste Authority (https://www.merseysidewda.gov.uk/).
It looks like MWDA is responsible for 16 HWRCs.
I assuming that merseyside is E23000004 but that seems to be Police Force Area Boundary(?).
Is this where wikidata can jump in to help to store a list of areaServed? Either a simple single location, a list of predefined locations or a unique geojson? Might be one for Ian

@harry-wood
Copy link
Author

Sounds like I've come up with an awkward test case. It's a speciality of mine!

Anyway staging.openwastemap.uk is looking good with a fix to the immediate "null" issue. 👍

@JackGilmore JackGilmore linked a pull request Oct 13, 2021 that will close this issue
@JackGilmore
Copy link
Owner

Awesome. Thanks for your help guys. I've merged these changes and deployed them to the live site.

I've opened up a new issue (#18) for addressing these edge cases where residents from multiple LAs can access an HWRC. Probs best if we shift the conversation to there for strategies with tagging the data appropriately.

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 a pull request may close this issue.

3 participants