This CLI program is built on the LARAVEL FRAMEWORK. The program process a zip file from a (http://parlvid.mysociety.org/os/), and unzip the file and pull the contents/ folder into the Storage > app > public > postcode
directory. The Postcode directory contains 3 sub folders, and the application will seek to read the data in the Data > ONSPD_NOV_2022_UK.csv
. The data is about 1.44GB in size with about 2.6 million rows.
The repository contains source code on how to process the ONSPD_NOV_2022_UK.csv using Queues, ensure alot of server resources isn't used up while creating the records in the database. It also contains 2 endpoints to List and filter Postcode, and Get Nearby Postcodes.
Specifications in the clone include
git clone https://github.com/LarrySul/postcode-location-app/
composer install and setup your path by following .env.example provided
php artisan import-and-create:postcodes
Once the command is done you'll get a success message in the CLI π