0

Apologies for a general question but I need some help strategizing about how to include a fairly large amount of data in an article document.

Basically I have several 35x35 matrices that I need to include in a document.

using:

\begin{sidewaystable}
\tiny
\csvautotabular{actual_flows.csv}
\end{sidewaystable}

I've gotten about 20 columns onto a single page but it doesn't seem like I'm going to be able to get the rest of the table onto the page.

Is there a way I can use csvautotabular and start compressing whitespace in the table or does that require using \csvreader{} instead?

Is really the only solution to split the table across two pages?

Are there general style guidelines for this type of thing?

here's the output from calc2latex in case that's helpful

\begin{table}[htbp]
\caption{Actual Flows between boroughs}
\begin{tabular} 
{|r|l|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|}
\hline
\multicolumn{1}{|l|}{} & Borough & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 & 27 & 28 & 29 & 30 & 31 & 32 & 33 & 34 \\ \hline
1 & Barking & 0 & 194 & 96 & 178 & 66 & 1500 & 3641 & 104 & 188 & 410 & 209 & 980 & 255 & 301 & 55 & 6415 & 97 & 91 & 1385 & 439 & 18 & 449 & 132 & 67 & 4460 & 5940 & 28 & 926 & 38 & 4069 & 1047 & 165 & 3280 & 37223 \\ \hline
2 & Barnet & 96 & 0 & 34 & 5467 & 76 & 12080 & 7709 & 148 & 1573 & 4098 & 101 & 1576 & 1431 & 3842 & 2623 & 131 & 1023 & 611 & 5775 & 1841 & 68 & 1129 & 124 & 146 & 387 & 305 & 229 & 1792 & 44 & 2511 & 555 & 536 & 16330 & 74391 \\ \hline
3 & Bexley & 362 & 132 & 0 & 144 & 4998 & 2470 & 6580 & 710 & 188 & 123 & 9498 & 698 & 333 & 110 & 29 & 394 & 109 & 161 & 1557 & 603 & 77 & 1808 & 2989 & 190 & 574 & 111 & 90 & 4666 & 170 & 2825 & 222 & 618 & 7692 & 51231 \\ \hline
4 & Brent & 40 & 6124 & 28 & 0 & 66 & 8105 & 4145 & 187 & 6703 & 426 & 124 & 809 & 3709 & 730 & 5102 & 51 & 2127 & 1404 & 2535 & 3926 & 116 & 1107 & 147 & 203 & 279 & 116 & 396 & 1565 & 56 & 1655 & 210 & 669 & 16418 & 69278 \\ \hline
5 & Bromley & 134 & 162 & 3199 & 201 & 0 & 3780 & 9855 & 6268 & 293 & 84 & 2586 & 728 & 859 & 134 & 59 & 119 & 248 & 285 & 2094 & 1241 & 227 & 3570 & 5360 & 647 & 419 & 100 & 191 & 6057 & 796 & 3385 & 196 & 1371 & 12802 & 67450 \\ \hline
6 & Camden & 36 & 1496 & 32 & 1350 & 60 & 0 & 8795 & 147 & 643 & 295 & 140 & 1201 & 1870 & 666 & 330 & 43 & 473 & 473 & 4987 & 2267 & 89 & 1338 & 140 & 139 & 290 & 84 & 195 & 1784 & 54 & 2614 & 204 & 588 & 18829 & 51652 \\ \hline
7 & City & 6 & 14 & 0 & 16 & 0 & 335 & 0 & 3 & 9 & 6 & 3 & 66 & 61 & 16 & 7 & 9 & 10 & 9 & 339 & 62 & 0 & 42 & 15 & 6 & 16 & 0 & 6 & 103 & 3 & 266 & 16 & 16 & 602 & 2062 \\ \hline
8 & Croydon & 85 & 204 & 300 & 329 & 5152 & 3248 & 5925 & 0 & 405 & 120 & 523 & 599 & 1284 & 177 & 97 & 82 & 457 & 581 & 1752 & 1478 & 827 & 6844 & 1563 & 3521 & 202 & 64 & 480 & 4513 & 6744 & 2000 & 130 & 4270 & 10583 & 64539 \\ \hline
9 & Ealing & 30 & 967 & 33 & 5263 & 91 & 4547 & 4855 & 182 & 0 & 223 & 136 & 522 & 8579 & 267 & 2601 & 48 & 13055 & 9869 & 1795 & 4111 & 364 & 1031 & 174 & 361 & 229 & 79 & 1578 & 1328 & 65 & 1420 & 127 & 944 & 13967 & 78841 \\ \hline
10 & Enfield & 217 & 5642 & 52 & 1038 & 76 & 5588 & 5212 & 136 & 626 & 0 & 126 & 2542 & 850 & 10199 & 328 & 233 & 457 & 339 & 5317 & 1091 & 38 & 806 & 114 & 114 & 661 & 538 & 98 & 1253 & 47 & 2141 & 1710 & 314 & 9052 & 56955 \\ \hline
11 & Greenwich & 333 & 181 & 5046 & 252 & 3196 & 3038 & 5614 & 692 & 248 & 192 & 0 & 856 & 607 & 178 & 45 & 147 & 154 & 233 & 1780 & 929 & 58 & 2292 & 5571 & 237 & 981 & 126 & 113 & 5145 & 134 & 3643 & 244 & 940 & 8847 & 52052 \\ \hline
12 & Hackney & 222 & 687 & 56 & 514 & 90 & 7137 & 5181 & 128 & 450 & 877 & 241 & 0 & 1165 & 2335 & 92 & 124 & 203 & 283 & 7740 & 1261 & 61 & 1269 & 240 & 121 & 1069 & 402 & 149 & 2023 & 58 & 5247 & 1101 & 567 & 9983 & 51076 \\ \hline
13 & Fulham & 25 & 259 & 19 & 812 & 56 & 4009 & 7967 & 202 & 2418 & 82 & 63 & 586 & 0 & 137 & 163 & 33 & 1090 & 2097 & 1795 & 7072 & 271 & 1153 & 122 & 466 & 123 & 33 & 854 & 1374 & 113 & 1947 & 66 & 1908 & 15305 & 52620 \\ \hline
14 & Haringey & 144 & 3016 & 32 & 1074 & 64 & 10506 & 5523 & 213 & 668 & 4249 & 154 & 3130 & 1486 & 0 & 268 & 99 & 330 & 450 & 7948 & 1889 & 67 & 1236 & 178 & 136 & 520 & 278 & 180 & 1857 & 48 & 2350 & 1004 & 507 & 13479 & 63083 \\ \hline
15 & Harrow & 55 & 5008 & 26 & 9473 & 47 & 3675 & 3162 & 103 & 4542 & 325 & 62 & 430 & 1487 & 331 & 0 & 29 & 6169 & 1141 & 1395 & 1160 & 107 & 501 & 71 & 119 & 99 & 44 & 246 & 854 & 34 & 1013 & 95 & 300 & 7882 & 49985 \\ \hline
16 & Havering & 7278 & 194 & 325 & 156 & 157 & 2001 & 8348 & 131 & 165 & 546 & 260 & 1302 & 260 & 335 & 69 & 0 & 116 & 83 & 1932 & 358 & 33 & 552 & 137 & 85 & 3410 & 4844 & 45 & 1389 & 50 & 5030 & 1173 & 158 & 4699 & 45621 \\ \hline
17 & Hillingdon & 31 & 692 & 18 & 2672 & 55 & 1757 & 1661 & 116 & 8185 & 153 & 49 & 205 & 1799 & 110 & 4688 & 21 & 0 & 5293 & 664 & 925 & 150 & 401 & 79 & 167 & 83 & 35 & 548 & 511 & 58 & 565 & 53 & 248 & 5062 & 37054 \\ \hline
18 & Hounslow & 19 & 253 & 27 & 807 & 69 & 1753 & 2342 & 215 & 5488 & 92 & 106 & 250 & 3587 & 87 & 396 & 28 & 12803 & 0 & 752 & 1800 & 1006 & 692 & 128 & 303 & 100 & 31 & 7025 & 657 & 101 & 753 & 41 & 765 & 5927 & 48403 \\ \hline
19 & Islington & 110 & 1001 & 46 & 538 & 46 & 10188 & 7931 & 157 & 479 & 619 & 138 & 2758 & 1473 & 1869 & 111 & 55 & 265 & 334 & 0 & 1672 & 50 & 1191 & 152 & 131 & 348 & 117 & 118 & 1883 & 56 & 2837 & 393 & 490 & 12835 & 50391 \\ \hline
20 & K and C & 22 & 232 & 20 & 548 & 64 & 3554 & 10098 & 165 & 861 & 48 & 54 & 445 & 3679 & 123 & 106 & 18 & 576 & 788 & 1816 & 0 & 112 & 1029 & 78 & 208 & 68 & 30 & 300 & 1168 & 67 & 2957 & 68 & 1085 & 15947 & 46334 \\ \hline
21 & Kingston & 9 & 104 & 35 & 184 & 72 & 1547 & 2875 & 638 & 469 & 42 & 58 & 176 & 1327 & 32 & 68 & 24 & 1070 & 1484 & 710 & 847 & 0 & 1028 & 70 & 3041 & 71 & 31 & 3788 & 1038 & 1190 & 825 & 20 & 2395 & 5419 & 30687 \\ \hline
22 & Lambeth & 64 & 406 & 136 & 477 & 826 & 8090 & 9697 & 3143 & 667 & 150 & 595 & 1469 & 3376 & 373 & 89 & 49 & 466 & 898 & 4149 & 4368 & 527 & 0 & 1344 & 1830 & 380 & 123 & 855 & 8267 & 803 & 3414 & 185 & 8028 & 24349 & 89593 \\ \hline
23 & Lewisham & 164 & 271 & 1170 & 332 & 6677 & 4963 & 7251 & 2457 & 457 & 133 & 4555 & 1231 & 1114 & 277 & 83 & 93 & 238 & 365 & 2669 & 1791 & 181 & 5685 & 0 & 583 & 657 & 141 & 259 & 11118 & 406 & 3949 & 236 & 1901 & 13727 & 75134 \\ \hline
24 & Merton & 34 & 181 & 56 & 251 & 316 & 2952 & 6051 & 3193 & 554 & 49 & 176 & 454 & 2310 & 143 & 68 & 20 & 532 & 848 & 1411 & 2223 & 3516 & 3383 & 250 & 0 & 157 & 31 & 1334 & 2282 & 3743 & 1704 & 81 & 8410 & 10148 & 56861 \\ \hline
25 & Newham & 2702 & 401 & 147 & 513 & 207 & 3855 & 5009 & 190 & 431 & 584 & 735 & 2397 & 741 & 675 & 57 & 934 & 207 & 283 & 2709 & 1497 & 86 & 1154 & 386 & 139 & 0 & 2969 & 126 & 2089 & 56 & 9120 & 2161 & 534 & 8565 & 51659 \\ \hline
26 & Redbridge & 4664 & 567 & 141 & 386 & 132 & 3790 & 8205 & 173 & 343 & 1187 & 330 & 2338 & 581 & 906 & 110 & 3004 & 212 & 231 & 3104 & 746 & 46 & 853 & 188 & 100 & 6031 & 0 & 88 & 1760 & 48 & 6916 & 5441 & 262 & 8122 & 61005 \\ \hline
27 & Richmond & 15 & 173 & 12 & 342 & 64 & 2504 & 4831 & 323 & 1469 & 41 & 64 & 276 & 3181 & 53 & 167 & 20 & 3365 & 6873 & 1002 & 1745 & 3549 & 1216 & 84 & 840 & 65 & 12 & 0 & 1213 & 260 & 1197 & 46 & 1991 & 8336 & 45329 \\ \hline
28 & Southwark & 108 & 319 & 281 & 428 & 933 & 6003 & 9041 & 1213 & 536 & 135 & 1138 & 1401 & 1682 & 271 & 123 & 74 & 312 & 466 & 3203 & 2552 & 273 & 8500 & 3163 & 566 & 580 & 161 & 313 & 0 & 261 & 4243 & 251 & 2545 & 16500 & 67575 \\ \hline
29 & Sutton & 33 & 81 & 68 & 138 & 514 & 1450 & 2560 & 7602 & 309 & 45 & 101 & 230 & 851 & 51 & 50 & 23 & 385 & 541 & 681 & 882 & 3122 & 1827 & 270 & 6725 & 95 & 26 & 750 & 1404 & 0 & 872 & 41 & 3217 & 4691 & 39635 \\ \hline
30 & Tower Hamlets & 370 & 257 & 140 & 192 & 192 & 4080 & 10104 & 183 & 291 & 224 & 275 & 2668 & 935 & 326 & 56 & 304 & 146 & 245 & 3235 & 1249 & 58 & 1090 & 316 & 124 & 1845 & 407 & 151 & 2182 & 55 & 0 & 562 & 405 & 9304 & 41971 \\ \hline
31 & Waltham Forest & 846 & 715 & 79 & 491 & 149 & 5554 & 6337 & 253 & 440 & 2661 & 337 & 3957 & 832 & 2467 & 112 & 594 & 206 & 271 & 4310 & 1378 & 50 & 1059 & 228 & 122 & 3257 & 3736 & 101 & 1719 & 41 & 4789 & 0 & 409 & 10314 & 57814 \\ \hline
32 & Wandsworth & 34 & 297 & 69 & 422 & 324 & 7140 & 13935 & 1496 & 970 & 116 & 256 & 1044 & 6232 & 225 & 129 & 31 & 853 & 1690 & 3404 & 6208 & 1806 & 5951 & 403 & 4329 & 208 & 59 & 2338 & 4092 & 992 & 4024 & 135 & 0 & 24409 & 93621 \\ \hline
33 & Westminster & 25 & 514 & 17 & 1229 & 99 & 6786 & 9521 & 216 & 925 & 121 & 93 & 745 & 2369 & 228 & 142 & 26 & 597 & 572 & 2442 & 4767 & 90 & 1381 & 148 & 178 & 170 & 60 & 258 & 1663 & 61 & 2851 & 121 & 873 & 0 & 39288 \\ \hline
34 & (all) & 18313 & 30744 & 11740 & 36217 & 24934 & 147985 & 209961 & 31087 & 41993 & 18456 & 23286 & 38069 & 60305 & 27974 & 18423 & 13275 & 48351 & 39292 & 
86387 & 64378 & 17043 & 61567 & 24364 & 25944 & 27834 & 21033 & 23230 & 79675 & 
16652 & 93132 & 17935 & 47429 & 353405 & 1800413 \\ \hline
\end{tabular}
\label{Actual Flows}
\end{table}

and here's the document info:

\documentclass[11pt]{article} % use larger type; default would be 10pt

\usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)
\usepackage[backend=biber, style=authoryear]{biblatex}
\addbibresource{bibliography.bib}


\usepackage{geometry} % to change the page dimensions
\geometry{a4paper} % or letterpaper (US) or a5paper or....

\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent

\usepackage{rotating}
\usepackage{booktabs} % for much better looking tables
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float
\usepackage{graphicx}
\usepackage{csvsimple}

\title{Title}

\begin{document}

\end{document}
  • Could you please make your code compilable by adding the documentclass and the relevant packages? How much of the table can fit onto a page depends on the documentclass and the margin settings. Would rotating the table be an option for you? – leandriis Apr 21 '19 at 21:56
  • In order to remove some of th e horizontal white space, you could use something like \setlength{\tabcolsep}{2pt} or any other length smaller than the default of 6pt. In order to save some more horizontal space you could also remove the second column and add the information in a legend below the table. – leandriis Apr 21 '19 at 22:01
  • thanks I'll explore both of those. Added document settings to question. – Hugh_Kelley Apr 21 '19 at 22:12
  • 1
    Having had a closer look at your table, I am quite sure that you will not be able to fit the whole table onto a single page. Removing horizontal white space in combination with a very small font size and smaller margins will still not allow the table to fit. I would therefore recommend to split it onto two or even three portait pages. – leandriis Apr 22 '19 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.