Thanks for the excellent package!
With the spreadsheet TRACT_ZIP_092019.xlsx, readxl guesses columns 3-6 are dates, but they should be numeric:
read_excel("TRACT_ZIP_092019.xlsx")
# A tibble: 170,193 x 6
tract zip res_ratio bus_ratio oth_ratio
<chr> <chr> <dttm> <dttm> <dttm>
1 0100… 36067 1900-01-01 00:00:00 1900-01-01 00:00:00 1900-01-01 00:00:00
2 0100… 36067 1900-01-01 00:00:00 1900-01-01 00:00:00 1900-01-01 00:00:00
3 0100… 36067 1900-01-01 00:00:00 1900-01-01 00:00:00 1900-01-01 00:00:00
4 0100… 36067 1899-12-31 00:36:16 1899-12-31 13:58:28 1899-12-31 06:00:00
5 0100… 36066 1899-12-31 23:23:43 1899-12-31 10:01:31 1899-12-31 18:00:00
6 0100… 36068 1899-12-31 04:44:07 1899-12-31 10:58:22 1899-12-31 00:10:21
7 0100… 36067 1899-12-31 00:01:17 1899-12-31 00:27:00 1899-12-31 00:00:00
8 0100… 36066 1899-12-31 19:14:34 1899-12-31 12:34:36 1899-12-31 23:49:38
9 0100… 36067 1900-01-01 00:00:00 1900-01-01 00:00:00 1900-01-01 00:00:00
10 0100… 36067 1900-01-01 00:00:00 1900-01-01 00:00:00 1900-01-01 00:00:00
# … with 170,183 more rows, and 1 more variable: tot_ratio <dttm>
The following command produces the desired output
read_excel("TRACT_ZIP_092019.xlsx", col_types = c("text", "text", "numeric", "numeric", "numeric", "numeric"))
By the way, why does the latter take longer to execute even though I'm specifying the column types?
Spreadsheet source: https://www.huduser.gov/portal/datasets/usps_crosswalk.html#data
Thanks for the excellent package!
With the spreadsheet TRACT_ZIP_092019.xlsx, readxl guesses columns 3-6 are dates, but they should be numeric:
The following command produces the desired output
By the way, why does the latter take longer to execute even though I'm specifying the column types?
Spreadsheet source: https://www.huduser.gov/portal/datasets/usps_crosswalk.html#data