I've been looking into integrating my local council. Unfortunately their available data isn't ideal to work with. Digging around some issues here I can see a lot of similarities to #448.
Findings
Data is in the format of an annual PDF with coloured cells for black/brown/green+brown bins.
Searching is based on street name (partial name will list multiple streets if there are multiple matches)
It looks as though some larger streets have different collection days. Searching for Newtown Road will provide 3 options, 2 of which are the same street with different collection days, based on odd/even split. E.g. -
Street page provides the collection day and the week cycle (A or B) and a link to the PDF. No specific date information of which bin is on which day.
A and B week cycles seem to just be reversed. (Week A is Black bin while Week B is Green+brown bin.)
Bank Holidays don't seem to be reflected in the PDF, though from memory I believe the councils approach is leave it out and they'll get to it when they can.
I've done some scraping of their site and it looks like there are only 10 possible calendars (5 days of A+B cycles).
Looking at their accessibility information, it looks as though they are aware that PDF documents on their site aren't friendly for screen readers etc and work is being done to correct this (They mention in 2024). However, for now PDF's are all we've got.
I have reached out to the council to see if there are other formats available and am awaiting a response.
Ideas
Search should be straight forward, though the multiple collection schedules for some streets needs to be taken into account (Choice presented to the user I guess.).
I think like the excellent work done in #448, a manually hard coded dictionary for each of the 10 options could work while the data is still in a PDF format. I'd be happy to put the work in for this if the maintainers think this is the best approach.
Alternatively, we know the start date of each calendar and that it always alternates between black/green+brown, except for one week per year where green is not collected, so we could just work it out.
When (If?) the council change this for next year, we switch to using their data.
[X] I have provided a tested working address/postcode/UPRN with bin collections available
[X] I understand that this project is run by volunteer contributors and completion depends on numerous factors - even with a request, we cannot guarantee if/when your council will get a script
Handling scenarios where multiple results are returned - I'm thinking the most effective method is to raise an exception and to ask the user to grab the exact wording from the council site (I believe there may only be 1 or 2 instances of this anyway).
Name of Council
Nuneaton and Bedworth Borough Council
Example Address/Postcode
Newtown Road
Search URL
https://www.nuneatonandbedworth.gov.uk/bin-day
Additional Information
I've been looking into integrating my local council. Unfortunately their available data isn't ideal to work with. Digging around some issues here I can see a lot of similarities to #448.
Findings
Newtown Road
will provide 3 options, 2 of which are the same street with different collection days, based on odd/even split. E.g. -I've done some scraping of their site and it looks like there are only 10 possible calendars (5 days of A+B cycles).
Looking at their accessibility information, it looks as though they are aware that PDF documents on their site aren't friendly for screen readers etc and work is being done to correct this (They mention in 2024). However, for now PDF's are all we've got.
I have reached out to the council to see if there are other formats available and am awaiting a response.
Ideas
Verification