The file has been split by location (one file for each geographical region).
You will need to remove the date from each file, except the first one.
Use the "cut" command to split the files and remove the date.
Use the "paste" command to recombine all the files in one.
Use the following commands:
$ mv ny-state-avg.csv ny-state.csv
$ cut -d "," -f 2 albany-avg.csv > albany.csv
$ cut -d "," -f 2 batavia-avg.csv > batavia.csv
$ cut -d "," -f 2 binghamton-avg.csv > binghamton.csv
$ cut -d "," -f 2 buffalo-avg.csv > buffalo.csv
$ cut -d "," -f 2 dutchess-avg.csv > dutchess.csv
$ cut -d "," -f 2 elmira-avg.csv > elmira.csv
$ cut -d "," -f 2 glens-falls-avg.csv > glens-falls.csv
$ cut -d "," -f 2 ithaca-avg.csv > ithaca.csv
$ cut -d "," -f 2 kingston-avg.csv > kingston.csv
$ cut -d "," -f 2 nassau-avg.csv > nassau.csv
$ cut -d "," -f 2 ny-city-avg.csv > ny-city.csv
$ cut -d "," -f 2 rochester-avg.csv > rochester.csv
$ cut -d "," -f 2 syracuse-avg.csv > syracuse.csv
$ cut -d "," -f 2 utica-avg.csv > utica.csv
$ cut -d "," -f 2 watertown-avg.csv > watertown.csv
$ cut -d "," -f 2 white-plains-avg.csv > white-plains.csv
$ rm -f *-avg.csv
$ paste -d "," ny-state.csv albany.csv batavia.csv binghamton.csv buffalo.csv dutchess.csv elmira.csv glens-falls.csv ithaca.csv kingston.csv nassau.csv ny-city.csv rochester.csv syracuse.csv utica.csv watertown.csv white-plains.csv > data
$ rm -f *.csv
$ mv data data.csv
There is a way to optimize the code block to not have to cut each CSV file one-by-one, by using a "for" loop to process all files:
$ for csvfile in $(ls *-avg.csv) ; do cut -d "," -f 2 $csvfile > $(echo $csvfile | sed s/-avg//) ; done