fivethirtyeight / data

Data and code behind the articles and graphics at FiveThirtyEight
https://data.fivethirtyeight.com/
Creative Commons Attribution 4.0 International
16.7k stars 10.96k forks source link

Convert all files with CR line endings to the more common LF endings #287

Closed jimhester closed 2 years ago

jimhester commented 2 years ago

These files use only Carriage Return line endings, which have not been broadly used in an operating system since 'classic' macOS, which had end of life in 2001.

Unfortunately Microsoft Excel on macOS still exports CSV with this style of line ending even in 2021.

This converts the files to use the more common unix style Line Feed line endings.

jimhester commented 2 years ago

Fixes #284

jimhester commented 2 years ago

For reference I made this change with the following commands

find . -name '*.csv' -exec file '{}' \; | grep 'CR line terminators' | cut -d ':' -f1 | xargs mac2unix
jimhester commented 2 years ago

I just realized this was already addressed in https://github.com/fivethirtyeight/data/pull/285