diff --git a/DESCRIPTION b/DESCRIPTION index b666511f..d05873a2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Description: In order to generate custom survey reports, this package provides 'banners' (cross-tabulations) of datasets in the Crunch () web service. Reports can be written in 'PDF' format using 'LaTeX' or in Microsoft Excel '.xlsx' files. -Version: 1.2.9 +Version: 1.3.0 Authors@R: c( person("Persephone", "Tsebelis", role="aut"), person("Kamil", "Sedrowicz", role="aut"), diff --git a/tests/testthat/Data-for-Progress-National-Issues-Survey----Foreign-Policy.tex b/tests/testthat/Data-for-Progress-National-Issues-Survey----Foreign-Policy.tex new file mode 100644 index 00000000..3b9f8301 --- /dev/null +++ b/tests/testthat/Data-for-Progress-National-Issues-Survey----Foreign-Policy.tex @@ -0,0 +1,243 @@ +\documentclass{article} +\usepackage[pdftex]{graphicx} +\usepackage[utf8]{inputenc} +\usepackage{fancyhdr} +\usepackage{sfmath} +\usepackage{comment} +\usepackage[T1]{fontenc} +\usepackage[pdftex=true, pdftoolbar=true, pdfmenubar=true, pdfauthor = {}, pdfcreator = {PDFLaTeX}, pdftitle = {}, colorlinks=true, urlcolor=blue, linkcolor=blue, citecolor=blue, implicit=true, hypertexnames=false]{hyperref} +\usepackage[scaled]{helvet} +\renewcommand*\familydefault{\sfdefault} +\usepackage{booktabs} +\usepackage{tabu} +\usepackage{longtable} +\usepackage{siunitx} +\sisetup{ + round-mode = places, % Rounds numbers + round-precision = 2, % to 2 places + table-format = 3 +} +\usepackage[top=0.6in, bottom=0.6in, left=1in, right=1in, includeheadfoot]{geometry} +\usepackage{array} +\usepackage[english]{babel} +\newcolumntype{B}[2]{>{#1\hspace{0pt}\arraybackslash}b{#2}} +\setlength{\parindent}{0pt} +\usepackage[dvipsnames]{color} +\definecolor{gray}{gray}{0.85} +\pagestyle{fancy} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\newcolumntype{d}{S} +\newcolumntype{J}{S[table-format=1]} +\newcolumntype{K}{S[table-format=2]} +\newcolumntype{M}{S[table-format=4]} +\newcolumntype{N}{S[table-format=5]} +\newcolumntype{O}{S[table-format=6]} +% default is 3 so it's not included above +\usepackage{float} +\usepackage{marginnote} +\setlength\extrarowheight{2pt} +\newlength\mywidth +\setlength\mywidth{3.5in} +\usepackage{caption} +\captionsetup[table]{labelformat=empty} +\renewcommand*{\marginfont}{\scriptsize\itshape} +\fancyfoot{} +\fancyfoot[R]{\thepage} +\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp} +\let\PBS=\PreserveBackslash +\newcommand{\longtablesep}{\endfirsthead \multicolumn{2}{c}{\textit{}} \\ \endhead \multicolumn{2}{c}{\textit{}} \\ \endfoot \endlastfoot} +\usepackage[titles]{tocloft} +\newcommand{\cftchapfont}{12} +\newcommand{\formatvardescription}[1]{#1} +\newcommand{\formatvarname}[1]{#1} +\newcommand{\formatvaralias}[1]{#1} +\newcommand{\formatvarfiltertext}[1]{\fontsize{8}{12}\textit{#1}} +\newcommand{\formatvarsubname}[1]{#1} +\usepackage{amsmath} +\usepackage{listings} +\usepackage{inconsolata} + +\newenvironment{absolutelynopagebreak} + {\par\nobreak\vfil\penalty0\vfilneg + \vtop\bgroup} + {\par\xdef\tpd{\the\prevdepth}\egroup + \prevdepth=\tpd} + +\fancyhead{} +\fancyhead[L]{{\fontsize{16}{24}\textbf{Data for Progress National Issues Survey -- Foreign Policy}}} + + +\begin{document} +\setlength{\tabcolsep}{1em} +\setlength{\LTleft}{0pt} +\setlength{\LTright}{\fill} +\setlength{\LTcapwidth}{\textwidth} +\vspace{.25in} + + + + + +\renewcommand{\listtablename}{Table of Contents} + + +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\textbf{Country of Residence}\hfill\textbf{\ttfamily{country\_of\_residence}} + +{\small Categorical} + +\vskip 0.10in +In what country do you live? +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{country\_of\_residence}} Country of Residence} +\vskip 0.10in\end{absolutelynopagebreak} \textit{There are more than 20 categories. Please see Appendix 1}\end{absolutelynopagebreak} + +\clearpage + +\clearpage +\fancyhead{} +\fancyhead[L]{{\fontsize{16}{24}\textbf{Appendix}}} + +\begin{absolutelynopagebreak} +\textbf{Country of Residence}\hfill\textbf{\ttfamily{country\_of\_residence}} + +{\small Categorical} + +\vskip 0.10in +In what country do you live? +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{country\_of\_residence}} Country of Residence} +\vskip 0.10in\end{absolutelynopagebreak} + +\begin{longtabu} to \linewidth {d>{\raggedright\arraybackslash}p{1.75in}M>{\centering}Xd>{\raggedright\arraybackslash}p{1.75in}J} +\toprule +{{Code}} & {{Label}} & {{Count}} & {{}} & {{Code}} & {{Label}} & {{Count}}\\ +\cmidrule(l){1-3}\cmidrule(l){5-7} + +4 & Afghanistan & 0 & & 8 & Albania & 0\\ +10 & Antarctica & 0 & & 12 & Algeria & 0\\ +16 & American Samoa & 0 & & 20 & Andorra & 0\\ +24 & Angola & 0 & & 28 & Antigua and Barbuda & 0\\ +31 & Azerbaijan & 0 & & 32 & Argentina & 0\\ +36 & Australia & 0 & & 40 & Austria & 0\\ +44 & Bahamas & 0 & & 48 & Bahrain & 0\\ +50 & Bangladesh & 0 & & 51 & Armenia & 0\\ +52 & Barbados & 0 & & 56 & Belgium & 0\\ +60 & Bermuda & 0 & & 64 & Bhutan & 0\\ +68 & Bolivia & 0 & & 70 & Bosnia and Herzegovina & 0\\ +72 & Botswana & 0 & & 74 & Bouvet Island & 0\\ +76 & Brazil & 0 & & 84 & Belize & 0\\ +86 & British Indian Ocean Territory & 0 & & 90 & Solomon Islands & 0\\ +92 & Virgin Islands, British & 0 & & 96 & Brunei Darussalam & 0\\ +100 & Bulgaria & 0 & & 104 & Myanmar & 0\\ +108 & Burundi & 0 & & 112 & Belarus & 0\\ +116 & Cambodia & 0 & & 120 & Cameroon & 0\\ +124 & Canada & 0 & & 132 & Cape Verde & 0\\ +136 & Cayman Islands & 0 & & 140 & Central African Republic & 0\\ +144 & Sri Lanka & 0 & & 148 & Chad & 0\\ +152 & Chile & 0 & & 156 & China & 0\\ +158 & Taiwan & 0 & & 162 & Christmas Island & 0\\ +166 & Cocos (Keeling) Islands & 0 & & 170 & Colombia & 0\\ +174 & Comoros & 0 & & 175 & Mayotte & 0\\ +178 & Congo & 0 & & 180 & Congo, the Democratic Republic of the & 0\\ +184 & Cook Islands & 0 & & 188 & Costa Rica & 0\\ +191 & Croatia & 0 & & 192 & Cuba & 0\\ +196 & Cyprus & 0 & & 203 & Czech Republic & 0\\ +204 & Benin & 0 & & 208 & Denmark & 0\\ +212 & Dominica & 0 & & 214 & Dominican Republic & 0\\ +218 & Ecuador & 0 & & 222 & El Salvador & 0\\ +226 & Equatorial Guinea & 0 & & 231 & Ethiopia & 0\\ +232 & Eritrea & 0 & & 233 & Estonia & 0\\ +234 & Faroe Islands & 0 & & 238 & Falkland Islands (Malvinas) & 0\\ +239 & South Georgia and the South Sandwich Islands & 0 & & 242 & Fiji & 0\\ +246 & Finland & 0 & & 248 & Aland Islands & 0\\ +250 & France & 0 & & 254 & French Guiana & 0\\ +258 & French Polynesia & 0 & & 260 & French Southern Territories & 0\\ +262 & Djibouti & 0 & & 266 & Gabon & 0\\ +268 & Georgia & 0 & & 270 & Gambia & 0\\ +275 & Palestinian Territory, Occupied & 0 & & 276 & Germany & 0\\ +288 & Ghana & 0 & & 292 & Gibraltar & 0\\ +296 & Kiribati & 0 & & 300 & Greece & 0\\ +304 & Greenland & 0 & & 308 & Grenada & 0\\ +312 & Guadeloupe & 0 & & 316 & Guam & 0\\ +320 & Guatemala & 0 & & 324 & Guinea & 0\\ +328 & Guyana & 0 & & 332 & Haiti & 0\\ +334 & Heard Island and McDonald Islands & 0 & & 336 & Holy See (Vatican City State) & 0\\ +340 & Honduras & 0 & & 344 & Hong Kong & 0\\ +348 & Hungary & 0 & & 352 & Iceland & 0\\ +356 & India & 0 & & 360 & Indonesia & 0\\ +364 & Iran, Islamic Republic of & 0 & & 368 & Iraq & 0\\ +372 & Ireland & 0 & & 376 & Israel & 0\\ +380 & Italy & 0 & & 384 & Cote d'Ivoire & 0\\ +388 & Jamaica & 0 & & 392 & Japan & 0\\ +398 & Kazakhstan & 0 & & 400 & Jordan & 0\\ +404 & Kenya & 0 & & 408 & Korea, Democratic People's Republic of & 0\\ +410 & Korea, Republic of & 0 & & 414 & Kuwait & 0\\ +417 & Kyrgyzstan & 0 & & 418 & Lao People's Democratic Republic & 0\\ +422 & Lebanon & 0 & & 426 & Lesotho & 0\\ +428 & Latvia & 0 & & 430 & Liberia & 0\\ +434 & Libyan Arab Jamahiriya & 0 & & 438 & Liechtenstein & 0\\ +440 & Lithuania & 0 & & 442 & Luxembourg & 0\\ +446 & Macao & 0 & & 450 & Madagascar & 0\\ +454 & Malawi & 0 & & 458 & Malaysia & 0\\ +462 & Maldives & 0 & & 466 & Mali & 0\\ +470 & Malta & 0 & & 474 & Martinique & 0\\ +478 & Mauritania & 0 & & 480 & Mauritius & 0\\ +484 & Mexico & 0 & & 492 & Monaco & 0\\ +496 & Mongolia & 0 & & 498 & Moldova, Republic of & 0\\ +500 & Montserrat & 0 & & 504 & Morocco & 0\\ +508 & Mozambique & 0 & & 512 & Oman & 0\\ +516 & Namibia & 0 & & 520 & Nauru & 0\\ +524 & Nepal & 0 & & 528 & Netherlands & 0\\ +530 & Netherlands Antilles & 0 & & 533 & Aruba & 0\\ +540 & New Caledonia & 0 & & 548 & Vanuatu & 0\\ +554 & New Zealand & 0 & & 558 & Nicaragua & 0\\ +562 & Niger & 0 & & 566 & Nigeria & 0\\ +570 & Niue & 0 & & 574 & Norfolk Island & 0\\ +578 & Norway & 0 & & 580 & Northern Mariana Islands & 0\\ +581 & United States Minor Outlying Islands & 0 & & 583 & Micronesia, Federated States of & 0\\ +584 & Marshall Islands & 0 & & 585 & Palau & 0\\ +586 & Pakistan & 0 & & 591 & Panama & 0\\ +598 & Papua New Guinea & 0 & & 600 & Paraguay & 0\\ +604 & Peru & 0 & & 608 & Philippines & 0\\ +612 & Pitcairn & 0 & & 616 & Poland & 0\\ +620 & Portugal & 0 & & 624 & Guinea-Bissau & 0\\ +626 & Timor-Leste & 0 & & 630 & Puerto Rico & 0\\ +634 & Qatar & 0 & & 638 & Reunion & 0\\ +642 & Romania & 0 & & 643 & Russian Federation & 0\\ +646 & Rwanda & 0 & & 654 & Saint Helena & 0\\ +659 & Saint Kitts and Nevis & 0 & & 660 & Anguilla & 0\\ +662 & Saint Lucia & 0 & & 666 & Saint Pierre and Miquelon & 0\\ +670 & Saint Vincent and the Grenadines & 0 & & 674 & San Marino & 0\\ +678 & Sao Tome and Principe & 0 & & 682 & Saudi Arabia & 0\\ +686 & Senegal & 0 & & 690 & Seychelles & 0\\ +694 & Sierra Leone & 0 & & 702 & Singapore & 0\\ +703 & Slovakia & 0 & & 704 & Viet Nam & 0\\ +705 & Slovenia & 0 & & 706 & Somalia & 0\\ +710 & South Africa & 0 & & 716 & Zimbabwe & 0\\ +724 & Spain & 0 & & 732 & Western Sahara & 0\\ +736 & Sudan & 0 & & 740 & Suriname & 0\\ +744 & Svalbard and Jan Mayen & 0 & & 748 & Swaziland & 0\\ +752 & Sweden & 0 & & 756 & Switzerland & 0\\ +760 & Syrian Arab Republic & 0 & & 762 & Tajikistan & 0\\ +764 & Thailand & 0 & & 768 & Togo & 0\\ +772 & Tokelau & 0 & & 776 & Tonga & 0\\ +780 & Trinidad and Tobago & 0 & & 784 & United Arab Emirates & 0\\ +788 & Tunisia & 0 & & 792 & Turkey & 0\\ +795 & Turkmenistan & 0 & & 796 & Turks and Caicos Islands & 0\\ +798 & Tuvalu & 0 & & 800 & Uganda & 0\\ +804 & Ukraine & 0 & & 807 & Macedonia, the former Yugoslav Republic of & 0\\ +818 & Egypt & 0 & & 826 & United Kingdom & 0\\ +831 & Guernsey & 0 & & 832 & Jersey & 0\\ +833 & Isle of Man & 0 & & 834 & Tanzania, United Republic of & 0\\ +840 & United States & 1380 & & 850 & Virgin Islands, U.S. & 0\\ +854 & Burkina Faso & 0 & & 858 & Uruguay & 0\\ +860 & Uzbekistan & 0 & & 862 & Venezuela & 0\\ +876 & Wallis and Futuna & 0 & & 882 & Samoa & 0\\ +887 & Yemen & 0 & & 891 & Serbia and Montenegro & 0\\ +894 & Zambia & 0 & & & & \\ +\bottomrule +\end{longtabu} + +\end{document} diff --git a/tests/testthat/Example Dataset with Nets.pdf b/tests/testthat/Example Dataset with Nets.pdf new file mode 100644 index 00000000..d7e78dc3 Binary files /dev/null and b/tests/testthat/Example Dataset with Nets.pdf differ diff --git a/tests/testthat/Example Dataset with Nets.tex b/tests/testthat/Example Dataset with Nets.tex new file mode 100644 index 00000000..77a1ebe6 --- /dev/null +++ b/tests/testthat/Example Dataset with Nets.tex @@ -0,0 +1,792 @@ +\documentclass[landscape]{article} +\usepackage[pdftex]{graphicx} +\usepackage[utf8]{inputenc} +\usepackage{fancyhdr} +\usepackage{sfmath} +\usepackage{comment} +\usepackage[T1]{fontenc} +\usepackage[pdftex=true, pdftoolbar=true, pdfmenubar=true, pdfauthor = {}, pdfcreator = {PDFLaTeX}, pdftitle = {}, colorlinks=true, urlcolor=blue, linkcolor=blue, citecolor=blue, implicit=true, hypertexnames=false]{hyperref} +\usepackage[scaled]{helvet} +\renewcommand*\familydefault{\sfdefault} +\usepackage{booktabs, dcolumn, longtable} +\usepackage[top=0.6in, bottom=0.6in, left=0.5in, right=0.5in, includeheadfoot]{geometry} +\usepackage{array} +\usepackage[english]{babel} +\newcolumntype{B}[2]{>{#1\hspace{0pt}\arraybackslash}b{#2}} +\setlength{\parindent}{0pt} +\usepackage[dvipsnames]{color} +\definecolor{gray}{gray}{0.85} +\pagestyle{fancy} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} +\fancyhead{} +\fancyhead[L]{{\fontsize{16}{24}\textbf{Example Dataset with Nets}}} +\newcolumntype{d}{D{.}{.}{3.2}} +\newcolumntype{g}{D{\%}{\%}{3.0}} +\usepackage{float} +\usepackage{marginnote} +\setlength\extrarowheight{2pt} +\newlength\mywidth +\setlength\mywidth{3.5in} +\usepackage{caption} +\captionsetup[table]{labelformat=empty} +\renewcommand*{\marginfont}{\scriptsize\itshape} +\fancyfoot{} +\fancyfoot[R]{\thepage} +\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp} +\let\PBS=\PreserveBackslash +\newcommand{\longtablesep}{\endfirsthead \multicolumn{2}{c}{\textit{}} \\ \endhead \multicolumn{2}{c}{\textit{}} \\ \endfoot \endlastfoot} +\usepackage[titles]{tocloft} +\newcommand{\cftchapfont}{12} +\newcommand{\formatvardescription}[1]{#1} +\newcommand{\formatvarname}[1]{#1} +\newcommand{\formatvaralias}[1]{#1} +\newcommand{\formatvarfiltertext}[1]{\fontsize{8}{12}\textit{#1}} +\newcommand{\formatvarsubname}[1]{#1} +\usepackage{amsmath} +\newenvironment{absolutelynopagebreak} + {\par\nobreak\vfil\penalty0\vfilneg + \vtop\bgroup} + {\par\xdef\tpd{\the\prevdepth}\egroup + \prevdepth=\tpd} + + +\newcommand{\bannera}[1]{\toprule + & \multicolumn{1}{c}{\bf } & \multicolumn{2}{c}{\bf Age} & \multicolumn{2}{c}{\bf Gender} \\ \cmidrule(lr{.75em}){3-4} \cmidrule(lr{.75em}){5-6} +{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35+} & \multicolumn{1}{c}{Male} & \multicolumn{1}{c}{Female} \\ +\midrule +\endfirsthead +\toprule +& \multicolumn{5}{c}{} \\ & \multicolumn{1}{c}{\bf } & \multicolumn{2}{c}{\bf Age} & \multicolumn{2}{c}{\bf Gender} \\ \cmidrule(lr{.75em}){3-4} \cmidrule(lr{.75em}){5-6} +{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35+} & \multicolumn{1}{c}{Male} & \multicolumn{1}{c}{Female} \\ +\midrule +\endhead +\midrule +& \multicolumn{5}{c}{} \\ +\bottomrule +\endfoot +\bottomrule +\endlastfoot +} +\newcommand{\tbltopa[1]}{ +\begin{longtable}{@{\extracolsep{\fill}}>{\hangindent=1em \PBS \raggedright \hspace{0pt}}b{#1}*{5}{r}}} + +\newcommand{\bannerb}[1]{\toprule + & \multicolumn{1}{c}{\bf } & \multicolumn{3}{c}{\bf Age} \\ \cmidrule(lr{.75em}){3-5} +{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35 to 54} & \multicolumn{1}{c}{55+} \\ +\midrule +\endfirsthead +\toprule +& \multicolumn{4}{c}{} \\ & \multicolumn{1}{c}{\bf } & \multicolumn{3}{c}{\bf Age} \\ \cmidrule(lr{.75em}){3-5} +{\bf #1} & \multicolumn{1}{c}{Total} & \multicolumn{1}{c}{16 to 34} & \multicolumn{1}{c}{35 to 54} & \multicolumn{1}{c}{55+} \\ +\midrule +\endhead +\midrule +& \multicolumn{4}{c}{} \\ +\bottomrule +\endfoot +\bottomrule +\endlastfoot +} +\newcommand{\tbltopb[1]}{ +\begin{longtable}{@{\extracolsep{\fill}}>{\hangindent=1em \PBS \raggedright \hspace{0pt}}b{#1}*{4}{r}}} + +\begin{document} +\setlength{\LTleft}{0pt} +\setlength{\LTright}{\fill} +\setlength{\LTcapwidth}{\textwidth} +\vspace{.25in} + + + + +{ +%% here's where individual input starts %% + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 1. Do you have any of these animals as pets? Please select all that apply.} +\hangindent=0em \parbox{9in}{ +\formatvardescription{1. Do you have any of these animals as pets? Please select all that apply.}\\ +\formatvarfiltertext{Uniform base is True.}} \\ +\addlinespace +\bannera{} + + +Cat & 25\% & 0\% & 53\% & 46\% & 0\% \\ +Dog & 47\% & 31\% & 65\% & 28\% & 71\% \\ +Bird & 38\% & 44\% & 33\% & 28\% & 51\% \\ +\midrule +Unweighted N & \multicolumn{1}{c}{17} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{9} & \multicolumn{1}{c}{8} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +Cat & 25\% & 0\% & 100\% & 0\% \\ +Dog & 47\% & 31\% & 35\% & 100\% \\ +Bird & 38\% & 44\% & 35\% & 30\% \\ +\midrule +Unweighted N & \multicolumn{1}{c}{17} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{8} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 2. What is your favorite pet?} +\hangindent=0em \parbox{9in}{ +\formatvardescription{2. What is your favorite pet?}} \\ +\addlinespace +\bannera{} + + +\textbf{header} & & & & & \\ +Cat & 30\% & 38\% & 25\% & 18\% & 44\% \\ +\textbf{Net: Cat/Bird} & \textbf{50\%} & \textbf{38\%} & \textbf{58\%} & \textbf{30\%} & \textbf{73\%} \\ +Dog & 50\% & 62\% & 42\% & 69\% & 27\% \\ +\textbf{Net: Cat/Dog} & \textbf{80\%} & \textbf{100\%} & \textbf{67\%} & \textbf{87\%} & \textbf{71\%} \\ +Bird & 20\% & 0\% & 33\% & 12\% & 29\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 99\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{13} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{7} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +\textbf{header} & & & & \\ +Cat & 30\% & 38\% & 0\% & 69\% \\ +\textbf{Net: Cat/Bird} & \textbf{50\%} & \textbf{38\%} & \textbf{35\%} & \textbf{100\%} \\ +Dog & 50\% & 62\% & 65\% & 0\% \\ +\textbf{Net: Cat/Dog} & \textbf{80\%} & \textbf{100\%} & \textbf{65\%} & \textbf{69\%} \\ +Bird & 20\% & 0\% & 35\% & 31\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{13} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{4} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 3A. Name the kinds of pets you have at these locations. — Home} +\hangindent=0em \parbox{9in}{ +\formatvardescription{3A. Name the kinds of pets you have at these locations. — Home}} \\ +\addlinespace +\bannera{} + + +Cat & 49\% & 22\% & 66\% & 100\% & 26\% \\ +Dog & 43\% & 56\% & 34\% & 0\% & 62\% \\ +Bird & 9\% & 22\% & 0\% & 0\% & 13\% \\ +\textbf{Net: Cat/Dog} & \textbf{92\%} & \textbf{78\%} & \textbf{100\%} & \textbf{100\%} & \textbf{88\%} \\ +\midrule +Totals & 101\% & 100\% & 100\% & 100\% & 101\% \\ +Unweighted N & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{6} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +Cat & 49\% & 22\% & 100\% & 46\% \\ +Dog & 43\% & 56\% & 0\% & 54\% \\ +Bird & 9\% & 22\% & 0\% & 0\% \\ +\textbf{Net: Cat/Dog} & \textbf{92\%} & \textbf{78\%} & \textbf{100\%} & \textbf{100\%} \\ +\midrule +Totals & 101\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{6} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 3B. Name the kinds of pets you have at these locations. — Work} +\hangindent=0em \parbox{9in}{ +\formatvardescription{3B. Name the kinds of pets you have at these locations. — Work}} \\ +\addlinespace +\bannera{} + + +Cat & 42\% & 50\% & 36\% & 54\% & 18\% \\ +Dog & 37\% & 14\% & 54\% & 46\% & 18\% \\ +Bird & 21\% & 36\% & 11\% & 0\% & 64\% \\ +\textbf{Net: Cat/Dog} & \textbf{79\%} & \textbf{64\%} & \textbf{90\%} & \textbf{100\%} & \textbf{36\%} \\ +\midrule +Totals & 100\% & 100\% & 101\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{12} & \multicolumn{1}{c}{9} & \multicolumn{1}{c}{7} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +Cat & 42\% & 50\% & 21\% & 67\% \\ +Dog & 37\% & 14\% & 79\% & 0\% \\ +Bird & 21\% & 36\% & 0\% & 33\% \\ +\textbf{Net: Cat/Dog} & \textbf{79\%} & \textbf{64\%} & \textbf{100\%} & \textbf{67\%} \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{8} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 4. Number of dogs} +\hangindent=0em \parbox{9in}{ +\formatvardescription{4. Number of dogs}} \\ +\addlinespace +\bannera{} + + +0-1 & 6\% & 0\% & 12\% & 0\% & 14\% \\ +1-2 & 16\% & 0\% & 29\% & 29\% & 0\% \\ +2-3 & 31\% & 50\% & 15\% & 29\% & 33\% \\ +3-4 & 31\% & 14\% & 44\% & 41\% & 19\% \\ +4-5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +5-6 & 16\% & 36\% & 0\% & 0\% & 35\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 99\% & 101\% \\ +Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{8} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +0-1 & 6\% & 0\% & 0\% & 43\% \\ +1-2 & 16\% & 0\% & 39\% & 0\% \\ +2-3 & 31\% & 50\% & 0\% & 57\% \\ +3-4 & 31\% & 14\% & 61\% & 0\% \\ +4-5 & 0\% & 0\% & 0\% & 0\% \\ +5-6 & 16\% & 36\% & 0\% & 0\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{16} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{7} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 5. How many dogs do you have?} +\hangindent=0em \parbox{9in}{ +\formatvardescription{5. How many dogs do you have?}} \\ +\addlinespace +\bannera{} + + +0-1 & 12\% & 0\% & 21\% & 23\% & 0\% \\ +1-2 & 15\% & 12\% & 17\% & 9\% & 22\% \\ +2-3 & 17\% & 25\% & 11\% & 9\% & 25\% \\ +3-4 & 24\% & 31\% & 19\% & 0\% & 53\% \\ +4-5 & 32\% & 31\% & 32\% & 58\% & 0\% \\ +\midrule +Totals & 100\% & 99\% & 100\% & 99\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +0-1 & 12\% & 0\% & 33\% & 0\% \\ +1-2 & 15\% & 12\% & 0\% & 46\% \\ +2-3 & 17\% & 25\% & 0\% & 31\% \\ +3-4 & 24\% & 31\% & 17\% & 23\% \\ +4-5 & 32\% & 31\% & 50\% & 0\% \\ +\midrule +Totals & 100\% & 99\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 6. How many dogs do you have?} +\hangindent=0em \parbox{9in}{ +\formatvardescription{6. How many dogs do you have?}} \\ +\addlinespace +\bannera{} + + +0-0.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +0.5-1 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +1-1.5 & 12\% & 22\% & 0\% & 0\% & 15\% \\ +1.5-2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +2-2.5 & 76\% & 56\% & 100\% & 100\% & 71\% \\ +2.5-3 & 12\% & 22\% & 0\% & 0\% & 15\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% & 101\% \\ +Unweighted N & \multicolumn{1}{c}{12} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{7} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +0-0.5 & 0\% & 0\% & 0\% & 0\% \\ +0.5-1 & 0\% & 0\% & 0\% & 0\% \\ +1-1.5 & 12\% & 22\% & 0\% & 0\% \\ +1.5-2 & 0\% & 0\% & 0\% & 0\% \\ +2-2.5 & 76\% & 56\% & 100\% & 100\% \\ +2.5-3 & 12\% & 22\% & 0\% & 0\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{12} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{6} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 7. Country} +\hangindent=0em \parbox{9in}{ +\formatvardescription{7. Country}} \\ +\addlinespace +\bannera{} + + +Argentina & 0\% & 0\% & 0\% & 0\% & 0\% \\ +Australia & 15\% & 12\% & 17\% & 9\% & 22\% \\ +Austria & 12\% & 12\% & 11\% & 9\% & 15\% \\ +Belgium & 29\% & 12\% & 40\% & 35\% & 22\% \\ +Brazil & 44\% & 62\% & 32\% & 46\% & 42\% \\ +\midrule +Totals & 100\% & 98\% & 100\% & 99\% & 101\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +Argentina & 0\% & 0\% & 0\% & 0\% \\ +Australia & 15\% & 12\% & 0\% & 46\% \\ +Austria & 12\% & 12\% & 17\% & 0\% \\ +Belgium & 29\% & 12\% & 50\% & 23\% \\ +Brazil & 44\% & 62\% & 33\% & 31\% \\ +\midrule +Totals & 100\% & 98\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 8. Age} +\hangindent=0em \parbox{9in}{ +\formatvardescription{8. Age}} \\ +\addlinespace +\bannera{} + + +20-30 & 27\% & 69\% & 0\% & 32\% & 22\% \\ +30-40 & 19\% & 31\% & 11\% & 0\% & 42\% \\ +40-50 & 12\% & 0\% & 21\% & 23\% & 0\% \\ +50-60 & 19\% & 0\% & 32\% & 35\% & 0\% \\ +60-70 & 5\% & 0\% & 8\% & 9\% & 0\% \\ +70-80 & 12\% & 0\% & 19\% & 0\% & 25\% \\ +80-90 & 5\% & 0\% & 8\% & 0\% & 11\% \\ +\midrule +Totals & 99\% & 100\% & 99\% & 99\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +20-30 & 27\% & 69\% & 0\% & 0\% \\ +30-40 & 19\% & 31\% & 17\% & 0\% \\ +40-50 & 12\% & 0\% & 33\% & 0\% \\ +50-60 & 19\% & 0\% & 50\% & 0\% \\ +60-70 & 5\% & 0\% & 0\% & 23\% \\ +70-80 & 12\% & 0\% & 0\% & 54\% \\ +80-90 & 5\% & 0\% & 0\% & 23\% \\ +\midrule +Totals & 99\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 9. Age 2} +\hangindent=0em \parbox{9in}{ +\formatvardescription{9. Age 2}} \\ +\addlinespace +\bannera{} + + +16 to 34 & 40\% & 100\% & 0\% & 32\% & 49\% \\ +35+ & 60\% & 0\% & 100\% & 68\% & 51\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +16 to 34 & 40\% & 100\% & 0\% & 0\% \\ +35+ & 60\% & 0\% & 100\% & 100\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 10. Age 3} +\hangindent=0em \parbox{9in}{ +\formatvardescription{10. Age 3}} \\ +\addlinespace +\bannera{} + + +16 to 34 & 40\% & 100\% & 0\% & 32\% & 49\% \\ +35 to 54 & 38\% & 0\% & 64\% & 58\% & 15\% \\ +55+ & 22\% & 0\% & 36\% & 9\% & 36\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 99\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +16 to 34 & 40\% & 100\% & 0\% & 0\% \\ +35 to 54 & 38\% & 0\% & 100\% & 0\% \\ +55+ & 22\% & 0\% & 0\% & 100\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 11. Age 5} +\hangindent=0em \parbox{9in}{ +\formatvardescription{11. Age 5}} \\ +\addlinespace +\bannera{} + + +16 to 24 & 17\% & 44\% & 0\% & 23\% & 11\% \\ +25 to 34 & 22\% & 56\% & 0\% & 9\% & 38\% \\ +35 to 44 & 19\% & 0\% & 32\% & 23\% & 15\% \\ +45 to 54 & 19\% & 0\% & 32\% & 35\% & 0\% \\ +55+ & 22\% & 0\% & 36\% & 9\% & 36\% \\ +\midrule +Totals & 99\% & 100\% & 100\% & 99\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +16 to 24 & 17\% & 44\% & 0\% & 0\% \\ +25 to 34 & 22\% & 56\% & 0\% & 0\% \\ +35 to 44 & 19\% & 0\% & 50\% & 0\% \\ +45 to 54 & 19\% & 0\% & 50\% & 0\% \\ +55+ & 22\% & 0\% & 0\% & 100\% \\ +\midrule +Totals & 99\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 12. Gender} +\hangindent=0em \parbox{9in}{ +\formatvardescription{12. Gender}} \\ +\addlinespace +\bannera{} + + +Male & 54\% & 44\% & 61\% & 100\% & 0\% \\ +Female & 46\% & 56\% & 39\% & 0\% & 100\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +Male & 54\% & 44\% & 83\% & 23\% \\ +Female & 46\% & 56\% & 17\% & 77\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 13. What is your favorite pet?} +\hangindent=0em \parbox{9in}{ +\formatvardescription{13. What is your favorite pet?}} \\ +\addlinespace +\bannera{} + + +0-0.2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +0.2-0.4 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +0.4-0.6 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +0.6-0.8 & 30\% & 38\% & 25\% & 18\% & 44\% \\ +0.8-1 & 20\% & 0\% & 33\% & 12\% & 29\% \\ +1-1.2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +1.2-1.4 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +1.4-1.6 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +1.6-1.8 & 50\% & 62\% & 42\% & 69\% & 27\% \\ +1.8-2 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 99\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +0-0.2 & 0\% & 0\% & 0\% & 0\% \\ +0.2-0.4 & 0\% & 0\% & 0\% & 0\% \\ +0.4-0.6 & 0\% & 0\% & 0\% & 0\% \\ +0.6-0.8 & 30\% & 38\% & 0\% & 69\% \\ +0.8-1 & 20\% & 0\% & 35\% & 31\% \\ +1-1.2 & 0\% & 0\% & 0\% & 0\% \\ +1.2-1.4 & 0\% & 0\% & 0\% & 0\% \\ +1.4-1.6 & 0\% & 0\% & 0\% & 0\% \\ +1.6-1.8 & 50\% & 62\% & 65\% & 0\% \\ +1.8-2 & 0\% & 0\% & 0\% & 0\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 14. Numeric data with values less then 0.} +\hangindent=0em \parbox{9in}{ +\formatvardescription{14. Numeric data with values less then 0.}\\ +\formatvarfiltertext{Not useful.}} \\ +\addlinespace +\bannera{} + + +-1--0.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +-0.5-0 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +0-0.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +0.5-1 & 50\% & 38\% & 58\% & 31\% & 73\% \\ +1-1.5 & 0\% & 0\% & 0\% & 0\% & 0\% \\ +1.5-2 & 50\% & 62\% & 42\% & 69\% & 27\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{14} & \multicolumn{1}{c}{10} & \multicolumn{1}{c}{10} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +-1--0.5 & 0\% & 0\% & 0\% & 0\% \\ +-0.5-0 & 0\% & 0\% & 0\% & 0\% \\ +0-0.5 & 0\% & 0\% & 0\% & 0\% \\ +0.5-1 & 50\% & 38\% & 35\% & 100\% \\ +1-1.5 & 0\% & 0\% & 0\% & 0\% \\ +1.5-2 & 50\% & 62\% & 65\% & 0\% \\ +\midrule +Totals & 100\% & 100\% & 100\% & 100\% \\ +Unweighted N & \multicolumn{1}{c}{20} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{9} \\ + +\end{longtable} +\end{center} +\clearpage + + +\begin{center} + +\tbltopa[1.5in] +\addcontentsline{lot}{table}{ 15. Do you have any of these animals as pets? Please select all that apply.} +\hangindent=0em \parbox{9in}{ +\formatvardescription{15. Do you have any of these animals as pets? Please select all that apply.}\\ +\formatvarfiltertext{Uniform base is False.}} \\ +\addlinespace +\bannera{} + + +Cat & 61\% & 0\% & 100\% & 61\% & 0\% \\ +Dog & 78\% & 56\% & 100\% & 100\% & 71\% \\ +Bird & 66\% & 64\% & 70\% & 70\% & 64\% \\ +\midrule +Unweighted N: Min & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{2} \\ +Unweighted N: Max & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{6} & \multicolumn{1}{c}{7} \\ + +\end{longtable} + + + +\vspace{-.25in} +\tbltopb[1.5in] +\addlinespace +\bannerb{} + + +Cat & 61\% & 0\% & 100\% & 0\% \\ +Dog & 78\% & 56\% & 100\% & 100\% \\ +Bird & 66\% & 64\% & 100\% & 50\% \\ +\midrule +Unweighted N: Min & \multicolumn{1}{c}{8} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{4} \\ +Unweighted N: Max & \multicolumn{1}{c}{11} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{7} \\ + +\end{longtable} +\end{center} +\clearpage + + +} +\end{document} + diff --git a/tests/testthat/Example-dataset.tex b/tests/testthat/Example-dataset.tex new file mode 100644 index 00000000..22ebd917 --- /dev/null +++ b/tests/testthat/Example-dataset.tex @@ -0,0 +1,343 @@ +\documentclass{article} +\usepackage[pdftex]{graphicx} +\usepackage[utf8]{inputenc} +\usepackage{fancyhdr} +\usepackage{sfmath} +\usepackage{comment} +\usepackage[T1]{fontenc} +\usepackage[pdftex=true, pdftoolbar=true, pdfmenubar=true, pdfauthor = {}, pdfcreator = {PDFLaTeX}, pdftitle = {}, colorlinks=true, urlcolor=blue, linkcolor=blue, citecolor=blue, implicit=true, hypertexnames=false]{hyperref} +\usepackage[scaled]{helvet} +\renewcommand*\familydefault{\sfdefault} +\usepackage{booktabs} +\usepackage{tabu} +\usepackage{longtable} +\usepackage{siunitx} +\sisetup{ + round-mode = places, % Rounds numbers + round-precision = 2, % to 2 places + table-format = 3 +} +\usepackage[top=0.6in, bottom=0.6in, left=1in, right=1in, includeheadfoot]{geometry} +\usepackage{array} +\usepackage[english]{babel} +\newcolumntype{B}[2]{>{#1\hspace{0pt}\arraybackslash}b{#2}} +\setlength{\parindent}{0pt} +\usepackage[dvipsnames]{color} +\definecolor{gray}{gray}{0.85} +\pagestyle{fancy} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +\newcolumntype{d}{S} +\newcolumntype{J}{S[table-format=1]} +\newcolumntype{K}{S[table-format=2]} +\newcolumntype{M}{S[table-format=4]} +\newcolumntype{N}{S[table-format=5]} +\newcolumntype{O}{S[table-format=6]} +% default is 3 so it's not included above +\usepackage{float} +\usepackage{marginnote} +\setlength\extrarowheight{2pt} +\newlength\mywidth +\setlength\mywidth{3.5in} +\usepackage{caption} +\captionsetup[table]{labelformat=empty} +\renewcommand*{\marginfont}{\scriptsize\itshape} +\fancyfoot{} +\fancyfoot[R]{\thepage} +\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp} +\let\PBS=\PreserveBackslash +\newcommand{\longtablesep}{\endfirsthead \multicolumn{2}{c}{\textit{}} \\ \endhead \multicolumn{2}{c}{\textit{}} \\ \endfoot \endlastfoot} +\usepackage[titles]{tocloft} +\newcommand{\cftchapfont}{12} +\newcommand{\formatvardescription}[1]{#1} +\newcommand{\formatvarname}[1]{#1} +\newcommand{\formatvaralias}[1]{#1} +\newcommand{\formatvarfiltertext}[1]{\fontsize{8}{12}\textit{#1}} +\newcommand{\formatvarsubname}[1]{#1} +\usepackage{amsmath} +\usepackage{listings} +\usepackage{inconsolata} + +\newenvironment{absolutelynopagebreak} + {\par\nobreak\vfil\penalty0\vfilneg + \vtop\bgroup} + {\par\xdef\tpd{\the\prevdepth}\egroup + \prevdepth=\tpd} + +\fancyhead{} +\fancyhead[L]{{\fontsize{16}{24}\textbf{Example dataset}}} + + +\begin{document} +\setlength{\tabcolsep}{1em} +\setlength{\LTleft}{0pt} +\setlength{\LTright}{\fill} +\setlength{\LTcapwidth}{\textwidth} +\vspace{.25in} + + + + + +\renewcommand{\listtablename}{Table of Contents} + + +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\textbf{All pets owned}\hfill\textbf{\ttfamily{allpets}} + +{\small Multiple Response} + +\vskip 0.10in +Do you have any of these animals as pets? Please select all that apply. +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{allpets}} All pets owned} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{>{}ll} +\toprule +\multicolumn{2}{c}{Rows} \\ +\cmidrule(l{3pt}r{3pt}){1-2} +{Variable} & {Label}\\ +\midrule +\ttfamily{allpets\_1} & Cat\\ + +\ttfamily{allpets\_2} & Dog\\ + +\ttfamily{allpets\_3} & Bird\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\begin{longtable}[l]{Jl} +\toprule +\multicolumn{2}{c}{Columns} \\ +\cmidrule(l{3pt}r{3pt}){1-2} +{Code} & {Label}\\ +\midrule +1 & selected\\ + +2 & not selected\\ + +8 & skipped\\ + +9 & not asked\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\begin{longtable}[l]{lJJJJ} +\toprule +\multicolumn{1}{c}{ } & \multicolumn{4}{c}{Counts} \\ +\cmidrule(l{3pt}r{3pt}){2-5} +{Variable} & {1} & {2} & {8} & {9}\\ +\midrule +\ttfamily{allpets\_1} & 4 & 4 & 4 & 8\\ + +\ttfamily{allpets\_2} & 5 & 3 & 4 & 8\\ + +\ttfamily{allpets\_3} & 5 & 6 & 6 & 3\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Pet}\hfill\textbf{\ttfamily{q1}} + +{\small Categorical} + +\vskip 0.10in +What is your favorite pet? +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{q1}} Pet} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{JlJ} +\toprule +{Code} & {Label} & {Count}\\ +\midrule +1 & Cat & 6\\ +2 & Dog & 4\\ +3 & Bird & 3\\ +8 & Skipped & 3\\ +9 & Not Asked & 4\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Pets by location}\hfill\textbf{\ttfamily{petloc}} + +{\small Grid} + +\vskip 0.10in +Name the kinds of pets you have at these locations. +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{petloc}} Pets by location} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{>{}ll} +\toprule +\multicolumn{2}{c}{Rows} \\ +\cmidrule(l{3pt}r{3pt}){1-2} +{Variable} & {Label}\\ +\midrule +\ttfamily{petloc\_home} & Home\\ + +\ttfamily{petloc\_work} & Work\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\begin{longtable}[l]{Jl} +\toprule +\multicolumn{2}{c}{Columns} \\ +\cmidrule(l{3pt}r{3pt}){1-2} +{Code} & {Label}\\ +\midrule +1 & Cat\\ + +2 & Dog\\ + +3 & Bird\\ + +8 & Skipped\\ + +9 & Not Asked\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\begin{longtable}[l]{lJJJJJ} +\toprule +\multicolumn{1}{c}{ } & \multicolumn{5}{c}{Counts} \\ +\cmidrule(l{3pt}r{3pt}){2-6} +{Variable} & {1} & {2} & {3} & {8} & {9}\\ +\midrule +\ttfamily{petloc\_home} & 5 & 3 & 3 & 4 & 5\\ + +\ttfamily{petloc\_work} & 6 & 4 & 6 & 3 & 1\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Number of dogs}\hfill\textbf{\ttfamily{ndogs}} + +{\small Numeric} + +\vskip 0.10in + +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{ndogs}} Number of dogs} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{cccccc} +\toprule +{Mean} & {SD} & {Min} & {Max} & {n} & {Missing}\\ +\midrule +2 & 1 & 0 & 6 & 16 & 4\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Number of dogs -- With papers}\hfill\textbf{\ttfamily{ndogs\_a}} + +{\small Numeric} + +\vskip 0.10in +How many dogs do you have? +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{ndogs\_a}} Number of dogs -- With papers} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{cccccc} +\toprule +{Mean} & {SD} & {Min} & {Max} & {n} & {Missing}\\ +\midrule +1.95 & 1 & 0 & 5 & 20 & 0\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Number of dogs -- Mutts}\hfill\textbf{\ttfamily{ndogs\_b}} + +{\small Numeric} + +\vskip 0.10in +How many dogs do you have? +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{ndogs\_b}} Number of dogs -- Mutts} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{cccccc} +\toprule +{Mean} & {SD} & {Min} & {Max} & {n} & {Missing}\\ +\midrule +1.58 & 1 & 0 & 3 & 12 & 8\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Pet name}\hfill\textbf{\ttfamily{q3}} + +{\small Text} + +\vskip 0.10in +What is your favorite pet's maiden name? +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{q3}} Pet name} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{ddd} +\toprule +{Filled} & {Missing} & {Max Length}\\ +\midrule +16 & 4 & 8\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Country}\hfill\textbf{\ttfamily{country}} + +{\small Categorical} + +\vskip 0.10in + +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{country}} Country} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{JlJ} +\toprule +{Code} & {Label} & {Count}\\ +\midrule +1 & Argentina & 4\\ +2 & Australia & 4\\ +3 & Austria & 4\\ +4 & Belgium & 4\\ +5 & Brazil & 4\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} +\begin{absolutelynopagebreak} +\begin{absolutelynopagebreak} + +\vskip 0.25in +\textbf{Wave}\hfill\textbf{\ttfamily{wave}} + +{\small Date} + +\vskip 0.10in + +\addcontentsline{lot}{table}{\parbox{1.8in}{\ttfamily{wave}} Wave} +\vskip 0.10in\end{absolutelynopagebreak} +\begin{longtable}[l]{ccc} +\toprule +Filled & Missing & Range\\ +\midrule +20 & 0 & [2014-12-01, 2015-01-01]\\ +\bottomrule +\end{longtable}\end{absolutelynopagebreak} + +\clearpage + + + + +\end{document} diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5.json similarity index 56% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5.json index decaea37..9df46426 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5.json @@ -1,50 +1,50 @@ { "element": "shoji:entity", - "self": "https://app.crunch.io/api/datasets/72c94d/", + "self": "https://app.crunch.io/api/datasets/033bb5/", "catalogs": { - "folders": "https://app.crunch.io/api/datasets/72c94d/folders/", - "users": "https://app.crunch.io/api/datasets/72c94d/users/", - "views": "https://app.crunch.io/api/datasets/72c94d/views/", - "variables": "https://app.crunch.io/api/datasets/72c94d/variables/", - "actions": "https://app.crunch.io/api/datasets/72c94d/actions/", - "boxdata": "https://app.crunch.io/api/datasets/72c94d/boxdata/", - "filters": "https://app.crunch.io/api/datasets/72c94d/filters/", - "scripts": "https://app.crunch.io/api/datasets/72c94d/scripts/", - "permissions": "https://app.crunch.io/api/datasets/72c94d/permissions/", - "batches": "https://app.crunch.io/api/datasets/72c94d/batches/", - "tags": "https://app.crunch.io/api/datasets/72c94d/tags/", - "teams": "https://app.crunch.io/api/datasets/72c94d/teams/", - "savepoints": "https://app.crunch.io/api/datasets/72c94d/savepoints/", - "multitables": "https://app.crunch.io/api/datasets/72c94d/multitables/", - "forks": "https://app.crunch.io/api/datasets/72c94d/forks/", - "decks": "https://app.crunch.io/api/datasets/72c94d/decks/", + "folders": "https://app.crunch.io/api/datasets/033bb5/folders/", + "users": "https://app.crunch.io/api/datasets/033bb5/users/", + "views": "https://app.crunch.io/api/datasets/033bb5/views/", + "variables": "https://app.crunch.io/api/datasets/033bb5/variables/", + "actions": "https://app.crunch.io/api/datasets/033bb5/actions/", + "boxdata": "https://app.crunch.io/api/datasets/033bb5/boxdata/", + "filters": "https://app.crunch.io/api/datasets/033bb5/filters/", + "scripts": "https://app.crunch.io/api/datasets/033bb5/scripts/", + "permissions": "https://app.crunch.io/api/datasets/033bb5/permissions/", + "batches": "https://app.crunch.io/api/datasets/033bb5/batches/", + "tags": "https://app.crunch.io/api/datasets/033bb5/tags/", + "teams": "https://app.crunch.io/api/datasets/033bb5/teams/", + "savepoints": "https://app.crunch.io/api/datasets/033bb5/savepoints/", + "multitables": "https://app.crunch.io/api/datasets/033bb5/multitables/", + "forks": "https://app.crunch.io/api/datasets/033bb5/forks/", + "decks": "https://app.crunch.io/api/datasets/033bb5/decks/", "parent": "https://app.crunch.io/api/datasets/", "project": "https://app.crunch.io/api/projects/personal/", - "variables_private": "https://app.crunch.io/api/datasets/72c94d/variables/private/" + "variables_private": "https://app.crunch.io/api/datasets/033bb5/variables/private/" }, "fragments": { - "preferences": "https://app.crunch.io/api/datasets/72c94d/preferences/", - "stream": "https://app.crunch.io/api/datasets/72c94d/stream/", - "settings": "https://app.crunch.io/api/datasets/72c94d/settings/", - "exclusion": "https://app.crunch.io/api/datasets/72c94d/exclusion/", - "publish": "https://app.crunch.io/api/datasets/72c94d/publish/", - "state": "https://app.crunch.io/api/datasets/72c94d/state/", - "table": "https://app.crunch.io/api/datasets/72c94d/table/", - "pk": "https://app.crunch.io/api/datasets/72c94d/pk/", - "schema": "https://app.crunch.io/api/datasets/72c94d/schema/" + "preferences": "https://app.crunch.io/api/datasets/033bb5/preferences/", + "stream": "https://app.crunch.io/api/datasets/033bb5/stream/", + "settings": "https://app.crunch.io/api/datasets/033bb5/settings/", + "exclusion": "https://app.crunch.io/api/datasets/033bb5/exclusion/", + "publish": "https://app.crunch.io/api/datasets/033bb5/publish/", + "state": "https://app.crunch.io/api/datasets/033bb5/state/", + "table": "https://app.crunch.io/api/datasets/033bb5/table/", + "pk": "https://app.crunch.io/api/datasets/033bb5/pk/", + "schema": "https://app.crunch.io/api/datasets/033bb5/schema/" }, "views": { - "second_order_analysis": "https://app.crunch.io/api/datasets/72c94d/second_order_analysis/", - "cube": "https://app.crunch.io/api/datasets/72c94d/cube/", - "export": "https://app.crunch.io/api/datasets/72c94d/export/", - "summary": "https://app.crunch.io/api/datasets/72c94d/summary/", - "applied_filters": "https://app.crunch.io/api/datasets/72c94d/filters/applied/" + "second_order_analysis": "https://app.crunch.io/api/datasets/033bb5/second_order_analysis/", + "cube": "https://app.crunch.io/api/datasets/033bb5/cube/", + "export": "https://app.crunch.io/api/datasets/033bb5/export/", + "summary": "https://app.crunch.io/api/datasets/033bb5/summary/", + "applied_filters": "https://app.crunch.io/api/datasets/033bb5/filters/applied/" }, "description": "Detail for a given dataset", "body": { "maintainer": "https://app.crunch.io/api/users/0740cc/", "current_editor": "https://app.crunch.io/api/users/0740cc/", - "creation_time": "2020-10-20T02:53:37.407000", + "creation_time": "2020-10-23T15:37:47.183000", "streaming": "no", "archived": false, "owner": "https://app.crunch.io/api/users/0740cc/", @@ -53,7 +53,7 @@ "small": "https://s.crunch.io/act_app_icons/account-yougov-wmgadi-small.png", "favicon": "https://s.crunch.io/act_app_icons/account-yougov-slyzix-favicon.ico" }, - "id": "72c94d", + "id": "033bb5", "size": { "rows": 20, "unfiltered_rows": 20, @@ -94,11 +94,11 @@ "owner_name": "Personal project for Brandon Bertelsen", "description": "A dataset to illustrate the API", "end_date": null, - "access_time": "2020-10-20T02:53:37.184000", + "access_time": "2020-10-23T15:37:46.967000", "view_cols": null, "current_editor_name": "Brandon Bertelsen", "view_of": null, - "modification_time": "2020-10-20T02:54:12.854000", + "modification_time": "2020-10-23T15:38:30.901000", "view_rows": null, "permissions": { "edit": true, @@ -110,9 +110,9 @@ "is_published": true }, "orders": { - "variables_weights": "https://app.crunch.io/api/datasets/72c94d/variables/weights/", - "variables_hier": "https://app.crunch.io/api/datasets/72c94d/variables/hier/", - "variables_personal": "https://app.crunch.io/api/datasets/72c94d/variables/personal/" + "variables_weights": "https://app.crunch.io/api/datasets/033bb5/variables/weights/", + "variables_hier": "https://app.crunch.io/api/datasets/033bb5/variables/hier/", + "variables_personal": "https://app.crunch.io/api/datasets/033bb5/variables/personal/" }, "urls": { "owner_url": "https://app.crunch.io/api/projects/bf9f4f/", diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders.json similarity index 70% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders.json index 2d8c52e0..f839a270 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders.json @@ -1,83 +1,88 @@ { "element": "shoji:catalog", - "self": "https://app.crunch.io/api/datasets/72c94d/folders/", + "self": "https://app.crunch.io/api/datasets/033bb5/folders/", "catalogs": { - "personal": "https://app.crunch.io/api/datasets/72c94d/variables/personal/", - "hidden": "https://app.crunch.io/api/datasets/72c94d/folders/hidden/", - "trash": "https://app.crunch.io/api/datasets/72c94d/folders/trash/", - "parents": "https://app.crunch.io/api/datasets/72c94d/folders/parents/", - "secure": "https://app.crunch.io/api/datasets/72c94d/folders/secure/" + "personal": "https://app.crunch.io/api/datasets/033bb5/variables/personal/", + "hidden": "https://app.crunch.io/api/datasets/033bb5/folders/hidden/", + "trash": "https://app.crunch.io/api/datasets/033bb5/folders/trash/", + "parents": "https://app.crunch.io/api/datasets/033bb5/folders/parents/", + "secure": "https://app.crunch.io/api/datasets/033bb5/folders/secure/" }, "description": "This is the variables' folder root", "index": { - "../variables/834ea1/": { + "../variables/864b5f/": { + "discarded": false, + "alias": "weight1", "secure": false, - "derived": false, - "id": "834ea1", - "description": "What is your favorite pet?", - "scale": "interval", - "name": "Pet name post", + "name": "weight1", + "id": "864b5f", + "type": "numeric", "notes": "", - "discarded": false, - "alias": "q1_post", + "derived": true, "hidden": false, - "type": "categorical" + "description": "Raked weighting based on: Pet" }, - "../variables/2b4a81/": { + "../variables/f841a8/": { "discarded": false, - "alias": "country_post", + "alias": "country_pre", "secure": false, - "name": "Country post", - "id": "2b4a81", + "name": "Country pre", + "id": "f841a8", "type": "categorical", "notes": "", "derived": false, "hidden": false, "description": "" }, - "../variables/02561c/": { - "discarded": false, - "alias": "weight1", - "secure": false, - "name": "weight1", - "id": "02561c", - "type": "numeric", - "notes": "", - "derived": true, - "hidden": false, - "description": "Raked weighting based on: Pet" + "982a6e/": { + "type": "folder", + "name": "Dog Metrics", + "size": 3 }, - "49ef46/": { + "39ec0f/": { + "type": "folder", + "name": "Key Pet Indicators", + "size": 3 + }, + "4e1909/": { "type": "folder", "name": "Details", "size": 1 }, - "../variables/efb6dc/": { - "discarded": false, - "alias": "weight2", + "../variables/608a5e/": { "secure": false, - "name": "weight2", - "id": "efb6dc", - "type": "numeric", + "derived": false, + "id": "608a5e", + "description": "What is your favorite pet?", + "scale": "interval", + "name": "Pet name post", "notes": "", - "derived": true, + "discarded": false, + "alias": "q1_post", "hidden": false, - "description": "Raked weighting based on: Pet" + "type": "categorical" }, - "8be319/": { - "type": "folder", - "name": "Dog Metrics", - "size": 3 + "../variables/a2032f/": { + "discarded": false, + "alias": "country_post", + "secure": false, + "name": "Country post", + "id": "a2032f", + "type": "categorical", + "notes": "", + "derived": false, + "hidden": false, + "description": "" }, - "a90615/": { + "c4ba27/": { "type": "folder", "name": "Dimensions", "size": 2 }, - "../variables/31df7d/": { + "../variables/a41c94/": { "secure": false, "derived": false, - "id": "31df7d", + "id": "a41c94", "description": "What is your favorite pet?", "scale": "interval", "name": "Pet name pre", @@ -87,38 +92,33 @@ "hidden": false, "type": "categorical" }, - "18a467/": { - "type": "folder", - "name": "Key Pet Indicators", - "size": 3 - }, - "../variables/f4549c/": { + "../variables/696951/": { "discarded": false, - "alias": "country_pre", + "alias": "weight2", "secure": false, - "name": "Country pre", - "id": "f4549c", - "type": "categorical", + "name": "weight2", + "id": "696951", + "type": "numeric", "notes": "", - "derived": false, + "derived": true, "hidden": false, - "description": "" + "description": "Raked weighting based on: Pet" } }, "body": { "name": "Root" }, "graph": [ - "18a467/", - "8be319/", - "49ef46/", - "a90615/", - "../variables/02561c/", - "../variables/efb6dc/", - "../variables/31df7d/", - "../variables/834ea1/", - "../variables/f4549c/", - "../variables/2b4a81/" + "39ec0f/", + "982a6e/", + "4e1909/", + "c4ba27/", + "../variables/864b5f/", + "../variables/696951/", + "../variables/a41c94/", + "../variables/608a5e/", + "../variables/f841a8/", + "../variables/a2032f/" ], "size": 15 } diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders/hidden.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders/hidden.json similarity index 89% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders/hidden.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders/hidden.json index 8045873a..c4281a7b 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders/hidden.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders/hidden.json @@ -1,6 +1,6 @@ { "element": "shoji:catalog", - "self": "https://app.crunch.io/api/datasets/72c94d/folders/hidden/", + "self": "https://app.crunch.io/api/datasets/033bb5/folders/hidden/", "index": { "../../variables/000001/": { "discarded": true, diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders/secure.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders/secure.json similarity index 70% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders/secure.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders/secure.json index f7fc23fa..0c37f944 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/folders/secure.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/folders/secure.json @@ -1,6 +1,6 @@ { "element": "shoji:catalog", - "self": "https://app.crunch.io/api/datasets/72c94d/folders/secure/", + "self": "https://app.crunch.io/api/datasets/033bb5/folders/secure/", "index": { }, diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables-babcde-POST.R b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables-372ab2-POST.R similarity index 69% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables-babcde-POST.R rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables-372ab2-POST.R index 92538d10..73f003f3 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables-babcde-POST.R +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables-372ab2-POST.R @@ -1,14 +1,14 @@ -structure(list(url = "https://app.crunch.io/api/datasets/72c94d/multitables/", - status_code = 201L, headers = structure(list(date = "Tue, 20 Oct 2020 03:07:23 GMT", +structure(list(url = "https://app.crunch.io/api/datasets/033bb5/multitables/", + status_code = 201L, headers = structure(list(date = "Fri, 23 Oct 2020 15:38:55 GMT", `content-type` = "application/json;charset=utf-8", `content-length` = "0", - location = "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/", + location = "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/", server = "nginx", vary = "Cookie, Accept-Encoding", allow = "GET, HEAD, OPTIONS, POST", `x-xss-protection` = "1; mode=block", `strict-transport-security` = "max-age=31536000; includeSubDomains", `x-content-type-options` = "nosniff"), class = c("insensitive", "list")), all_headers = list(list(status = 201L, version = "HTTP/2", - headers = structure(list(date = "Tue, 20 Oct 2020 03:07:23 GMT", + headers = structure(list(date = "Fri, 23 Oct 2020 15:38:55 GMT", `content-type` = "application/json;charset=utf-8", - `content-length` = "0", location = "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/", + `content-length` = "0", location = "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/", server = "nginx", vary = "Cookie, Accept-Encoding", allow = "GET, HEAD, OPTIONS, POST", `x-xss-protection` = "1; mode=block", `strict-transport-security` = "max-age=31536000; includeSubDomains", @@ -17,7 +17,7 @@ structure(list(url = "https://app.crunch.io/api/datasets/72c94d/multitables/", flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), - content = charToRaw(""), date = structure(1603163243, class = c("POSIXct", - "POSIXt"), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.6e-05, - connect = 2.6e-05, pretransfer = 8.9e-05, starttransfer = 9e-05, - total = 0.356763)), class = "response") + content = charToRaw(""), date = structure(1603467535, class = c("POSIXct", + "POSIXt"), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.9e-05, + connect = 3e-05, pretransfer = 0.000103, starttransfer = 0.000106, + total = 0.250135)), class = "response") diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables.json similarity index 67% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables.json index 58222088..c3d2e73b 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables.json @@ -1,6 +1,6 @@ { "element": "shoji:catalog", - "self": "https://app.crunch.io/api/datasets/72c94d/multitables/", + "self": "https://app.crunch.io/api/datasets/033bb5/multitables/", "description": "List of multitable definitions for this dataset", "index": { diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657.json similarity index 65% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657.json index 56c0d989..592be5be 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657.json @@ -1,10 +1,10 @@ { "element": "shoji:entity", - "self": "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/", + "self": "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/", "views": { - "applied": "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/applied/", - "tabbook": "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/tabbook/", - "export": "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/export/" + "applied": "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/applied/", + "tabbook": "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/tabbook/", + "export": "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/" }, "description": "Detail information for one multitable definition", "body": { @@ -14,13 +14,13 @@ { "query": [ { - "each": "https://app.crunch.io/api/datasets/72c94d/variables/000000/" + "each": "https://app.crunch.io/api/datasets/033bb5/variables/000000/" }, { "function": "as_selected", "args": [ { - "variable": "https://app.crunch.io/api/datasets/72c94d/variables/000000/" + "variable": "https://app.crunch.io/api/datasets/033bb5/variables/000000/" } ] } @@ -32,6 +32,6 @@ "display_settings": { }, - "id": "c380b7" + "id": "72b657" } } diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7/export-47fdc5-POST.R b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-2bd163-POST.R similarity index 61% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7/export-47fdc5-POST.R rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-2bd163-POST.R index 1358a02a..cb3cf6f0 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7/export-47fdc5-POST.R +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-2bd163-POST.R @@ -1,15 +1,15 @@ -structure(list(url = "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/export/", - status_code = 202L, headers = structure(list(date = "Tue, 20 Oct 2020 03:07:30 GMT", +structure(list(url = "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/", + status_code = 202L, headers = structure(list(date = "Fri, 23 Oct 2020 15:39:00 GMT", `content-type` = "application/json;charset=utf-8", `content-length` = "206", - location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%24a384db/Recontact_dataset.json?Signature=hc9G3h19NHd1WFnZw6JpQgQNkg8%3D&Expires=1603166849&AWSAccessKeyId=AKIA5IDTGVXE5LXTSPMH", + location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%247d069a/Recontact_dataset.json?Signature=qgpVuTvQg%2FBPZfz8nwohLpGWDOo%3D&Expires=1603471140&AWSAccessKeyId=AKIA5IDTGVXEQEM7XZEM", server = "nginx", `content-encoding` = "gzip", vary = "Cookie, Accept-Encoding", allow = "OPTIONS, POST", `x-timing` = "", `x-xss-protection` = "1; mode=block", `strict-transport-security` = "max-age=31536000; includeSubDomains", `x-content-type-options` = "nosniff"), class = c("insensitive", "list")), all_headers = list(list(status = 202L, version = "HTTP/2", - headers = structure(list(date = "Tue, 20 Oct 2020 03:07:30 GMT", + headers = structure(list(date = "Fri, 23 Oct 2020 15:39:00 GMT", `content-type` = "application/json;charset=utf-8", - `content-length` = "206", location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%24a384db/Recontact_dataset.json?Signature=hc9G3h19NHd1WFnZw6JpQgQNkg8%3D&Expires=1603166849&AWSAccessKeyId=AKIA5IDTGVXE5LXTSPMH", + `content-length` = "206", location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%247d069a/Recontact_dataset.json?Signature=qgpVuTvQg%2FBPZfz8nwohLpGWDOo%3D&Expires=1603471140&AWSAccessKeyId=AKIA5IDTGVXEQEM7XZEM", server = "nginx", `content-encoding` = "gzip", vary = "Cookie, Accept-Encoding", allow = "OPTIONS, POST", `x-timing` = "", `x-xss-protection` = "1; mode=block", `strict-transport-security` = "max-age=31536000; includeSubDomains", @@ -18,8 +18,8 @@ structure(list(url = "https://app.crunch.io/api/datasets/72c94d/multitables/c380 flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), - content = charToRaw("{\"element\": \"shoji:view\", \"self\": \"https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/export/\", \"value\": \"https://app.crunch.io/api/progress/\"}"), - date = structure(1603163250, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.8e-05, - connect = 2.8e-05, pretransfer = 9.3e-05, starttransfer = 9.4e-05, - total = 0.671428)), class = "response") + content = charToRaw("{\"element\": \"shoji:view\", \"self\": \"https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/\", \"value\": \"https://app.crunch.io/api/progress/\"}"), + date = structure(1603467540, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.2e-05, + connect = 2.3e-05, pretransfer = 0.000146, starttransfer = 0.000148, + total = 0.548133)), class = "response") diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7/export-c52cfe-POST.R b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-d752af-POST.R similarity index 57% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7/export-c52cfe-POST.R rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-d752af-POST.R index 38b27ae6..5fc207eb 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/multitables/c380b7/export-c52cfe-POST.R +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-d752af-POST.R @@ -1,15 +1,15 @@ -structure(list(url = "https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/export/", - status_code = 202L, headers = structure(list(date = "Tue, 20 Oct 2020 03:07:25 GMT", - `content-type` = "application/json;charset=utf-8", `content-length` = "205", - location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%2405c80a/Recontact_dataset.json?Signature=RpV3yJcnp%2F8QSyk8lVsqS5SgOVQ%3D&Expires=1603166845&AWSAccessKeyId=AKIA5IDTGVXE7MLDN5WX", +structure(list(url = "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/", + status_code = 202L, headers = structure(list(date = "Fri, 23 Oct 2020 15:38:57 GMT", + `content-type` = "application/json;charset=utf-8", `content-length` = "206", + location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json?Signature=hcCpyUaoQ%2BB4JR6Gn%2B91zG8XjdM%3D&Expires=1603471136&AWSAccessKeyId=AKIA5IDTGVXEYUNSLCYN", server = "nginx", `content-encoding` = "gzip", vary = "Cookie, Accept-Encoding", allow = "OPTIONS, POST", `x-timing` = "", `x-xss-protection` = "1; mode=block", `strict-transport-security` = "max-age=31536000; includeSubDomains", `x-content-type-options` = "nosniff"), class = c("insensitive", "list")), all_headers = list(list(status = 202L, version = "HTTP/2", - headers = structure(list(date = "Tue, 20 Oct 2020 03:07:25 GMT", + headers = structure(list(date = "Fri, 23 Oct 2020 15:38:57 GMT", `content-type` = "application/json;charset=utf-8", - `content-length` = "205", location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%2405c80a/Recontact_dataset.json?Signature=RpV3yJcnp%2F8QSyk8lVsqS5SgOVQ%3D&Expires=1603166845&AWSAccessKeyId=AKIA5IDTGVXE7MLDN5WX", + `content-length` = "206", location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json?Signature=hcCpyUaoQ%2BB4JR6Gn%2B91zG8XjdM%3D&Expires=1603471136&AWSAccessKeyId=AKIA5IDTGVXEYUNSLCYN", server = "nginx", `content-encoding` = "gzip", vary = "Cookie, Accept-Encoding", allow = "OPTIONS, POST", `x-timing` = "", `x-xss-protection` = "1; mode=block", `strict-transport-security` = "max-age=31536000; includeSubDomains", @@ -18,8 +18,8 @@ structure(list(url = "https://app.crunch.io/api/datasets/72c94d/multitables/c380 flag = logical(0), path = logical(0), secure = logical(0), expiration = structure(numeric(0), class = c("POSIXct", "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), - content = charToRaw("{\"element\": \"shoji:view\", \"self\": \"https://app.crunch.io/api/datasets/72c94d/multitables/c380b7/export/\", \"value\": \"https://app.crunch.io/api/progress/\"}"), - date = structure(1603163245, class = c("POSIXct", "POSIXt" - ), tzone = "GMT"), times = c(redirect = 0, namelookup = 2.1e-05, - connect = 2.1e-05, pretransfer = 0.000121, starttransfer = 0.000152, - total = 0.63962)), class = "response") + content = charToRaw("{\"element\": \"shoji:view\", \"self\": \"https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/\", \"value\": \"https://app.crunch.io/api/progress/\"}"), + date = structure(1603467537, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 1.9e-05, + connect = 1.9e-05, pretransfer = 8.5e-05, starttransfer = 8.7e-05, + total = 0.568489)), class = "response") diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-d900a8-POST.R b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-d900a8-POST.R new file mode 100644 index 00000000..5fc207eb --- /dev/null +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/multitables/72b657/export-d900a8-POST.R @@ -0,0 +1,25 @@ +structure(list(url = "https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/", + status_code = 202L, headers = structure(list(date = "Fri, 23 Oct 2020 15:38:57 GMT", + `content-type` = "application/json;charset=utf-8", `content-length` = "206", + location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json?Signature=hcCpyUaoQ%2BB4JR6Gn%2B91zG8XjdM%3D&Expires=1603471136&AWSAccessKeyId=AKIA5IDTGVXEYUNSLCYN", + server = "nginx", `content-encoding` = "gzip", vary = "Cookie, Accept-Encoding", + allow = "OPTIONS, POST", `x-timing` = "", `x-xss-protection` = "1; mode=block", + `strict-transport-security` = "max-age=31536000; includeSubDomains", + `x-content-type-options` = "nosniff"), class = c("insensitive", + "list")), all_headers = list(list(status = 202L, version = "HTTP/2", + headers = structure(list(date = "Fri, 23 Oct 2020 15:38:57 GMT", + `content-type` = "application/json;charset=utf-8", + `content-length` = "206", location = "https://player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json?Signature=hcCpyUaoQ%2BB4JR6Gn%2B91zG8XjdM%3D&Expires=1603471136&AWSAccessKeyId=AKIA5IDTGVXEYUNSLCYN", + server = "nginx", `content-encoding` = "gzip", vary = "Cookie, Accept-Encoding", + allow = "OPTIONS, POST", `x-timing` = "", `x-xss-protection` = "1; mode=block", + `strict-transport-security` = "max-age=31536000; includeSubDomains", + `x-content-type-options` = "nosniff"), class = c("insensitive", + "list")))), cookies = structure(list(domain = logical(0), + flag = logical(0), path = logical(0), secure = logical(0), + expiration = structure(numeric(0), class = c("POSIXct", + "POSIXt")), name = logical(0), value = logical(0)), row.names = integer(0), class = "data.frame"), + content = charToRaw("{\"element\": \"shoji:view\", \"self\": \"https://app.crunch.io/api/datasets/033bb5/multitables/72b657/export/\", \"value\": \"https://app.crunch.io/api/progress/\"}"), + date = structure(1603467537, class = c("POSIXct", "POSIXt" + ), tzone = "GMT"), times = c(redirect = 0, namelookup = 1.9e-05, + connect = 1.9e-05, pretransfer = 8.5e-05, starttransfer = 8.7e-05, + total = 0.568489)), class = "response") diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/preferences.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/preferences.json new file mode 100644 index 00000000..9dd90b79 --- /dev/null +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/preferences.json @@ -0,0 +1,7 @@ +{ + "element": "shoji:entity", + "self": "https://app.crunch.io/api/datasets/033bb5/preferences/", + "body": { + "weight": "https://app.crunch.io/api/datasets/033bb5/variables/864b5f/" + } +} diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables-d118fa.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables-d118fa.json similarity index 90% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables-d118fa.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables-d118fa.json index f71db9f4..30648326 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables-d118fa.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables-d118fa.json @@ -1,79 +1,109 @@ { "element": "shoji:catalog", - "self": "https://app.crunch.io/api/datasets/72c94d/variables/?relative=on", + "self": "https://app.crunch.io/api/datasets/033bb5/variables/?relative=on", "catalogs": { - "applied": "https://app.crunch.io/api/datasets/72c94d/variables/applied/", - "private": "https://app.crunch.io/api/datasets/72c94d/variables/private/" + "applied": "https://app.crunch.io/api/datasets/033bb5/variables/applied/", + "private": "https://app.crunch.io/api/datasets/033bb5/variables/private/" }, "orders": { - "personal": "https://app.crunch.io/api/datasets/72c94d/variables/personal/", - "weights": "https://app.crunch.io/api/datasets/72c94d/variables/weights/", - "hier": "https://app.crunch.io/api/datasets/72c94d/variables/hier/" + "personal": "https://app.crunch.io/api/datasets/033bb5/variables/personal/", + "weights": "https://app.crunch.io/api/datasets/033bb5/variables/weights/", + "hier": "https://app.crunch.io/api/datasets/033bb5/variables/hier/" }, "description": "List of Variables of this dataset", "index": { - "2b4a81/": { + "000005/": { "discarded": false, - "alias": "country_post", + "alias": "ndogs_b", "secure": false, - "name": "Country post", - "id": "2b4a81", - "type": "categorical", + "name": "Number of dogs -- Mutts", + "id": "000005", + "type": "numeric", "notes": "", "derived": false, "hidden": false, - "description": "" + "description": "How many dogs do you have?" }, - "000004/": { + "000003/": { "discarded": false, - "alias": "ndogs_a", + "alias": "ndogs", "secure": false, - "name": "Number of dogs -- With papers", - "id": "000004", + "name": "Number of dogs", + "id": "000003", "type": "numeric", "notes": "", "derived": false, "hidden": false, - "description": "How many dogs do you have?" + "description": "" }, - "000005/": { + "000002/": { "discarded": false, - "alias": "ndogs_b", + "alias": "country", "secure": false, - "name": "Number of dogs -- Mutts", - "id": "000005", - "type": "numeric", + "name": "Country", + "id": "000002", + "type": "categorical", "notes": "", "derived": false, "hidden": false, - "description": "How many dogs do you have?" + "description": "" }, - "31df7d/": { + "000000/": { "secure": false, "derived": false, - "id": "31df7d", - "description": "What is your favorite pet?", - "scale": "interval", - "name": "Pet name pre", + "subvariables": [ + "000000/subvariables/0001/", + "000000/subvariables/0002/", + "000000/subvariables/0003/" + ], + "id": "000000", + "description": "Do you have any of these animals as pets? Please select all that apply.", + "subvariables_catalog": "000000/subvariables/", + "uniform_basis": false, + "name": "All pets owned", "notes": "", "discarded": false, - "alias": "q1_pre", + "alias": "allpets", "hidden": false, - "type": "categorical" + "type": "multiple_response" }, - "000007/": { + "a41c94/": { "secure": false, "derived": false, - "id": "000007", + "id": "a41c94", "description": "What is your favorite pet?", "scale": "interval", - "name": "Pet", + "name": "Pet name pre", "notes": "", "discarded": false, - "alias": "q1", + "alias": "q1_pre", "hidden": false, "type": "categorical" }, + "a2032f/": { + "discarded": false, + "alias": "country_post", + "secure": false, + "name": "Country post", + "id": "a2032f", + "type": "categorical", + "notes": "", + "derived": false, + "hidden": false, + "description": "" + }, + "000001/": { + "discarded": true, + "alias": "caseid", + "secure": false, + "name": "Case ID", + "id": "000001", + "type": "numeric", + "notes": "", + "derived": false, + "hidden": true, + "description": "" + }, "000008/": { "discarded": false, "alias": "q3", @@ -86,6 +116,31 @@ "hidden": false, "description": "What is your favorite pet's maiden name?" }, + "f841a8/": { + "discarded": false, + "alias": "country_pre", + "secure": false, + "name": "Country pre", + "id": "f841a8", + "type": "categorical", + "notes": "", + "derived": false, + "hidden": false, + "description": "" + }, + "608a5e/": { + "secure": false, + "derived": false, + "id": "608a5e", + "description": "What is your favorite pet?", + "scale": "interval", + "name": "Pet name post", + "notes": "", + "discarded": false, + "alias": "q1_post", + "hidden": false, + "type": "categorical" + }, "000009/": { "secure": false, "derived": false, @@ -100,16 +155,16 @@ "hidden": false, "type": "datetime" }, - "834ea1/": { + "000007/": { "secure": false, "derived": false, - "id": "834ea1", + "id": "000007", "description": "What is your favorite pet?", "scale": "interval", - "name": "Pet name post", + "name": "Pet", "notes": "", "discarded": false, - "alias": "q1_post", + "alias": "q1", "hidden": false, "type": "categorical" }, @@ -131,91 +186,36 @@ "hidden": false, "type": "categorical_array" }, - "000000/": { - "secure": false, - "derived": false, - "subvariables": [ - "000000/subvariables/0001/", - "000000/subvariables/0002/", - "000000/subvariables/0003/" - ], - "id": "000000", - "description": "Do you have any of these animals as pets? Please select all that apply.", - "subvariables_catalog": "000000/subvariables/", - "uniform_basis": false, - "name": "All pets owned", - "notes": "", - "discarded": false, - "alias": "allpets", - "hidden": false, - "type": "multiple_response" - }, - "000001/": { - "discarded": true, - "alias": "caseid", - "secure": false, - "name": "Case ID", - "id": "000001", - "type": "numeric", - "notes": "", - "derived": false, - "hidden": true, - "description": "" - }, - "f4549c/": { - "discarded": false, - "alias": "country_pre", - "secure": false, - "name": "Country pre", - "id": "f4549c", - "type": "categorical", - "notes": "", - "derived": false, - "hidden": false, - "description": "" - }, - "000003/": { - "discarded": false, - "alias": "ndogs", - "secure": false, - "name": "Number of dogs", - "id": "000003", - "type": "numeric", - "notes": "", - "derived": false, - "hidden": false, - "description": "" - }, - "efb6dc/": { + "696951/": { "discarded": false, "alias": "weight2", "secure": false, "name": "weight2", - "id": "efb6dc", + "id": "696951", "type": "numeric", "notes": "", "derived": true, "hidden": false, "description": "Raked weighting based on: Pet" }, - "000002/": { + "000004/": { "discarded": false, - "alias": "country", + "alias": "ndogs_a", "secure": false, - "name": "Country", - "id": "000002", - "type": "categorical", + "name": "Number of dogs -- With papers", + "id": "000004", + "type": "numeric", "notes": "", "derived": false, "hidden": false, - "description": "" + "description": "How many dogs do you have?" }, - "02561c/": { + "864b5f/": { "discarded": false, "alias": "weight1", "secure": false, "name": "weight1", - "id": "02561c", + "id": "864b5f", "type": "numeric", "notes": "", "derived": true, diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables/000000/subvariables.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables/000000/subvariables.json similarity index 81% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables/000000/subvariables.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables/000000/subvariables.json index 02c4df45..c04c69ba 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables/000000/subvariables.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables/000000/subvariables.json @@ -1,21 +1,21 @@ { "element": "shoji:catalog", - "self": "https://app.crunch.io/api/datasets/72c94d/variables/000000/subvariables/", + "self": "https://app.crunch.io/api/datasets/033bb5/variables/000000/subvariables/", "description": "Contains the subvariables for this array variable.", "index": { - "https://app.crunch.io/api/datasets/72c94d/variables/000000/subvariables/0001/": { + "https://app.crunch.io/api/datasets/033bb5/variables/000000/subvariables/0003/": { "discarded": false, - "alias": "allpets_1", + "alias": "allpets_3", "secure": false, - "name": "Cat", - "id": "0001", + "name": "Bird", + "id": "0003", "type": "categorical", "notes": "", "derived": false, "hidden": false, "description": "" }, - "https://app.crunch.io/api/datasets/72c94d/variables/000000/subvariables/0002/": { + "https://app.crunch.io/api/datasets/033bb5/variables/000000/subvariables/0002/": { "discarded": false, "alias": "allpets_2", "secure": false, @@ -27,12 +27,12 @@ "hidden": false, "description": "" }, - "https://app.crunch.io/api/datasets/72c94d/variables/000000/subvariables/0003/": { + "https://app.crunch.io/api/datasets/033bb5/variables/000000/subvariables/0001/": { "discarded": false, - "alias": "allpets_3", + "alias": "allpets_1", "secure": false, - "name": "Bird", - "id": "0003", + "name": "Cat", + "id": "0001", "type": "categorical", "notes": "", "derived": false, diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables/hier-d118fa.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables/hier-d118fa.json similarity index 82% rename from tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables/hier-d118fa.json rename to tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables/hier-d118fa.json index 9b9f03bb..1e9ce252 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/variables/hier-d118fa.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/033bb5/variables/hier-d118fa.json @@ -1,6 +1,6 @@ { "element": "shoji:order", - "self": "https://app.crunch.io/api/datasets/72c94d/variables/hier/?relative=on", + "self": "https://app.crunch.io/api/datasets/033bb5/variables/hier/?relative=on", "description": "Hierarchical order from folder structure of dataset variables", "graph": [ { @@ -32,12 +32,12 @@ "../000009/" ] }, - "../02561c/", - "../efb6dc/", - "../31df7d/", - "../834ea1/", - "../f4549c/", - "../2b4a81/", + "../864b5f/", + "../696951/", + "../a41c94/", + "../608a5e/", + "../f841a8/", + "../a2032f/", { "__hidden__": [ "../000001/" diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/preferences.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/preferences.json deleted file mode 100644 index 9f31aece..00000000 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/72c94d/preferences.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "element": "shoji:entity", - "self": "https://app.crunch.io/api/datasets/72c94d/preferences/", - "body": { - "weight": "https://app.crunch.io/api/datasets/72c94d/variables/02561c/" - } -} diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/by_name/Recontact%20dataset.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/by_name/Recontact%20dataset.json index b2271b4b..97c806fe 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/by_name/Recontact%20dataset.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/datasets/by_name/Recontact%20dataset.json @@ -3,7 +3,7 @@ "self": "https://app.crunch.io/api/datasets/by_name/Recontact%20dataset/", "description": "Datasets with a given name ", "index": { - "https://app.crunch.io/api/datasets/72c94d/": { + "https://app.crunch.io/api/datasets/033bb5/": { "size": { "rows": 20, "unfiltered_rows": 20, @@ -17,46 +17,18 @@ "streaming": "no", "owner_id": "https://app.crunch.io/api/users/0740cc/", "current_editor": "https://app.crunch.io/api/users/0740cc/", - "creation_time": "2020-10-20T02:53:37.407000+00:00", + "creation_time": "2020-10-23T15:37:47.183000+00:00", "archived": false, "view_of": null, "start_date": null, - "modification_time": "2020-10-20T02:54:12.854000+00:00", - "access_time": "2020-10-20T02:53:37.184000+00:00", + "modification_time": "2020-10-23T15:38:30.901000+00:00", + "access_time": "2020-10-23T15:37:46.967000+00:00", "permissions": { "edit": true, "view": true }, "is_published": true, - "id": "72c94d", - "description": "A dataset to illustrate the API" - }, - "https://app.crunch.io/api/datasets/feddc4/": { - "size": { - "rows": 20, - "unfiltered_rows": 20, - "columns": 16 - }, - "current_editor_name": "Brandon Bertelsen", - "account": "https://app.crunch.io/api/accounts/b7a990/", - "owner_name": "Personal project for Brandon Bertelsen", - "name": "Recontact dataset", - "end_date": null, - "streaming": "no", - "owner_id": "https://app.crunch.io/api/users/0740cc/", - "current_editor": "https://app.crunch.io/api/users/0740cc/", - "creation_time": "2020-10-20T02:36:46.398000+00:00", - "archived": false, - "view_of": null, - "start_date": null, - "modification_time": "2020-10-20T02:51:50.187000+00:00", - "access_time": "2020-10-20T02:51:50.163000+00:00", - "permissions": { - "edit": true, - "view": true - }, - "is_published": true, - "id": "feddc4", + "id": "033bb5", "description": "A dataset to illustrate the API" } } diff --git a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/public/login-POST.json b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/public/login-POST.json index 693b21d1..0567aec8 100644 --- a/tests/testthat/fixtures-1-3-0/app.crunch.io/api/public/login-POST.json +++ b/tests/testthat/fixtures-1-3-0/app.crunch.io/api/public/login-POST.json @@ -1,4 +1,4 @@ { - "access_token": "HDcrWcIvsav3LDX2xLRzhEV264w0F21uAzQg1_eDMyw=", + "access_token": "_ZBMpfYnyfhC5roPJgoJ3dhm0ZRkX9HUUFgohEeMEi8=", "token_type": "Bearer" } diff --git a/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%24a384db/Recontact_dataset.json-3bb969.json b/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%247d069a/Recontact_dataset.json-8edff8.json similarity index 93% rename from tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%24a384db/Recontact_dataset.json-3bb969.json rename to tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%247d069a/Recontact_dataset.json-8edff8.json index e72a52e6..cea163d4 100644 --- a/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%24a384db/Recontact_dataset.json-3bb969.json +++ b/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%247d069a/Recontact_dataset.json-8edff8.json @@ -1,6 +1,6 @@ { "meta": { - "multitable_id": "c380b7", + "multitable_id": "72b657", "user_id": "0740cc", "doc_layout": { "toc": false, @@ -15,7 +15,7 @@ "size": 0 }, "population_size": null, - "dataset_id": "72c94d", + "dataset_id": "033bb5", "description": "A dataset to illustrate the API" }, "template": [ @@ -115,7 +115,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "What is your favorite pet?", @@ -125,54 +124,55 @@ } }, "notes": "", + "name": "Pet name post", "alias": "q1_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Pet name post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": 1, + "missing": false, "id": 1, - "name": "Cat", - "missing": false + "name": "Cat" }, { "numeric_value": 2, + "missing": false, "id": 2, - "name": "Dog", - "missing": false + "name": "Dog" }, { "numeric_value": 3, + "missing": false, "id": 3, - "name": "Bird", - "missing": false + "name": "Bird" }, { "numeric_value": 8, + "missing": true, "id": 8, - "name": "Skipped", - "missing": true + "name": "Skipped" }, { "numeric_value": 9, + "missing": true, "id": 9, - "name": "Not Asked", - "missing": true + "name": "Not Asked" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -256,7 +256,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "What is your favorite pet?", @@ -266,54 +265,55 @@ } }, "notes": "", + "name": "Pet name post", "alias": "q1_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Pet name post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": 1, + "missing": false, "id": 1, - "name": "Cat", - "missing": false + "name": "Cat" }, { "numeric_value": 2, + "missing": false, "id": 2, - "name": "Dog", - "missing": false + "name": "Dog" }, { "numeric_value": 3, + "missing": false, "id": 3, - "name": "Bird", - "missing": false + "name": "Bird" }, { "numeric_value": 8, + "missing": true, "id": 8, - "name": "Skipped", - "missing": true + "name": "Skipped" }, { "numeric_value": 9, + "missing": true, "id": 9, - "name": "Not Asked", - "missing": true + "name": "Not Asked" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -360,14 +360,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -476,14 +476,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, @@ -695,7 +695,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "", @@ -705,54 +704,55 @@ } }, "notes": "", + "name": "Country post", "alias": "country_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Country post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": null, + "missing": false, "id": 1, - "name": "Argentina", - "missing": false + "name": "Argentina" }, { "numeric_value": null, + "missing": false, "id": 2, - "name": "Australia", - "missing": false + "name": "Australia" }, { "numeric_value": null, + "missing": false, "id": 3, - "name": "Austria", - "missing": false + "name": "Austria" }, { "numeric_value": null, + "missing": false, "id": 4, - "name": "Belgium", - "missing": false + "name": "Belgium" }, { "numeric_value": null, + "missing": false, "id": 5, - "name": "Brazil", - "missing": false + "name": "Brazil" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -836,7 +836,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "", @@ -846,54 +845,55 @@ } }, "notes": "", + "name": "Country post", "alias": "country_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Country post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": null, + "missing": false, "id": 1, - "name": "Argentina", - "missing": false + "name": "Argentina" }, { "numeric_value": null, + "missing": false, "id": 2, - "name": "Australia", - "missing": false + "name": "Australia" }, { "numeric_value": null, + "missing": false, "id": 3, - "name": "Austria", - "missing": false + "name": "Austria" }, { "numeric_value": null, + "missing": false, "id": 4, - "name": "Belgium", - "missing": false + "name": "Belgium" }, { "numeric_value": null, + "missing": false, "id": 5, - "name": "Brazil", - "missing": false + "name": "Brazil" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -940,14 +940,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -1056,14 +1056,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, diff --git a/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%2405c80a/Recontact_dataset.json-886f2b.json b/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json-4c663b.json similarity index 95% rename from tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%2405c80a/Recontact_dataset.json-886f2b.json rename to tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json-4c663b.json index de9a0711..42c05433 100644 --- a/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A72c94d%2405c80a/Recontact_dataset.json-886f2b.json +++ b/tests/testthat/fixtures-1-3-0/player-crunch-io.s3.amazonaws.com/export/tabbooks/export_tabbook%3A033bb5%24c4c183/Recontact_dataset.json-4c663b.json @@ -1,6 +1,6 @@ { "meta": { - "multitable_id": "c380b7", + "multitable_id": "72b657", "user_id": "0740cc", "doc_layout": { "toc": false, @@ -15,7 +15,7 @@ "size": 0 }, "population_size": null, - "dataset_id": "72c94d", + "dataset_id": "033bb5", "description": "A dataset to illustrate the API" }, "template": [ @@ -363,14 +363,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -479,14 +479,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, @@ -718,14 +718,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -834,14 +834,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, @@ -963,7 +963,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "What is your favorite pet?", @@ -973,54 +972,55 @@ } }, "notes": "", + "name": "Pet name pre", "alias": "q1_pre", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Pet name pre" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": 1, + "missing": false, "id": 1, - "name": "Cat", - "missing": false + "name": "Cat" }, { "numeric_value": 2, + "missing": false, "id": 2, - "name": "Dog", - "missing": false + "name": "Dog" }, { "numeric_value": 3, + "missing": false, "id": 3, - "name": "Bird", - "missing": false + "name": "Bird" }, { "numeric_value": 8, + "missing": true, "id": 8, - "name": "Skipped", - "missing": true + "name": "Skipped" }, { "numeric_value": 9, + "missing": true, "id": 9, - "name": "Not Asked", - "missing": true + "name": "Not Asked" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -1104,7 +1104,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "What is your favorite pet?", @@ -1114,54 +1113,55 @@ } }, "notes": "", + "name": "Pet name pre", "alias": "q1_pre", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Pet name pre" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": 1, + "missing": false, "id": 1, - "name": "Cat", - "missing": false + "name": "Cat" }, { "numeric_value": 2, + "missing": false, "id": 2, - "name": "Dog", - "missing": false + "name": "Dog" }, { "numeric_value": 3, + "missing": false, "id": 3, - "name": "Bird", - "missing": false + "name": "Bird" }, { "numeric_value": 8, + "missing": true, "id": 8, - "name": "Skipped", - "missing": true + "name": "Skipped" }, { "numeric_value": 9, + "missing": true, "id": 9, - "name": "Not Asked", - "missing": true + "name": "Not Asked" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -1208,14 +1208,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -1324,14 +1324,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, @@ -1543,7 +1543,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "What is your favorite pet?", @@ -1553,54 +1552,55 @@ } }, "notes": "", + "name": "Pet name post", "alias": "q1_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Pet name post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": 1, + "missing": false, "id": 1, - "name": "Cat", - "missing": false + "name": "Cat" }, { "numeric_value": 2, + "missing": false, "id": 2, - "name": "Dog", - "missing": false + "name": "Dog" }, { "numeric_value": 3, + "missing": false, "id": 3, - "name": "Bird", - "missing": false + "name": "Bird" }, { "numeric_value": 8, + "missing": true, "id": 8, - "name": "Skipped", - "missing": true + "name": "Skipped" }, { "numeric_value": 9, + "missing": true, "id": 9, - "name": "Not Asked", - "missing": true + "name": "Not Asked" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -1684,7 +1684,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "What is your favorite pet?", @@ -1694,54 +1693,55 @@ } }, "notes": "", + "name": "Pet name post", "alias": "q1_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Pet name post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": 1, + "missing": false, "id": 1, - "name": "Cat", - "missing": false + "name": "Cat" }, { "numeric_value": 2, + "missing": false, "id": 2, - "name": "Dog", - "missing": false + "name": "Dog" }, { "numeric_value": 3, + "missing": false, "id": 3, - "name": "Bird", - "missing": false + "name": "Bird" }, { "numeric_value": 8, + "missing": true, "id": 8, - "name": "Skipped", - "missing": true + "name": "Skipped" }, { "numeric_value": 9, + "missing": true, "id": 9, - "name": "Not Asked", - "missing": true + "name": "Not Asked" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -1788,14 +1788,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -1904,14 +1904,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, @@ -2123,7 +2123,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "", @@ -2133,54 +2132,55 @@ } }, "notes": "", + "name": "Country pre", "alias": "country_pre", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Country pre" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": null, + "missing": false, "id": 1, - "name": "Argentina", - "missing": false + "name": "Argentina" }, { "numeric_value": null, + "missing": false, "id": 2, - "name": "Australia", - "missing": false + "name": "Australia" }, { "numeric_value": null, + "missing": false, "id": 3, - "name": "Austria", - "missing": false + "name": "Austria" }, { "numeric_value": null, + "missing": false, "id": 4, - "name": "Belgium", - "missing": false + "name": "Belgium" }, { "numeric_value": null, + "missing": false, "id": 5, - "name": "Brazil", - "missing": false + "name": "Brazil" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -2264,7 +2264,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "", @@ -2274,54 +2273,55 @@ } }, "notes": "", + "name": "Country pre", "alias": "country_pre", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Country pre" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": null, + "missing": false, "id": 1, - "name": "Argentina", - "missing": false + "name": "Argentina" }, { "numeric_value": null, + "missing": false, "id": 2, - "name": "Australia", - "missing": false + "name": "Australia" }, { "numeric_value": null, + "missing": false, "id": 3, - "name": "Austria", - "missing": false + "name": "Austria" }, { "numeric_value": null, + "missing": false, "id": 4, - "name": "Belgium", - "missing": false + "name": "Belgium" }, { "numeric_value": null, + "missing": false, "id": 5, - "name": "Brazil", - "missing": false + "name": "Brazil" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -2368,14 +2368,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -2484,14 +2484,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, @@ -2703,7 +2703,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "", @@ -2713,54 +2712,55 @@ } }, "notes": "", + "name": "Country post", "alias": "country_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Country post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": null, + "missing": false, "id": 1, - "name": "Argentina", - "missing": false + "name": "Argentina" }, { "numeric_value": null, + "missing": false, "id": 2, - "name": "Australia", - "missing": false + "name": "Australia" }, { "numeric_value": null, + "missing": false, "id": 3, - "name": "Austria", - "missing": false + "name": "Austria" }, { "numeric_value": null, + "missing": false, "id": 4, - "name": "Belgium", - "missing": false + "name": "Belgium" }, { "numeric_value": null, + "missing": false, "id": 5, - "name": "Brazil", - "missing": false + "name": "Brazil" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -2844,7 +2844,6 @@ "result": { "dimensions": [ { - "derived": false, "references": { "api_derivation": null, "description": "", @@ -2854,54 +2853,55 @@ } }, "notes": "", + "name": "Country post", "alias": "country_post", "view": { "show_counts": false, - "show_numeric_values": false, + "column_width": null, "include_missing": false, - "column_width": null - }, - "name": "Country post" + "show_numeric_values": false + } }, + "derived": false, "type": { "ordinal": false, "class": "categorical", "categories": [ { "numeric_value": null, + "missing": false, "id": 1, - "name": "Argentina", - "missing": false + "name": "Argentina" }, { "numeric_value": null, + "missing": false, "id": 2, - "name": "Australia", - "missing": false + "name": "Australia" }, { "numeric_value": null, + "missing": false, "id": 3, - "name": "Austria", - "missing": false + "name": "Austria" }, { "numeric_value": null, + "missing": false, "id": 4, - "name": "Belgium", - "missing": false + "name": "Belgium" }, { "numeric_value": null, + "missing": false, "id": 5, - "name": "Brazil", - "missing": false + "name": "Brazil" }, { "numeric_value": null, + "missing": true, "id": -1, - "name": "No Data", - "missing": true + "name": "No Data" } ] } @@ -2948,14 +2948,14 @@ } ], "notes": "", + "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - }, - "name": "All pets owned" + } }, "derived": true, "type": { @@ -3064,14 +3064,14 @@ } ], "notes": "", - "name": "All pets owned", "alias": "allpets", "view": { "show_counts": false, "include_noneoftheabove": false, "include_missing": false, "column_width": null - } + }, + "name": "All pets owned" }, "type": { "ordinal": false, diff --git a/tests/testthat/fixtures/recontact_toplines_book.rds b/tests/testthat/fixtures/recontact_toplines_book.rds new file mode 100644 index 00000000..c6ba0d30 Binary files /dev/null and b/tests/testthat/fixtures/recontact_toplines_book.rds differ diff --git a/tests/testthat/test-as_ToplineCategoricalArray.R b/tests/testthat/test-as_ToplineCategoricalArray.R new file mode 100644 index 00000000..8849056e --- /dev/null +++ b/tests/testthat/test-as_ToplineCategoricalArray.R @@ -0,0 +1,3 @@ +test_that("multiplication works", { + expect_equal(2 * 2, 4) +}) diff --git a/tests/testthat/test-recontact_toplines.R b/tests/testthat/test-recontact_toplines.R index 5b9dbfba..14078f21 100644 --- a/tests/testthat/test-recontact_toplines.R +++ b/tests/testthat/test-recontact_toplines.R @@ -63,7 +63,7 @@ with_api_fixture("fixtures-1-3-0", { httpcache::clearCache() test_that("End to end", { ds <- loadDataset("Recontact dataset") - aliases(allVariables(ds)) + # aliases(allVariables(ds)) r <- recontact_toplines( ds,