A simple PHP Lumen based extractor to save and export data from CPTEC temperature maps from Leme-SP region and export to a JSON response.
The extraction process use Lumen jobs to download the CPTEC heat map images and extract the average temperature using the image color from the region of Leme-SP, so building a MySQL database with the extracted data.
http://{host}/api/extract/start={start}&end={end}
The exporting process is responsable for returning a JSON response based on all database data from the desired kind.
http://{host}/api/export/kind={kind}
docker-compose up --build
to start the necessary containers and active the Artisan Queuedocker-compose exec php bash
composer install
to install all dependenciesphp artisan migrate
to initialize the databaseexit
storage/logs/ storage/framework/ public/uploads/
¹ If the application is running on local the host will be 127.0.0.1
.
² A valid four digit year between 1961 and 2020.