Comments (11)
I've removed the Liechtenstein Zipcodes in #31. I will tag a new minor version shortly.
Will create an issue to find an easy way to keep the data set up to date soon too.
I already started working on a v3:
- Dropped support for php 7.2 and php 7.3
- Added Type Hints, Return Hints
- Cleaned up some internal code
from php-swiss-cantons.
Yeah. That's a weird test to have.
And as you mentioned, the package is called "swiss cantons". Makes sense to remove traces of Liechtenstein from the dataset.
I will work on this over the next few days (with some other little internal improvements: Move to GitHub Actions, types) and will tag a new major version soon.
from php-swiss-cantons.
Will also see if I can update the dataset. Between 2016 and now, the zipcodes for some cities probably have changed too.
from php-swiss-cantons.
possibly you can also refactor the datasets a bit. The zip-code should only be a mapping objects instead of these full blown zip-code/city mappings.
Or do you want to extend to php-swiss
?^^
from php-swiss-cantons.
I've written some automated scripts at my day job, to keep our data sets up to date. One of those data sets contains zipcodes, cities and cantons. Have to check what I can reuse in this package.
Wikipedia is not the safest source for that data. The link mentioned in the README points to a 404 page. I guess we will probably use the dataset provided by the Swiss Post Office: https://swisspost.opendatasoft.com/explore/dataset/politische-gemeinden_v2/table/
from php-swiss-cantons.
Thanks @stefanzweifel ! We've updated our package to require your latest version and everything works fine. :)
https://github.com/elbgoods/laravel-swiss-canton-rule/releases/tag/0.2.0
from php-swiss-cantons.
Hm, I've added the Zipcode Search back in 2016 (#6) and I honestly can't remember why I've kept the LI zipcodes in the dataset.
I guess I was just to lazy to remove them from the data set from the federal website. 😅
You would suggest removing the Liechtenstein zipcodes from the package, right?
I think we could do that. However it would require a new major version. The ZipcodeSearch
might have been used by consumers directly, and I don't want to break existing usages.
from php-swiss-cantons.
yes, my problem is that the zipcode search gives a "valid" zipcode entry which isn't resolvable to a canton.
This case has even it's own unittest - exactly describing this. Successfull zipcode search but failing canton resolve.
from php-swiss-cantons.
But there isn't any machine readable page you could parse?
We do something similar for https://github.com/spatie/schema-org - generate the src
code from a RDFa file.
from php-swiss-cantons.
Don't know how reliable this table and HTML structure is - but for example parse this table: https://en.wikipedia.org/wiki/Cantons_of_Switzerland#Names_in_national_languages
from php-swiss-cantons.
PS: here is why/how we've found this problem^^
https://github.com/elbgoods/laravel-swiss-canton-rule
https://github.com/elbgoods/laravel-swiss-canton-rule/blob/36187010cd418e49a33ec7c54e00b574816081b0/tests/TestCase.php#L28-L49
from php-swiss-cantons.
Related Issues (9)
- Allow search by zip code HOT 6
- Lowercase abbreviations throws error
- Throws exception if passed zipcode is not an integer
- Fribourg should be Fribourg in english HOT 1
- Zip-code 2400 is duplicated
- Keep Zipcode Dataset automatically up to date HOT 3
- Zipcodes 8060 and 7001 not found in data files HOT 4
- Zipcode and Canton is not a One-to-One relationship HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-swiss-cantons.