add datasets and other usefull files

This commit is contained in:
Oscar Plaisant
2024-06-25 13:24:22 +02:00
parent 8bd048085a
commit fc6a95334d
18 changed files with 245957 additions and 0 deletions

33
Makefile Normal file
View File

@@ -0,0 +1,33 @@
DATABASE_NAME=SSB
DATABASE_FOLDER=${DATABASE_NAME}_dataset
DATABASE_FILE=${DATABASE_FOLDER}/${DATABASE_NAME}.db
all: execute-script
execute-script:
python3 concentration_test.py
pip-install:
bin/pip3 install -r requirements.txt
reset: delete-database import-from-csv
open:
sqlite3 flight_delay.db # open the interactive sqlite prompt
import-from-csv:
echo ${DATABASE_FILE}
sqlite3 ${DATABASE_FILE} ";" # create empty database
sqlite3 ${DATABASE_FILE} '.read ${DATABASE_FOLDER}/create_tables.sql'
# load csv files
ls ${DATABASE_FOLDER}/csv | sed "s/\(.*\)\.csv/\1/" | xargs -n1 | while read table; do \
echo "loading table '$$table' :"; \
sqlite-utils insert ${DATABASE_FILE} $$table ${DATABASE_FOLDER}/csv/$$table.csv --csv; \
done
delete-database:
rm -f ${DATABASE_FILE}