Coder Social home page Coder Social logo

Comments (11)

stefanzweifel avatar stefanzweifel commented on May 23, 2024 3

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.

stefanzweifel avatar stefanzweifel commented on May 23, 2024 1

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.

stefanzweifel avatar stefanzweifel commented on May 23, 2024 1

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.

Gummibeer avatar Gummibeer commented on May 23, 2024 1

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.

stefanzweifel avatar stefanzweifel commented on May 23, 2024 1

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.

Gummibeer avatar Gummibeer commented on May 23, 2024 1

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.

stefanzweifel avatar stefanzweifel commented on May 23, 2024

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.

Gummibeer avatar Gummibeer commented on May 23, 2024

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.

Gummibeer avatar Gummibeer commented on May 23, 2024

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.

Gummibeer avatar Gummibeer commented on May 23, 2024

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.

Gummibeer avatar Gummibeer commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.