Coder Social home page Coder Social logo

stefanzweifel / php-swiss-cantons Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 1.0 625 KB

πŸ‡¨πŸ‡­ Find Swiss Canton by abbreviation, name or zipcode.

License: MIT License

PHP 100.00%
canton swiss package switzerland zipcode swiss-cantons abbreviations php-swiss-cantons php

php-swiss-cantons's Introduction

πŸ‘‹

Hi there, I'm Stefan, a full stack developer working from Zurich, Switzerland.

I love working on open-source software, that makes the work of others easier. Be it with Laravel or JavaScript packages others can install in their applications, or GitHub Actions Actions that make the administrative work around open source projects easier.

In my free time I've built and maintain a couple of open-source projects you might have come across:

  • git-auto-commit: The GitHub Action for committing files for the 80% use case. Used by organisations like GitHub, Shopify, Bun, Laravel and more than 40'000 others projects to improve their CI workflows.
  • changelog-updater Action: A GitHub Action to automatically add the latest release note to the CHANGELOG.md of a project. Used by more than 4'000 projects, it helps improve the developer experience for thousands of users.
  • sidecar-browsershot: Connecting two great Laravel packages (Sidecar and Browsershot), sidecar-browsershot allows one to generate screenshots or PDFs by using AWS Lambda. No need to install puppeteer on your servers.
  • laravel-stats: A PHP package to get insights into your Laravel projects. Shows statistics about the number of classes, lines of codes and more for all your Controllers, Models, Commands and more.
  • laravel-sends: A Laravel package that keeps track of all outgoing emails. Works great when paired with other services like AWS SES to track if certain mails have been delivered.

I'm also the creator of 3.screeenly.com, a SaaS that allows you to generate screenshots and PDFs of websites or your own code. Since it's inception in 2014, we generated more than 15 million screenshots for thousands of developers across the globe.

I also regularly write on my blog stefanzweifel.dev about programming and productivity. Some all time favourites are Deployer on GitHub Actions, articles on my Things 3 Setup, usage of Alfred or Getting Started with Bash Testing with Bats.


I love working on open-source projects. Whether it's writing code, writing documentation or helping out in the issue tracker or discussions in my projects. This type of work brings a great joy to my life as I can help other people reach their goals through software.

Thanks for visiting! ❀️
- Stefan

php-swiss-cantons's People

Contributors

gummibeer avatar mlfuchs avatar stefanzweifel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ksamanpriya

php-swiss-cantons's Issues

Lowercase abbreviations throws error

1. What's your issue?

The package throws an exception, if the provided abbreviation is not in uppercase.

2. Which PHP Version are you using?

I'm using PHP Version 7.0.

3. Which Version of the php-swiss-cantons Package are you using?

I'm using version 1.2.0.

5. What did you expect to happen in the first place?

The following code snippet shouldn't throw an exception.

$canton = $cantonManager->getByAppreviation('zh');

Keep Zipcode Dataset automatically up to date

The original zipcode data set has been downloaded from cadastre.ch in 2016.
Between 2016 and now, there have probably been some changes: Cities merged with other cities and received a new zipcode, Cities switched Cantons, etc.

I would like to add some bit of code (little bash script) to automatically download the latest dataset from a trusted source. Maybe we can use the open sourced data of the Swiss Post? (https://swisspost.opendatasoft.com/explore/dataset/politische-gemeinden_v2/table/)

If possible, it would also be great to automate this step. GitHub Actions makes it easy to schedule a monthly workflow to execute some scripts.

Related Issues

Throws exception if passed zipcode is not an integer

1. What's your issue?

Package throws an error if zipcode was provided as string instead of an integer.

2. Which PHP Version are you using?

I'm using PHP Version 7.0.

3. Which Version of the php-swiss-cantons Package are you using?

I'm using version 1.2.0.

4. In which context are you using the package? (Code Example goes here)

$canton = $cantonManager->getByZipcode('8000');

// Workaround:
$canton = $cantonManager->getByZipcode(intval('8000'));

5. What did you expect to happen in the first place?

Don't throw an exception :)

Allow search by zip code

It would be helpful if a canton could also be found by zip code.

$canton = $cantonManager->getByZipCode(8001);

Zip-code 9496 isn't swiss

The zip-code 9496 is part of Liechtenstein and not swiss.
https://en.wikipedia.org/wiki/Balzers
So the $cantonManager->getByZipcode(9496) throws an exception with message Couldn't find Canton for given abbreviation..

Because this package is about the swiss this zip-code shouldn't be part of it at all!?

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.