{"id":15788218,"url":"https://github.com/mevdschee/postcodes-nl","last_synced_at":"2025-03-31T18:23:53.625Z","repository":{"id":233202718,"uuid":"786258583","full_name":"mevdschee/postcodes-nl","owner":"mevdschee","description":"Dutch postcodes in CSV format (7zip) and MySQL import script","archived":false,"fork":false,"pushed_at":"2024-10-02T21:22:40.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-05T21:41:30.652Z","etag":null,"topics":["csv-dataset","dataset","mysql","nederland","netherlands","postcode","postcodes"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mevdschee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-13T22:38:12.000Z","updated_at":"2024-06-04T19:08:16.000Z","dependencies_parsed_at":"2024-10-04T21:51:36.183Z","dependency_job_id":null,"html_url":"https://github.com/mevdschee/postcodes-nl","commit_stats":null,"previous_names":["mevdschee/postcodes-nl"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fpostcodes-nl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fpostcodes-nl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fpostcodes-nl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fpostcodes-nl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mevdschee","download_url":"https://codeload.github.com/mevdschee/postcodes-nl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246515886,"owners_count":20790135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv-dataset","dataset","mysql","nederland","netherlands","postcode","postcodes"],"created_at":"2024-10-04T21:41:25.947Z","updated_at":"2025-03-31T18:23:53.602Z","avatar_url":"https://github.com/mevdschee.png","language":"PHP","readme":"# Postcodes NL\n\nDutch postcodes in CSV format (7zip) and MySQL import script to allow for address validation in the Netherlands.\n\nCheck out the [latest release](https://github.com/mevdschee/postcodes-nl/releases).\n\n## Files\n\nThe release contains the following files:\n\n- **`postcodes-nl.7z`**: Dataset in CSV format with 7zip compression\n- **`postcodes-nl.php`**: Script to load the CSV into a MySQL database\n- **`postcodes-nl.sh`**: Script to unpack the 7zip archive and run PHP\n\nNB: The CSV dataset is 341MB but with 7zip compression it is reduced to 15MB.\n\n## Running\n\nConfigure your database in `postcodes-nl.php` and run using:\n\n    bash postcodes-nl.sh\n\nTo run you need:\n\n    sudo apt install 7zip php-cli php-mysql\n\nThis assumes you are using a Debian based Linux distribution.\n\n## Releasing\n\nRelease using:\n\n    bash release.sh\n\nTo release you need:\n\n    sudo apt install 7zip wget php-cli gh\n\nThis uses the Github CLI on Debian Linux.\n\n## Sample data\n\nHere are the first 3 records of the 24.04 release in CSV format:\n\n    straat,huisnummer,huisletter,huistoevoeging,woonplaats,postcode\n    \"De Ruijterkade\",99,,,Amsterdam,1011AB\n    \"De Ruijterkade\",105,,1,Amsterdam,1011AB\n    \"De Ruijterkade\",105,,2,Amsterdam,1011AB\n\nHere is the SQL for those 3 records (including the table structure):\n\n    CREATE TABLE `postcodes` (\n    `straat` varchar(255) DEFAULT NULL,\n    `huisnummer` varchar(255) DEFAULT NULL,\n    `huisletter` varchar(255) DEFAULT NULL,\n    `huistoevoeging` varchar(255) DEFAULT NULL,\n    `woonplaats` varchar(255) DEFAULT NULL,\n    `postcode` varchar(255) DEFAULT NULL,\n    KEY `postcode` (`postcode`)\n    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;\n    \n    INSERT INTO `postcodes` (`straat`, `huisnummer`, `huisletter`, `huistoevoeging`, `woonplaats`, `postcode`) VALUES\n    ('De Ruijterkade',\t'99',\tNULL,\tNULL,\t'Amsterdam',\t'1011AB'),\n    ('De Ruijterkade',\t'105',\tNULL,\t'1',\t'Amsterdam',\t'1011AB'),\n    ('De Ruijterkade',\t'105',\tNULL,\t'2',\t'Amsterdam',\t'1011AB');\n\nNB: The 24.04 release has 9771442 records.\n\n## Credits\n\nThis project loads the smallest dataset from:\n\n- [github.com/mevdschee/bagconv-docker](https://github.com/mevdschee/bagconv-docker)\n\nWhich is a fork of:\n\n- [github.com/berthubert/bagconv](https://github.com/berthubert/bagconv)\n\nSee also [this blog post](https://berthub.eu/articles/posts/dutch-postcode-and-building-database/) by Bert Hubert.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmevdschee%2Fpostcodes-nl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmevdschee%2Fpostcodes-nl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmevdschee%2Fpostcodes-nl/lists"}