This project collects data from IBGE, treats it and loads it into a PostgreSQL database with the PostGIS extension.
The goal is to be able to perform geospatial operations in the database with simplified queries.
- Create a CSV file named data.csv inside the
files/inputs/
folder. Each line in this file must be in the file_name,lat,lng format. - Run the
ai_data.ipynb
notebook. - The resulting files will be placed in the
files/outputs/
folder.
Export the database:
pg_dump -U user -h host DB_NAME > export-YYYYMMDD.sql
Export table inserts:
pg_dump -U user -h host --column-inserts --data-only --table=TABLE_NAME DB_NAME > path/to/file.sql
Remove schema name from large files via bash:
sed -i -e 's/^INSERT INTO public\./INSERT INTO /' file.sql
Track/Untrack files with Git LFS:
git lfs track "file.ext"
git lfs untrack "file.ext"