How to Keep Leading Zeros in Excel, and Repair FIPS Codes

preview_player
Показать описание
FIPS codes are mega handy unique IDs for places. They look like numbers but they aren't, so when Microsoft Excel gets ahold of them, it trims off the leading zeros and creates havoc for data wrangling/joining/merging.
Here's how you can force Excel to format FIPS codes as text, how to keep the leading zeros, and how to string FIPS codes together into a unique "GeoID."

Check out some other social channels where I share how-to's and updates on random map adventures:

Рекомендации по теме
Комментарии
Автор

In most spreadsheet programs (Excel, LibreOffice Calc), you can actually specify "TEXT" for a column when you're importing the CSV—no extra fields required!

The trick, though, is that you generally have to trigger the CSV import screen, which doesn't come up for all programs/versions when you just double-click a CSV. For some of them, you'll have to open the program first, go to wherever your "Insert File" buttons are, and hit the one for CSVs.

altasilvapuer
Автор

Gorgeous! Excel’s automatic conversion of format could be disastrous when the numerical id is super long (e.g. Tweet ID): it would automatically display the rounded values, and once you hit SAVE, the raw values will be overwritten, thus lost! (I usually add a “+” at the end to prevent this auto-conversion lol)

atlaskwok