ium_434804/data.sh
Dawid af149190ea
Some checks reported errors
s434804-training/pipeline/head This commit looks good
s434804-evaluation/pipeline/head Something is wrong with the build of this commit
change data.sh
2021-05-10 21:34:48 +02:00

14 lines
1.4 KiB
Bash

#!/bin/bash
echo "pobieram dane"
curl -OL https://git.wmi.amu.edu.pl/s434804/ium_434804/raw/branch/master/country_vaccinations.csv
echo "CUTOFF danych"
shuf ./country_vaccinations.csv > ./vaccines.csv | tail -n +$((${CUTOFF})) > ./vaccines.csv
echo "Wielkość zbioru"
wc -l ./vaccines.csv
head -n 1468 vaccines.csv > ./test.csv
head -n 2936 vaccines.csv | tail -n 1468 > ./validation.csv
tail -n +2936 vaccines.csv > ./train.csv
wc -l ./*.csv
sed -i '1s/^/country,iso_code,date,total_vaccinations,people_vaccinated,people_fully_vaccinated,daily_vaccinations_raw,daily_vaccinations,total_vaccinations_per_hundred,people_vaccinated_per_hundred,people_fully_vaccinated_per_hundred,daily_vaccinations_per_million,vaccines,source_name,source_website\n/' ./test.csv
sed -i '1s/^/country,iso_code,date,total_vaccinations,people_vaccinated,people_fully_vaccinated,daily_vaccinations_raw,daily_vaccinations,total_vaccinations_per_hundred,people_vaccinated_per_hundred,people_fully_vaccinated_per_hundred,daily_vaccinations_per_million,vaccines,source_name,source_website\n/' ./validation.csv
sed -i '1s/^/country,iso_code,date,total_vaccinations,people_vaccinated,people_fully_vaccinated,daily_vaccinations_raw,daily_vaccinations,total_vaccinations_per_hundred,people_vaccinated_per_hundred,people_fully_vaccinated_per_hundred,daily_vaccinations_per_million,vaccines,source_name,source_website\n/' ./train.csv