Using gsod data for weather, working on importing

This commit is contained in:
Dan Buch 2012-07-18 22:12:16 -04:00
parent 1593c21031
commit 65d5bae610
3 changed files with 26 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/postgresql/tutorial/weather/data/

View File

@ -0,0 +1,25 @@
#!/bin/bash
FTP_BASE='ftp://ftp.ncdc.noaa.gov/pub/data/gsod'
pushd $(dirname $(readlink -f $0))
pushd ./data
if [[ ! -f ish-history.csv ]]
then
curl -O $FTP_BASE/ish-history.csv
fi
for year in 1950 1960 1970 1980 1990 2000 2010
do
tarname=gsod_$year.tar
if [[ ! -f $tarname ]]
then
curl -O $FTP_BASE/$year/$tarname
fi
tar xf $tarname
for gzfile in *-$year.op.gz
do
:
done
done