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

Postnord data download fails when trying to push git changes #2

Open
jwarlander opened this issue Oct 8, 2024 · 3 comments
Open

Postnord data download fails when trying to push git changes #2

jwarlander opened this issue Oct 8, 2024 · 3 comments

Comments

@jwarlander
Copy link

It seems the Postnord job fails pretty much all the time:
Screenshot from 2024-10-08 09-58-30

This is probably because the OSM data download finishes first, and has already pushed a new commit to the repo, causing the Postnord push to fail due to being behind:
Screenshot from 2024-10-08 09-58-54

It's probably easy to fix by just following the suggestion and doing a "git pull" (on both jobs to be safe I guess), or one could set the jobs up to run sequentially in GitHub Actions instead.

@PierreMesure
Copy link
Member

Hi Johan,

Cool that you're interested in the project! May I ask if you're trying to reuse the data and what for? I'm always curious about reuses! 😃

You are right, something is wrong with this script. I just applied a quick fix by changing the time the script is run (now 1 hour after the other one).

This project in't active now but the goal was to create voronoi polygons for the areas of each postcode. If you're interested, it could be a cool technical challenge.

@jwarlander
Copy link
Author

Hey,

Sounds like an interesting challenge! What's the intended use case for that?

I mean, I'm not entirely sure how well it would map to exactly what streets fall into each postcode.. I guess voronoi polygons would be a reasonable estimation of the relative size of the areas covered though, for making comparisons across different parts of the country? 🤔

Anyhow, I actually ended up here because I was looking for a way to keep an updated list of all valid postcodes, perhaps on a weekly or monthly basis. It was nice to see that the PostNord API can be used with just the first three digits, to fetch a whole subset of postcodes at once. That certainly reduces the number of API calls one has to make!

@PierreMesure
Copy link
Member

PierreMesure commented Oct 14, 2024

The use case is to have an open alternative to the monopoly of postnummerservice. Postcode information is open data in many country and it should be in Sweden too. Maybe you've heard of Postnummerupproret, a project from @peterk and @kodapan. It was the same idea but using OSM to gather data.

Some info I gathered while investigating for this project:

  • Postnord lists approximately 16000 postcodes through this private API and this is what Postnummeruppror was counting as well.
  • But in other documents, I found that the number of postcodes that match to a physical address is closer to 10700. The rest are probably Box-addresses.
  • On OSM, there are objects for 7000 of these 10-11000 postcodes so that wouldn't be enough to build an exhaustive map, much less so an accurate one in areas which only have 1-2 objects. But it's a very good start, I think.

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