-
Notifications
You must be signed in to change notification settings - Fork 0
/
housing-report-tufte2.rnw
2586 lines (2372 loc) · 95.5 KB
/
housing-report-tufte2.rnw
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[nohyper,justified,section]{tufte-book}
%\documentclass[nohyper,justified,nols]{tufte-book}
%
% Xelatex or Luatex
%
%\usepackage{xltxtra,fontspec,xunicode}
\usepackage{luacode,fontspec,xunicode}
\usepackage{sectsty} %% change fonts for sections
%\setmainfont{Source Sans Pro Light}
\setmainfont[
BoldFont={Source Sans Pro},
ItalicFont={Source Sans Pro Light Italic},
BoldItalicFont={Source Sans Pro Italic}
]{Source Sans Pro Light}
%\setmainfont[
% BoldFont={Source Sans Pro Light},
% ItalicFont={Source Sans Pro ExtraLight Italic},
% BoldItalicFont={Source Sans Pro Light Italic}
% ]{Source Sans Pro ExtraLight}
%Specify fonts
%\fontspec
%[ BoldFont = SourceSansPro-Regular.otf ,
%ItalicFont = SourceSansPro-LightIt.otf ,
%BoldItalicFont = SourceSansPro-It.otf ]
%{SourceSansPro-Light.otf}
%\fontspec
%[ Extension = .otf ,
%BoldFont = SourceSansPro-Regular ,
%ItalicFont = SourceSansPro-LightIt ]
%{SourceSansPro-Light}
%\fontspec
%[ Path = /home/zephyr/Dropbox/latex-typesetting/graduate-housing-survey-tufte/fonts/otf/ ,
%UprightFont = *-Regular ,
%BoldFont = *-Bold ,
%... ]
%{SourceSansPro}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning,matrix}
%\hypersetup{colorlinks}% uncomment this line if you prefer colored hyperlinks (e.g., for onscreen viewing)
% helps floats stay within their sections
%\usepackage[section]{placeins}
%
% Temporary, shows float boundaries
%
%\usepackage{float}
%\floatstyle{boxed}
%\restylefloat{figure}
% Creative commons icons
\usepackage[scale=3.0]{ccicons} % This packages allows you to include the creative commons license logos.
%%
% Book metadata
\title{Texas Tech University\\Graduate Student\\Housing Report\\2013\thanks{Thanks to Dr. Peggy Miller for her inspiration.}}
\author[Kimberly Elmore and Jacek Jonca-Jasinski]{Kimberly Elmore, Jacek Jonca-Jasinski, and\\ the Graduate Student Advisory Council}
\publisher{Texas Tech University Graduate Student Advisory Council}
%Not queste sure why, it should help with text layout
%\usepackage{microtype}
%%
% For nicely typeset tabular material
\usepackage{booktabs}
%%
% For graphics / images
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{graphics/}}
% calculate tight bounding boxes
\usepackage[bbox,pdftopdf]{epspdfconversion}
%\usepackage{epstopdf}
%\epstopdfsetup{pdftopdf=true}
%\epstopdfDeclareGraphicsRule{.pdf}{pdf}{.pdf}{%
%/usr/local/texlive/2012/bin/x86_64-linux/epspdf --bbox #1 \OutputFile
%}
% The fancyvrb package lets us customize the formatting of verbatim
% environments. We use a slightly smaller font.
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}
%%
% Prints argument within hanging parentheses (i.e., parentheses that take
% up no horizontal space). Useful in tabular environments.
\newcommand{\hangp}[1]{\makebox[0pt][r]{(}#1\makebox[0pt][l]{)}}
%%
% Prints an asterisk that takes up no horizontal space.
% Useful in tabular environments.
\newcommand{\hangstar}{\makebox[0pt][l]{*}}
%%
% Prints a trailing space in a smart way.
\usepackage{xspace}
% Prints the month name (e.g., January) and the year (e.g., 2008)
\newcommand{\monthyear}{%
\ifcase\month\or January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or
December\fi\space\number\year
}
% Prints an epigraph and speaker in sans serif, all-caps type.
\newcommand{\openepigraph}[2]{%
%\sffamily\fontsize{14}{16}\selectfont
\begin{fullwidth}
\sffamily\large
\begin{doublespace}
\noindent\allcaps{#1}\\% epigraph
\noindent\allcaps{#2}% author
\end{doublespace}
\end{fullwidth}
}
% Inserts a blank page
\newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
\usepackage{units}
% Typesets the font size, leading, and measure in the form of 10/12x26 pc.
\newcommand{\measure}[3]{#1/#2$\times$\unit[#3]{pc}}
% Macros for typesetting the documentation
\newcommand{\hlred}[1]{\textcolor{Maroon}{#1}}% prints in red
\newcommand{\hangleft}[1]{\makebox[0pt][r]{#1}}
\newcommand{\hairsp}{\hspace{1pt}}% hair space
\newcommand{\hquad}{\hskip0.5em\relax}% half quad space
\newcommand{\TODO}{\textcolor{red}{\bf TODO!}\xspace}
\newcommand{\ie}{\textit{i.\hairsp{}e.}\xspace}
\newcommand{\eg}{\textit{e.\hairsp{}g.}\xspace}
\newcommand{\na}{\quad--}% used in tables for N/A cells
\providecommand{\XeLaTeX}{X\lower.5ex\hbox{\kern-0.15em\reflectbox{E}}\kern-0.1em\LaTeX}
\newcommand{\tXeLaTeX}{\XeLaTeX\index{XeLaTeX@\protect\XeLaTeX}}
% \index{\texttt{\textbackslash xyz}@\hangleft{\texttt{\textbackslash}}\texttt{xyz}}
\newcommand{\tuftebs}{\symbol{'134}}% a backslash in tt type in OT1/T1
\newcommand{\doccmdnoindex}[2][]{\texttt{\tuftebs#2}}% command name -- adds backslash automatically (and doesn't add cmd to the index)
\newcommand{\doccmddef}[2][]{%
\hlred{\texttt{\tuftebs#2}}\label{cmd:#2}%
\ifthenelse{\isempty{#1}}%
{% add the command to the index
\index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2}}% command name
}%
{% add the command and package to the index
\index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2} (\texttt{#1} package)}% command name
\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% package name
}%
}% command name -- adds backslash automatically
\newcommand{\doccmd}[2][]{%
\texttt{\tuftebs#2}%
\ifthenelse{\isempty{#1}}%
{% add the command to the index
\index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2}}% command name
}%
{% add the command and package to the index
\index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2} (\texttt{#1} package)}% command name
\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% package name
}%
}% command name -- adds backslash automatically
\newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument
\newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument
\newenvironment{docspec}{\begin{quotation}\ttfamily\parskip0pt\parindent0pt\ignorespaces}{\end{quotation}}% command specification environment
\newcommand{\docenv}[1]{\texttt{#1}\index{#1 environment@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
\newcommand{\docenvdef}[1]{\hlred{\texttt{#1}}\label{env:#1}\index{#1 environment@\texttt{#1} environment}\index{environments!#1@\texttt{#1}}}% environment name
\newcommand{\docpkg}[1]{\texttt{#1}\index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}}% package name
\newcommand{\doccls}[1]{\texttt{#1}}% document class name
\newcommand{\docclsopt}[1]{\texttt{#1}\index{#1 class option@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name
\newcommand{\docclsoptdef}[1]{\hlred{\texttt{#1}}\label{clsopt:#1}\index{#1 class option@\texttt{#1} class option}\index{class options!#1@\texttt{#1}}}% document class option name defined
\newcommand{\docmsg}[2]{\bigskip\begin{fullwidth}\noindent\ttfamily#1\end{fullwidth}\medskip\par\noindent#2}
\newcommand{\docfilehook}[2]{\texttt{#1}\index{file hooks!#2}\index{#1@\texttt{#1}}}
\newcommand{\doccounter}[1]{\texttt{#1}\index{#1 counter@\texttt{#1} counter}}
% Patch for the sols problem if not using nols
\renewcommand{\allcapsspacing}[1]{{\addfontfeature{LetterSpace=20.0}#1}}
\renewcommand{\smallcapsspacing}[1]{{\addfontfeature{LetterSpace=5.0}#1}}
\renewcommand{\textsc}[1]{\smallcapsspacing{\textsmallcaps{#1}}}
\renewcommand{\smallcaps}[1]{\smallcapsspacing{\scshape\MakeTextLowercase{#1}}}
% Generates the index
\usepackage{makeidx}
\makeindex
%helps fit more stuff on a page
%\renewcommand\floatpagefraction{.9}
%\renewcommand\topfraction{.9}
%\renewcommand\bottomfraction{.9}
%\renewcommand\textfraction{.1}
%\setcounter{totalnumber}{50}
%\setcounter{topnumber}{50}
%\setcounter{bottomnumber}{50}
\begin{document}
\pagenumbering{gobble}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt}
% Front matter
\frontmatter
% r.1 blank page
\blankpage
% v.2 epigraphs
\newpage\thispagestyle{empty}
\addcontentsline{toc}{chapter}{Executive Summary}
{\huge Executive Summary}
%\epspdfconversioncmdline
\paragraph{%
Need for Graduate Student Housing.} Graduate students believe that a graduate dorm is needed on our campus but only if done right. Graduate students are still on the fence with regard to whether they would actually choose to live in the graduate student dorm and the decisive factors are cost and the dormitory population.
%\vfill
\paragraph{%
Cost.} Majority of respondents expect a graduate student dorm to offer accommodations with a lower price tag than off-campus locations. Most of the respondents currently pay between \$400 and \$800 a month in combined rent and utilities with the largest group falling between \$400 and \$600. Respondents report to currently live in 1-3 bedroom apartments and single family houses and if moving to a graduate dorm would be most interested in single-bedroom apartments, with efficiency and 2 bedroom shared units being a second choice.
%\vfill
\paragraph{%
Dormitory Population.} Many respondents indicated that they would not choose to live in a combined graduate and undergraduate housing but have no qualms about living in the vicinity of an undergraduate dorm.
%\vfill
\paragraph{%
Amenities.} Respondents found amenities such as modern appliances, minimal grocery/convenience store, and an optional dining plan a plus.
\paragraph{%
Recommendations.} This is a placeholder for the summary of the recommendations.
% r.3 full title page
\maketitle
% v.4 copyright page
\newpage
\begin{fullwidth}
~\vfill
\thispagestyle{empty}
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
\par Some rights reserved under the Creative Commons Attribution-Share Alike 3.0 Unported license.
\par \ccbysa
\par (cc) \the\year\ Texas Tech University Graduate Student Advisory Council
\par Published by the Texas Tech University Graduate Student Advisory Council
\par\textit{First printing, \monthyear}
\end{fullwidth}
% r.5 contents
\tableofcontents
\listoffigures
\listoftables
% r.7 dedication
\cleardoublepage
~\vfill
\begin{doublespace}
\noindent\fontsize{18}{22}\selectfont\itshape
\nohyphenation
Dedicated to those who appreciate \LaTeX{}
and the work of \mbox{Edward R.~Tufte}
and \mbox{Donald E.~Knuth}.
\end{doublespace}
\vfill
\vfill
% r.9 introduction
\cleardoublepage
%### KNIT R SETTINGS ###
<<include=FALSE>>=
opts_chunk$set(concordance=TRUE)#,dev='tikz')
@
%<<MainSettings,echo=FALSE,cache=FALSE>>=
%require("knitr")
%setwd("/home/zephyr/Dropbox/latex-typesetting/graduate-housing-survey")
%#opts_knit$set(progress = FALSE, verbose = FALSE) # works better with Kile
%opts_chunk$set(
% concordance=TRUE,
% cache=FALSE,
% tidy=TRUE,
% echo=FALSE,
% message=FALSE,
% dev="pdf",
% fig.path="plots/plot", # puts all figures in a folder in the current directory called "graphics." If you use this, you need to create the graphics folder first. It also starts each figure's filename with "plot"
% fig.lp = "", # defines prefix for figure labels
%# out.width=".8\\textwidth",
%# fig.keep="high",
%# fig.show="hold",
%# fig.align="center",
% dpi="200",
% comment=NA) # Suppresses "##" in R output. The "##" is useful if you want people to be able to copy and paste your code in the output file, though.
%@
%<<eval=TRUE,echo=FALSE,results='hide',warning=FALSE,message=FALSE,error=FALSE>>=
\chapter{Introduction}
{\huge The WITCH}
\par This report is the first is a series addressing the \textbf{WITCH}: (\textbf{W})aivers, (\textbf{I})nsurance, (\textbf{T})ransportation, (\textbf{C})hildcare, and (\textbf{H})ousing -- the "BIG 5" recurring challenges faced by graduate students at Texas Tech University.
\par While most of the WITCHes are not new to this campus they are hard to tackle. The goal of this report series is to research the WITCHES and present recommendations for driving them out of Texas Tech University for good and for the good of all of us!
\par Proposed recommendations to the 5 challenges need to meet two essential criteria:
\begin{enumerate}[I]%for capital roman numbers.
%\begin{enumerate}
\item First, they will be grounded in the empirical data we collect in the form of surveys and comparisons with the peer institutions: those in the Big 12, State fo Texas, and more generally institutions demonstrating similar characteristics to Texas Tech.
\item Second, they need to be pragmatic, rational, and feasible. We all know that if we lived in an ideal world the resources at university's disposal would have been unlimited and graduate students would have had all and everything they need or want. Unfortunately, we don't live in an ideal world and the limited resources we have need to be alocated wisely and in a pragmatic and logical way.
\end{enumerate}
\paragraph{%
Waivers, Tuition, and Assistantships.} Here is a placeholder for a quick discussion of recent
issues with Waivers, cost of tuition, and Assistantships%
\paragraph{%
Insurance.} Health insurance struggles here %
\paragraph{%
Transportation and Parking.} Busing to appartment complexes, bus schedules at night, permits for teaching assistants %
\paragraph{%
Childcare.} On-campus or in the proximity.
\paragraph{%
Housing.} On campus graduate student housing.
\chapter{Method and Sample Characteristics}
\section{Background}
\par On December 3, 2012, the Graduate Student Advisory Council sent 4769 e-mail invitations to participate in the online Graduate Student Housing survey. Specifically, invitations were sent to all graduate students enrolled on the Lubbock campus. This report presents results of this survey accompanied by recommendations for development of graduate student campus housing on Texas Tech University campus. The Graduate Student Housing Report is organized into four parts:
\par (1) Method and Sample Characteristics
\par (2) Current Graduate Student Housing Characteristics
\par (3) Graduate Student Housing Expectations
\par (4) Summary of Survey Results and Recommendations
\par The section that follows discusses methodology of this survey and describes characteristics of the sample of graduate students who participated in this survey. The next part of this survey is describes present housing arrangements of graduate students. Graduate Student Housing Expectations part reports housing preferences expressed by graduate students and the Recommendations part concluding this report summarizes survey results and provides suggestions for development of the graduate student housing on Texas Tech campus.
\section{Method}
\par We received responses from 5 percent of our sample within one hour of opening the survey, with 18.2 percent responding by the survey's close on December 13, 2012.
\par The Graduate Student Housing survey consisted of 18 questions, 8 demographic and 10 opinion questions about the current housing situations of and future on-campus housing for graduate students at Texas Tech University.
\section{Sample Characteristics}
\subsection{Age and Gender}
<<hideme, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, errors=FALSE, results="hide">>=
# Load Libraries
suppressMessages(require(knitr))
suppressMessages(library(ggplot2))
suppressMessages(library(xtable))
suppressMessages(library(catspec))
suppressMessages(require(grid))
# Cleanup
#rm(object)
#rm(housingsurvey.df)
#rm(housingsurveydata12102012.anonymized)
#rm(newdata)
#rm(dat)
#rm(newtable)
#rm(Agetable)
#rm(object)
#rm(formatedagetable)
# Load data
housingsurveydata12142012.anonymized <- read.csv("/home/zephyr/Dropbox/latex-typesetting/graduate-housing-survey/data/housingsurveydata12142012-anonymized.csv")
#load("/home/zephyr/Dropbox/latex-typesetting/graduate-housing-survey/graduate-housing-data/housingsurveydata12102012.anonymized.RData")
housingsurvey.df <- data.frame(housingsurveydata12142012.anonymized)
names(housingsurvey.df) <- c("RespondentID", "Age", "Gender", "Level", "Levelother", "Fulltime", "International", "Residencetype", "Residencetypeother", "Householdsize", "Rent", "Needfordorm", "Ifavailable", "Q11efficiency", "Q111br", "Q112br", "Q113br", "Q11not", "Q11other", "Q12childcare", "Q12playground", "Q12entertainment", "Q12alcohol", "Q12cost", "Q12appliances", "Q12grocery", "Q12dining", "Q12other", "Q12openended", "Wouldyoulive", "Howmuch", "Withundergrads", "Nexttoundergrads", "Transportation", "Transportationother", "Architectsother")
# drop missing cases & misc
#newdata <- housingsurvey.df[ which(housingsurvey.df$Age!=""), ]
#newdata$Age <- droplevels(newdata$Age)
newdata <- housingsurvey.df[ which((housingsurvey.df$Gender=='Male' | housingsurvey.df$Gender=='Female') & housingsurvey.df$Age!=""), ]
newdata$Gender <- droplevels(newdata$Gender)
newdata$Age <- droplevels(newdata$Age)
# Age
Agenewdata <- housingsurvey.df[ which(housingsurvey.df$Age!=""), ]
Agenewdata$Age <- droplevels(Agenewdata$Age)
Agetable <- ctab(Agenewdata$Age)
Ageobject <- print(Agetable,addmargins=FALSE,dec.places=0)
Agedat <- as.data.frame(Ageobject)
Agenewtable <- data.frame(Agedat$Freq[1:5], Agedat$Freq[6:10])
rownames(Agenewtable) <- Agedat$Var1[1:5]
colnames(Agenewtable) <- c('Count', 'Percentage')
#formatedagetable <- xtable(newtable, digits=0)
#newdata <- housingsurvey.df[ which(housingsurvey.df$Gender!=""), ]
#newdata$Gender <- droplevels(newdata$Gender)
Gendertable <- ctab(newdata$Gender)
Genderobject <- print(Gendertable,addmargins=FALSE,dec.places=0)
Genderdat <- as.data.frame(Genderobject)
Gendernewtable <- data.frame(Genderdat$Freq[1:2], Genderdat$Freq[3:4])
rownames(Gendernewtable) <- Genderdat$Var1[1:2]
colnames(Gendernewtable) <- c('Count', 'Percentage')
@
\begin{figure}[!htb]
\caption{Distribution of age and gender of participants in our sample\newline
\scriptsize{\newline
Approximately half of the respondents fall between the ages of 26 and 35 years old with additional one-third between the ages of 21 and 25. While sample consist of more female than male respondents the distribution of age characteristics across genders is very similar.
}}
%\vspace{-100pt}
<<echo=FALSE,cache=FALSE,eval=TRUE,out.width='1.00\\linewidth',fig.align='left',warning=FALSE,message=FALSE,error=FALSE>>=
#<<mygraph, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, results="asis", out.width="\\textwidth", fig.lp="fig:", fig.cap = ''>>=
#print(formatedagetable)
#par(mar=c(0,0,0,0)) # Remove unnecessary margins
plot <- ggplot(newdata, aes(x = factor(1), fill=Age)) + geom_bar(width = 0.6) + coord_polar(theta="y") + xlab('') + ylab('Number of Respondents') + labs(fill='Response') + facet_grid(facets=. ~ Gender)
plot <- plot + theme(plot.margin = unit(c(0, 0, 0, 0), "lines"))
plot + theme(panel.margin=unit(0,"lines"),axis.ticks=theme_blank(),axis.text.y=theme_blank())
#plot + theme(plot.margin= unit(c(0, 0, 0, 0), "cm"))
rm(plot)
@
\end{figure}
%\vspace{-115pt}
%
% Other PIE polar Chart examples
% http://docs.ggplot2.org/current/coord_polar.html
%
%
% Age Table
%
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
draw=black,
align=center,
anchor=north west,
% minimum height=#1,
% text width=#1,
inner sep=8pt
},
% text depth=2.5ex,
% text height=0ex,
nodes in empty cells,
%%
every even row/.style={
nodes={fill=gray!20}
},
column 1/.style={
nodes={text width=9.5em,font=\bfseries}
},
column 2/.style={
nodes={text width=8em,font=\bfseries}
},
column 3/.style={
nodes={text width=8em,font=\bfseries}
},
row 1/.style={
nodes={
fill=black,
text=white,
font=\bfseries,
minimum height=8.3ex
}
},
row 2/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 3/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 4/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 5/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 6/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
}
}
\begin{table}[!htb]
\caption{Age of survey respondents}
%\vspace{-20pt}
\begin{tikzpicture}
\matrix (first) [table]
{
Age & Number of Respondents & Percent \%\\
\Sexpr{rownames(Agenewtable)[1]} & \Sexpr{Agenewtable[[1]][[1]]} & \Sexpr{Agenewtable[[2]][[1]]}\% \\
\Sexpr{rownames(Agenewtable)[2]} & \Sexpr{Agenewtable[[1]][[2]]} & \Sexpr{Agenewtable[[2]][[2]]}\% \\
\Sexpr{rownames(Agenewtable)[3]} & \Sexpr{Agenewtable[[1]][[3]]} & \Sexpr{Agenewtable[[2]][[3]]}\% \\
\Sexpr{rownames(Agenewtable)[4]} & \Sexpr{Agenewtable[[1]][[4]]} & \Sexpr{Agenewtable[[2]][[4]]}\% \\
\Sexpr{rownames(Agenewtable)[5]} & \Sexpr{Agenewtable[[1]][[5]]} & \Sexpr{Agenewtable[[2]][[5]]}\% \\
};
\normalsize
\end{tikzpicture}
\end{table}
\vspace{-10pt}
%
% Gender Table
%
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
draw=black,
align=center,
anchor=north west,
% minimum height=#1,
% text width=#1,
inner sep=8pt
},
% text depth=2.5ex,
% text height=0ex,
nodes in empty cells,
%%
every even row/.style={
nodes={fill=gray!20}
},
column 1/.style={
nodes={text width=9.5em,font=\bfseries}
},
column 2/.style={
nodes={text width=8em,font=\bfseries}
},
column 3/.style={
nodes={text width=8em,font=\bfseries}
},
row 1/.style={
nodes={
fill=black,
text=white,
font=\bfseries,
minimum height=8.3ex
}
},
row 2/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.6ex
}
},
row 3/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 4/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 5/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 6/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
}
}
\begin{table}[!htb]
\caption{Gender of survey respondents}
%\vspace{-20pt}
\begin{tikzpicture}
\matrix (first) [table,text width=6em]
{
Gender & Number of Respondents & Percent \% \\
\Sexpr{rownames(Gendernewtable)[1]} & \Sexpr{Gendernewtable[[1]][[1]]} & \Sexpr{Gendernewtable[[2]][[1]]}\% \\
\Sexpr{rownames(Gendernewtable)[2]} & \Sexpr{Gendernewtable[[1]][[2]]} & \Sexpr{Gendernewtable[[2]][[2]]}\% \\
};
\end{tikzpicture}
\end{table}
%\vspace{-10pt}
%
% Level of Study
%
\subsection{Level of Study}
<<hidemeLevel, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, errors=FALSE, results="hide">>=
# Level
levelnewdata <- housingsurvey.df[ which(housingsurvey.df$Level!=""), ]
levelnewdata <- droplevels(levelnewdata)
levels(levelnewdata$Level) <- c("Doctoral", "Graduate Certificate", "Graduate Non-Degree", "Masters", "Post-Graduate")
Leveltable <- ctab(levelnewdata$Level)
Levelobject <- print(Leveltable,addmargins=FALSE,dec.places=0)
Leveldat <- as.data.frame(Levelobject)
Levelnewtable <- data.frame(Leveldat$Freq[1:5], Leveldat$Freq[6:10])
rownames(Levelnewtable) <- Leveldat$Var1[1:5]
colnames(Levelnewtable) <- c('Count', 'Percentage')
#formatedleveltable <- xtable(newtable, digits=0)
#print(formatedleveltable)
@
\begin{figure}[!htb]
\caption{Level of study of participants\newline
\scriptsize{\newline
space for description}}
\vspace{-20pt}
<<echo=FALSE,cache=FALSE,eval=TRUE,out.width='1.00\\linewidth',fig.align='left',warning=FALSE,message=FALSE,error=FALSE>>=
#<<mygraphlevel, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, results="asis", fig.lp="fig:", fig.cap = ''>>=
#print(formatedagetable)
plot <- ggplot(levelnewdata, aes(x = factor(1), fill=Level)) + geom_bar(width = 0.6) + coord_polar(theta="y") + xlab('') + ylab('') + labs(fill='Response')
plot <- plot + theme(plot.margin = unit(c(0, 0, 0, 0), "lines"))
plot + theme(panel.margin=unit(0,"lines"),axis.ticks=theme_blank(),axis.text.y=theme_blank())
#plot + theme(plot.margin= unit(c(0, 0, 0, 0), "cm"))
rm(plot)
@
\end{figure}
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
draw=black,
align=center,
anchor=north west,
% minimum height=#1,
% text width=#1,
inner sep=8pt
},
% text depth=2.5ex,
% text height=0ex,
nodes in empty cells,
%%
every even row/.style={
nodes={fill=gray!20}
},
column 1/.style={
nodes={text width=9.5em,font=\bfseries}
},
column 2/.style={
nodes={text width=8em,font=\bfseries}
},
column 3/.style={
nodes={text width=8em,font=\bfseries}
},
row 1/.style={
nodes={
fill=black,
text=white,
font=\bfseries,
minimum height=8.3ex
}
},
row 2/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 3/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 4/.style={
nodes={
text=black,
font=\bfseries,
minimum height=8.3ex
}
},
row 5/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 6/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
}
}
\begin{table}[!htb]
\caption{Participants by level of study}
%\vspace{-20pt}
\begin{tikzpicture}
\matrix (first) [table]
{
Age & Number of Respondents & Percent \%\\
\Sexpr{rownames(Levelnewtable)[1]} & \Sexpr{Levelnewtable[[1]][[1]]} & \Sexpr{Levelnewtable[[2]][[1]]}\% \\
\Sexpr{rownames(Levelnewtable)[2]} & \Sexpr{Levelnewtable[[1]][[2]]} & \Sexpr{Levelnewtable[[2]][[2]]}\% \\
\Sexpr{rownames(Levelnewtable)[3]} & \Sexpr{Levelnewtable[[1]][[3]]} & \Sexpr{Levelnewtable[[2]][[3]]}\% \\
\Sexpr{rownames(Levelnewtable)[4]} & \Sexpr{Levelnewtable[[1]][[4]]} & \Sexpr{Levelnewtable[[2]][[4]]}\% \\
\Sexpr{rownames(Levelnewtable)[5]} & \Sexpr{Levelnewtable[[1]][[5]]} & \Sexpr{Levelnewtable[[2]][[5]]}\% \\
};
\normalsize
\end{tikzpicture}
\end{table}
\subsection{Enrollment Status}
<<hidemeFulltime, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, errors=FALSE, results="hide">>=
# Fulltime
newdata <- housingsurvey.df[ which(housingsurvey.df$Fulltime!=""), ]
newdata$Fulltime <- droplevels(newdata$Fulltime)
Fulltimetable <- ctab(newdata$Fulltime)
Fulltimeobject <- print(Fulltimetable,addmargins=FALSE,dec.places=0)
Fulltimedat <- as.data.frame(Fulltimeobject)
Fulltimenewtable <- data.frame(Fulltimedat$Freq[1:2], Fulltimedat$Freq[3:4])
rownames(Fulltimenewtable) <- Fulltimedat$Var1[1:2]
colnames(Fulltimenewtable) <- c('Count', 'Percentage')
@
\begin{figure}[!htb]
\caption{Enrollment status.\newline
\scriptsize{\newline
Space for description.}}
\vspace{-20pt}
<<echo=FALSE,cache=FALSE,eval=TRUE,out.width='1.00\\linewidth',fig.align='left',warning=FALSE,message=FALSE,error=FALSE>>=
#<<mygraphFulltime, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, results="asis", fig.lp="fig:", fig.cap = ''>>=
plot <- ggplot(newdata, aes(x = factor(1), fill=Fulltime)) + geom_bar(width = 0.6) + coord_polar(theta="y") + xlab('') + ylab('') + labs(fill='Response')
plot <- plot + theme(plot.margin = unit(c(0, 0, 0, 0), "lines"))
plot + theme(panel.margin=unit(0,"lines"),axis.ticks=theme_blank(),axis.text.y=theme_blank())
#plot + theme(plot.margin= unit(c(0, 0, 0, 0), "cm"))
rm(plot)
@
\end{figure}
%
% Fulltime Table
%
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
draw=black,
align=center,
anchor=north west,
% minimum height=#1,
% text width=#1,
inner sep=8pt
},
% text depth=2.5ex,
% text height=0ex,
nodes in empty cells,
%%
every even row/.style={
nodes={fill=gray!20}
},
column 1/.style={
nodes={text width=9.5em,font=\bfseries}
},
column 2/.style={
nodes={text width=8em,font=\bfseries}
},
column 3/.style={
nodes={text width=8em,font=\bfseries}
},
row 1/.style={
nodes={
fill=black,
text=white,
font=\bfseries,
minimum height=8.3ex
}
},
row 2/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 3/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 4/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 5/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 6/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
}
}
\begin{table}[!htb]
\caption{Enrollment Status}
%\vspace{-20pt}
\begin{tikzpicture}
\matrix (first) [table,text width=6em]
{
Fulltime & Number of Respondents & Percent \% \\
\Sexpr{rownames(Fulltimenewtable)[1]} & \Sexpr{Fulltimenewtable[[1]][[1]]} & \Sexpr{Fulltimenewtable[[2]][[1]]}\% \\
\Sexpr{rownames(Fulltimenewtable)[2]} & \Sexpr{Fulltimenewtable[[1]][[2]]} & \Sexpr{Fulltimenewtable[[2]][[2]]}\% \\
};
\end{tikzpicture}
\end{table}
\subsection{Origin}
<<hidemeInternational, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, errors=FALSE, results="hide">>=
# International
newdata <- housingsurvey.df[ which(housingsurvey.df$International!=""), ]
newdata$International <- droplevels(newdata$International)
Internationaltable <- ctab(newdata$International)
Internationalobject <- print(Internationaltable,addmargins=FALSE,dec.places=0)
Internationaldat <- as.data.frame(Internationalobject)
Internationalnewtable <- data.frame(Internationaldat$Freq[1:2], Internationaldat$Freq[3:4])
rownames(Internationalnewtable) <- Internationaldat$Var1[1:2]
colnames(Internationalnewtable) <- c('Count', 'Percentage')
@
\begin{figure}[!htb]
\caption{Are you an International Student?\newline
\scriptsize{\newline
Space for description.}}
\vspace{-20pt}
<<echo=FALSE,cache=FALSE,eval=TRUE,out.width='1.00\\linewidth',fig.align='left',warning=FALSE,message=FALSE,error=FALSE>>=
#<<mygraphInternational, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, results="asis", fig.lp="fig:", fig.cap = ''>>=
plot <- ggplot(newdata, aes(x = factor(1), fill=International)) + geom_bar(width = 0.6) + coord_polar(theta="y") + xlab('') + ylab('') + labs(fill='International?')
plot <- plot + theme(plot.margin = unit(c(0, 0, 0, 0), "lines"))
plot + theme(panel.margin=unit(0,"lines"),axis.ticks=theme_blank(),axis.text.y=theme_blank())
#plot + theme(plot.margin= unit(c(0, 0, 0, 0), "cm"))
rm(plot)
@
\end{figure}
%
% International Table
%
\tikzset{
table/.style={
matrix of nodes,
row sep=-\pgflinewidth,
column sep=-\pgflinewidth,
nodes={
rectangle,
draw=black,
align=center,
anchor=north west,
% minimum height=#1,
% text width=#1,
inner sep=8pt
},
% text depth=2.5ex,
% text height=0ex,
nodes in empty cells,
%%
every even row/.style={
nodes={fill=gray!20}
},
column 1/.style={
nodes={text width=9.5em,font=\bfseries}
},
column 2/.style={
nodes={text width=8em,font=\bfseries}
},
column 3/.style={
nodes={text width=8em,font=\bfseries}
},
row 1/.style={
nodes={
fill=black,
text=white,
font=\bfseries,
minimum height=8.3ex
}
},
row 2/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 3/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 4/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 5/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
row 6/.style={
nodes={
text=black,
font=\bfseries,
minimum height=5.5ex
}
},
}
}
\begin{table}[!htb]
\caption{Origin}
%\vspace{-20pt}
\begin{tikzpicture}
\matrix (first) [table,text width=6em]
{
International & Number of Respondents & Percent \% \\
\Sexpr{rownames(Internationalnewtable)[1]} & \Sexpr{Internationalnewtable[[1]][[1]]} & \Sexpr{Internationalnewtable[[2]][[1]]}\% \\
\Sexpr{rownames(Internationalnewtable)[2]} & \Sexpr{Internationalnewtable[[1]][[2]]} & \Sexpr{Internationalnewtable[[2]][[2]]}\% \\
};
\end{tikzpicture}
\end{table}
\chapter{Current Graduate Student Housing Characteristics}
\section{Type of Residence}
<<hidemeResidencetype, cache=FALSE, echo=FALSE, messages=FALSE, warnings=FALSE, errors=FALSE, results="hide">>=
# Residencetype