Repository: censusdis/censusdis (language: python)

Issue:
Handling long ID columns
Some datasets have ID columns that are many digits long. For instance, the `H_IDNUM` column in `cps/asec/mar` is 20 digits. When downloading this variable, `download()` throws `OverflowError: Python int too large to convert to C long.`

This is because the function `_coerce_downloaded_variable_types()` tries to cast the downloaded variables as several types, checking for value errors before moving on to the next type.  When it tries to cast the variable as an `int`, the error is an overflow error rather than a value error and so the call fails.

The solution that is easiest is to add Overflow errors to the except clause. I tried this out and it works, with the variable ultimately cast as a `float`. It would also be easy to adapt the logic such that these variables are cast as strings instead, which might be more appropriate. Since very few 'true' numeric variables would actually be too large to cast as an `int`, it is likely that most of the affected variables are ID columns without numeric meaning.


Discussion / hints:

Fix patch:
diff --git a/censusdis/data.py b/censusdis/data.py
index e072f3dc2..5330bdc84 100644
--- a/censusdis/data.py
+++ b/censusdis/data.py
@@ -944,6 +944,9 @@ def _coerce_downloaded_variable_types(
                         df_data[variable] = df_data[variable].astype(
                             float, errors="ignore"
                         )
+                    except OverflowError:
+                        # Some long IDs are actually better handled as strings.
+                        df_data[variable] = df_data[variable].astype(str)
             elif field_type == "float":
                 df_data[variable] = df_data[variable].astype(float)
             elif field_type == "string":
diff --git a/reports/coverage/coverage-badge.svg b/reports/coverage/coverage-badge.svg
index 18e08b0aa..4663fdb69 100644
--- a/reports/coverage/coverage-badge.svg
+++ b/reports/coverage/coverage-badge.svg
@@ -1,1 +1,1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="114" height="20" role="img" aria-label="coverage: 95.09%"><title>coverage: 95.09%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="114" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="53" height="20" fill="#4c1"/><rect width="114" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="315" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">coverage</text><text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">coverage</text><text aria-hidden="true" x="865" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">95.09%</text><text x="865" y="140" transform="scale(.1)" fill="#fff" textLength="430">95.09%</text></g></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="114" height="20" role="img" aria-label="coverage: 95.10%"><title>coverage: 95.10%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="114" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="53" height="20" fill="#4c1"/><rect width="114" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="315" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">coverage</text><text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">coverage</text><text aria-hidden="true" x="865" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">95.10%</text><text x="865" y="140" transform="scale(.1)" fill="#fff" textLength="430">95.10%</text></g></svg>
\ No newline at end of file
diff --git a/reports/coverage/d_1ef9b076751c2c3b___init___py.html b/reports/coverage/d_1ef9b076751c2c3b___init___py.html
index 78494f6c8..aae717dee 100644
--- a/reports/coverage/d_1ef9b076751c2c3b___init___py.html
+++ b/reports/coverage/d_1ef9b076751c2c3b___init___py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b_exceptions_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -89,7 +89,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b_exceptions_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_1ef9b076751c2c3b_exceptions_py.html b/reports/coverage/d_1ef9b076751c2c3b_exceptions_py.html
index 77d78fed8..0c685a9c0 100644
--- a/reports/coverage/d_1ef9b076751c2c3b_exceptions_py.html
+++ b/reports/coverage/d_1ef9b076751c2c3b_exceptions_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b_fetch_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -97,7 +97,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b_fetch_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_1ef9b076751c2c3b_fetch_py.html b/reports/coverage/d_1ef9b076751c2c3b_fetch_py.html
index 5a860a4fa..3810c010c 100644
--- a/reports/coverage/d_1ef9b076751c2c3b_fetch_py.html
+++ b/reports/coverage/d_1ef9b076751c2c3b_fetch_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b_varcache_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -148,7 +148,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b_varcache_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_1ef9b076751c2c3b_varcache_py.html b/reports/coverage/d_1ef9b076751c2c3b_varcache_py.html
index 8f5592e0c..7c2839c6b 100644
--- a/reports/coverage/d_1ef9b076751c2c3b_varcache_py.html
+++ b/reports/coverage/d_1ef9b076751c2c3b_varcache_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_aea9b701da09b1b0___init___py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -782,7 +782,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_aea9b701da09b1b0___init___py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_5a366ca900b21d9c___init___py.html b/reports/coverage/d_5a366ca900b21d9c___init___py.html
index 31130cd56..5059068a7 100644
--- a/reports/coverage/d_5a366ca900b21d9c___init___py.html
+++ b/reports/coverage/d_5a366ca900b21d9c___init___py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_data_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -92,7 +92,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_data_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_5a366ca900b21d9c_data_py.html b/reports/coverage/d_5a366ca900b21d9c_data_py.html
index 8335cee51..f031839be 100644
--- a/reports/coverage/d_5a366ca900b21d9c_data_py.html
+++ b/reports/coverage/d_5a366ca900b21d9c_data_py.html
@@ -54,8 +54,8 @@ <h1>
             </div>
         </aside>
         <h2>
-            <span class="text">212 statements &nbsp;</span>
-            <button type="button" class="run button_toggle_run" value="run" data-shortcut="r" title="Toggle lines run">205<span class="text"> run</span></button>
+            <span class="text">214 statements &nbsp;</span>
+            <button type="button" class="run button_toggle_run" value="run" data-shortcut="r" title="Toggle lines run">207<span class="text"> run</span></button>
             <button type="button" class="mis show_mis button_toggle_mis" value="mis" data-shortcut="m" title="Toggle lines missing">7<span class="text"> missing</span></button>
             <button type="button" class="exc show_exc button_toggle_exc" value="exc" data-shortcut="x" title="Toggle lines excluded">0<span class="text"> excluded</span></button>
         </h2>
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_geography_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -1026,232 +1026,235 @@ <h2>
     <p class="run"><span class="n"><a id="t944" href="#t944">944</a></span><span class="t">                        <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span> <span class="op">=</span> <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span><span class="op">.</span><span class="nam">astype</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t945" href="#t945">945</a></span><span class="t">                            <span class="nam">float</span><span class="op">,</span> <span class="nam">errors</span><span class="op">=</span><span class="str">"ignore"</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t946" href="#t946">946</a></span><span class="t">                        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t947" href="#t947">947</a></span><span class="t">            <span class="key">elif</span> <span class="nam">field_type</span> <span class="op">==</span> <span class="str">"float"</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t948" href="#t948">948</a></span><span class="t">                <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span> <span class="op">=</span> <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span><span class="op">.</span><span class="nam">astype</span><span class="op">(</span><span class="nam">float</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t949" href="#t949">949</a></span><span class="t">            <span class="key">elif</span> <span class="nam">field_type</span> <span class="op">==</span> <span class="str">"string"</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t950" href="#t950">950</a></span><span class="t">                <span class="key">pass</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t951" href="#t951">951</a></span><span class="t">            <span class="key">else</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t952" href="#t952">952</a></span><span class="t">                <span class="com"># Leave it as an object?</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t947" href="#t947">947</a></span><span class="t">                    <span class="key">except</span> <span class="nam">OverflowError</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t948" href="#t948">948</a></span><span class="t">                        <span class="com"># Some long IDs are actually better handled as strings.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t949" href="#t949">949</a></span><span class="t">                        <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span> <span class="op">=</span> <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span><span class="op">.</span><span class="nam">astype</span><span class="op">(</span><span class="nam">str</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t950" href="#t950">950</a></span><span class="t">            <span class="key">elif</span> <span class="nam">field_type</span> <span class="op">==</span> <span class="str">"float"</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t951" href="#t951">951</a></span><span class="t">                <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span> <span class="op">=</span> <span class="nam">df_data</span><span class="op">[</span><span class="nam">variable</span><span class="op">]</span><span class="op">.</span><span class="nam">astype</span><span class="op">(</span><span class="nam">float</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t952" href="#t952">952</a></span><span class="t">            <span class="key">elif</span> <span class="nam">field_type</span> <span class="op">==</span> <span class="str">"string"</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
     <p class="run"><span class="n"><a id="t953" href="#t953">953</a></span><span class="t">                <span class="key">pass</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t954" href="#t954">954</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t955" href="#t955">955</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t956" href="#t956">956</a></span><span class="t"><span class="key">def</span> <span class="nam">_prefetch_variable_types</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t957" href="#t957">957</a></span><span class="t">    <span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t958" href="#t958">958</a></span><span class="t">    <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t959" href="#t959">959</a></span><span class="t">    <span class="nam">download_variables</span><span class="op">:</span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t960" href="#t960">960</a></span><span class="t">    <span class="nam">variable_cache</span><span class="op">:</span> <span class="str">"VariableCache"</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t961" href="#t961">961</a></span><span class="t"><span class="op">)</span> <span class="op">-></span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t962" href="#t962">962</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t963" href="#t963">963</a></span><span class="t"><span class="str">    Prefetch the types of all the variables we are going to try to download.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t964" href="#t964">964</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t965" href="#t965">965</a></span><span class="t"><span class="str">    This enables us to fail fast and have a better error message about the</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t966" href="#t966">966</a></span><span class="t"><span class="str">    root cause of the issue than if we just blindly put in the variable names</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t967" href="#t967">967</a></span><span class="t"><span class="str">    in the census API request and wait for it to fail.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t968" href="#t968">968</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t969" href="#t969">969</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t970" href="#t970">970</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t971" href="#t971">971</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t972" href="#t972">972</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t973" href="#t973">973</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t974" href="#t974">974</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t975" href="#t975">975</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t976" href="#t976">976</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t977" href="#t977">977</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t978" href="#t978">978</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t979" href="#t979">979</a></span><span class="t"><span class="str">    download_variables</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t980" href="#t980">980</a></span><span class="t"><span class="str">        The census variables to download, for example `["NAME", "B01001_001E"]`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t981" href="#t981">981</a></span><span class="t"><span class="str">    variable_cache</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t982" href="#t982">982</a></span><span class="t"><span class="str">        A cache of metadata about variables.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t983" href="#t983">983</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t984" href="#t984">984</a></span><span class="t">    <span class="key">for</span> <span class="nam">variable</span> <span class="key">in</span> <span class="nam">download_variables</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t985" href="#t985">985</a></span><span class="t">        <span class="key">try</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t986" href="#t986">986</a></span><span class="t">            <span class="nam">variable_cache</span><span class="op">.</span><span class="nam">get</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">variable</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t987" href="#t987">987</a></span><span class="t">        <span class="key">except</span> <span class="nam">Exception</span> <span class="key">as</span> <span class="nam">exc</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t988" href="#t988">988</a></span><span class="t">            <span class="nam">census_url</span> <span class="op">=</span> <span class="nam">CensusApiVariableSource</span><span class="op">.</span><span class="nam">url</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t989" href="#t989">989</a></span><span class="t">                <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">variable</span><span class="op">,</span> <span class="nam">response_format</span><span class="op">=</span><span class="str">"html"</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t990" href="#t990">990</a></span><span class="t">            <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t991" href="#t991">991</a></span><span class="t">            <span class="nam">census_variables_url</span> <span class="op">=</span> <span class="nam">CensusApiVariableSource</span><span class="op">.</span><span class="nam">variables_url</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t992" href="#t992">992</a></span><span class="t">                <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">response_format</span><span class="op">=</span><span class="str">"html"</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t954" href="#t954">954</a></span><span class="t">            <span class="key">else</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t955" href="#t955">955</a></span><span class="t">                <span class="com"># Leave it as an object?</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t956" href="#t956">956</a></span><span class="t">                <span class="key">pass</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t957" href="#t957">957</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t958" href="#t958">958</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t959" href="#t959">959</a></span><span class="t"><span class="key">def</span> <span class="nam">_prefetch_variable_types</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t960" href="#t960">960</a></span><span class="t">    <span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t961" href="#t961">961</a></span><span class="t">    <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t962" href="#t962">962</a></span><span class="t">    <span class="nam">download_variables</span><span class="op">:</span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t963" href="#t963">963</a></span><span class="t">    <span class="nam">variable_cache</span><span class="op">:</span> <span class="str">"VariableCache"</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t964" href="#t964">964</a></span><span class="t"><span class="op">)</span> <span class="op">-></span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t965" href="#t965">965</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t966" href="#t966">966</a></span><span class="t"><span class="str">    Prefetch the types of all the variables we are going to try to download.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t967" href="#t967">967</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t968" href="#t968">968</a></span><span class="t"><span class="str">    This enables us to fail fast and have a better error message about the</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t969" href="#t969">969</a></span><span class="t"><span class="str">    root cause of the issue than if we just blindly put in the variable names</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t970" href="#t970">970</a></span><span class="t"><span class="str">    in the census API request and wait for it to fail.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t971" href="#t971">971</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t972" href="#t972">972</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t973" href="#t973">973</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t974" href="#t974">974</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t975" href="#t975">975</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t976" href="#t976">976</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t977" href="#t977">977</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t978" href="#t978">978</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t979" href="#t979">979</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t980" href="#t980">980</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t981" href="#t981">981</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t982" href="#t982">982</a></span><span class="t"><span class="str">    download_variables</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t983" href="#t983">983</a></span><span class="t"><span class="str">        The census variables to download, for example `["NAME", "B01001_001E"]`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t984" href="#t984">984</a></span><span class="t"><span class="str">    variable_cache</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t985" href="#t985">985</a></span><span class="t"><span class="str">        A cache of metadata about variables.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t986" href="#t986">986</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t987" href="#t987">987</a></span><span class="t">    <span class="key">for</span> <span class="nam">variable</span> <span class="key">in</span> <span class="nam">download_variables</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t988" href="#t988">988</a></span><span class="t">        <span class="key">try</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t989" href="#t989">989</a></span><span class="t">            <span class="nam">variable_cache</span><span class="op">.</span><span class="nam">get</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">variable</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t990" href="#t990">990</a></span><span class="t">        <span class="key">except</span> <span class="nam">Exception</span> <span class="key">as</span> <span class="nam">exc</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t991" href="#t991">991</a></span><span class="t">            <span class="nam">census_url</span> <span class="op">=</span> <span class="nam">CensusApiVariableSource</span><span class="op">.</span><span class="nam">url</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t992" href="#t992">992</a></span><span class="t">                <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">variable</span><span class="op">,</span> <span class="nam">response_format</span><span class="op">=</span><span class="str">"html"</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t993" href="#t993">993</a></span><span class="t">            <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t994" href="#t994">994</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t995" href="#t995">995</a></span><span class="t">            <span class="key">raise</span> <span class="nam">CensusApiException</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t996" href="#t996">996</a></span><span class="t">                <span class="str">f"Unable to get metadata on the variable {variable} from the "</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t997" href="#t997">997</a></span><span class="t">                <span class="str">f"dataset {dataset} for year {vintage} from the census API. "</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t998" href="#t998">998</a></span><span class="t">                <span class="str">f"Check the census URL for the variable ({census_url}) to ensure it exists. "</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t999" href="#t999">999</a></span><span class="t">                <span class="str">f"If not found, check {census_variables_url} for all variables in the dataset."</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1000" href="#t1000">1000</a></span><span class="t">            <span class="op">)</span> <span class="key">from</span> <span class="nam">exc</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1001" href="#t1001">1001</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1002" href="#t1002">1002</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1003" href="#t1003">1003</a></span><span class="t"><span class="key">def</span> <span class="nam">_parse_download_variables</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1004" href="#t1004">1004</a></span><span class="t">    <span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1005" href="#t1005">1005</a></span><span class="t">    <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1006" href="#t1006">1006</a></span><span class="t">    <span class="op">*</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1007" href="#t1007">1007</a></span><span class="t">    <span class="nam">download_variables</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">Union</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1008" href="#t1008">1008</a></span><span class="t">    <span class="nam">group</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">Union</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1009" href="#t1009">1009</a></span><span class="t">    <span class="nam">leaves_of_group</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">Union</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1010" href="#t1010">1010</a></span><span class="t">    <span class="nam">skip_annotations</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">True</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1011" href="#t1011">1011</a></span><span class="t">    <span class="nam">variable_cache</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="str">"VariableCache"</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1012" href="#t1012">1012</a></span><span class="t"><span class="op">)</span> <span class="op">-></span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1013" href="#t1013">1013</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1014" href="#t1014">1014</a></span><span class="t"><span class="str">    Parse out the full set of download variables.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1015" href="#t1015">1015</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1016" href="#t1016">1016</a></span><span class="t"><span class="str">    These may be encoded in `download_variables`, `group`, and/or `leaves_of_group`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1017" href="#t1017">1017</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1018" href="#t1018">1018</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1019" href="#t1019">1019</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1020" href="#t1020">1020</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1021" href="#t1021">1021</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1022" href="#t1022">1022</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1023" href="#t1023">1023</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1024" href="#t1024">1024</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1025" href="#t1025">1025</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1026" href="#t1026">1026</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1027" href="#t1027">1027</a></span><span class="t"><span class="str">    download_variables</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1028" href="#t1028">1028</a></span><span class="t"><span class="str">        The census variables to download, for example `["NAME", "B01001_001E"]`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1029" href="#t1029">1029</a></span><span class="t"><span class="str">    group</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1030" href="#t1030">1030</a></span><span class="t"><span class="str">        One or more groups (as defined by the U.S. Census for the data set)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1031" href="#t1031">1031</a></span><span class="t"><span class="str">        whose variable values should be downloaded. These are in addition to</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1032" href="#t1032">1032</a></span><span class="t"><span class="str">        any specified in `download_variables`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1033" href="#t1033">1033</a></span><span class="t"><span class="str">    leaves_of_group</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1034" href="#t1034">1034</a></span><span class="t"><span class="str">        One or more groups (as defined by the U.S. Census for the data set)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1035" href="#t1035">1035</a></span><span class="t"><span class="str">        whose leaf variable values should be downloaded.These are in addition to</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1036" href="#t1036">1036</a></span><span class="t"><span class="str">        any specified in `download_variables` or `group`. See</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1037" href="#t1037">1037</a></span><span class="t"><span class="str">        :py:meth:`VariableCache.group_leaves` for more details on the semantics of</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1038" href="#t1038">1038</a></span><span class="t"><span class="str">        leaves vs. non-leaf group variables.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1039" href="#t1039">1039</a></span><span class="t"><span class="str">    skip_annotations</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1040" href="#t1040">1040</a></span><span class="t"><span class="str">        If `True` try to filter out `group` or `leaves_of_group` variables that are</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1041" href="#t1041">1041</a></span><span class="t"><span class="str">        annotations rather than actual values. See :py:meth:`VariableCache.group_variables`</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1042" href="#t1042">1042</a></span><span class="t"><span class="str">        for more details. Variable names passed in `download_variables` are not</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1043" href="#t1043">1043</a></span><span class="t"><span class="str">        affected by this flag.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1044" href="#t1044">1044</a></span><span class="t"><span class="str">    variable_cache</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1045" href="#t1045">1045</a></span><span class="t"><span class="str">        A cache of metadata about variables.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1046" href="#t1046">1046</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1047" href="#t1047">1047</a></span><span class="t"><span class="str">    Returns</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1048" href="#t1048">1048</a></span><span class="t"><span class="str">    -------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1049" href="#t1049">1049</a></span><span class="t"><span class="str">        The fully expanded list of variables to download.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1050" href="#t1050">1050</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1051" href="#t1051">1051</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1052" href="#t1052">1052</a></span><span class="t">    <span class="com"># Turn the variables we were given into a list if they are not already.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1053" href="#t1053">1053</a></span><span class="t">    <span class="key">if</span> <span class="nam">download_variables</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1054" href="#t1054">1054</a></span><span class="t">        <span class="nam">download_variables</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1055" href="#t1055">1055</a></span><span class="t">    <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">,</span> <span class="nam">str</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1056" href="#t1056">1056</a></span><span class="t">        <span class="nam">download_variables</span> <span class="op">=</span> <span class="op">[</span><span class="nam">download_variables</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1057" href="#t1057">1057</a></span><span class="t">    <span class="key">elif</span> <span class="key">not</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">,</span> <span class="nam">list</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="mis show_mis"><span class="n"><a id="t1058" href="#t1058">1058</a></span><span class="t">        <span class="nam">download_variables</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1059" href="#t1059">1059</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1060" href="#t1060">1060</a></span><span class="t">    <span class="key">if</span> <span class="nam">group</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1061" href="#t1061">1061</a></span><span class="t">        <span class="nam">group</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1062" href="#t1062">1062</a></span><span class="t">    <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">group</span><span class="op">,</span> <span class="nam">str</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1063" href="#t1063">1063</a></span><span class="t">        <span class="nam">group</span> <span class="op">=</span> <span class="op">[</span><span class="nam">group</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1064" href="#t1064">1064</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1065" href="#t1065">1065</a></span><span class="t">    <span class="key">if</span> <span class="nam">leaves_of_group</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1066" href="#t1066">1066</a></span><span class="t">        <span class="nam">leaves_of_group</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1067" href="#t1067">1067</a></span><span class="t">    <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">leaves_of_group</span><span class="op">,</span> <span class="nam">str</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1068" href="#t1068">1068</a></span><span class="t">        <span class="nam">leaves_of_group</span> <span class="op">=</span> <span class="op">[</span><span class="nam">leaves_of_group</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1069" href="#t1069">1069</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1070" href="#t1070">1070</a></span><span class="t">    <span class="com"># Add group variables and leaves as appropriate.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1071" href="#t1071">1071</a></span><span class="t">    <span class="nam">group_variables</span><span class="op">:</span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1072" href="#t1072">1072</a></span><span class="t">    <span class="key">for</span> <span class="nam">group_name</span> <span class="key">in</span> <span class="nam">group</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1073" href="#t1073">1073</a></span><span class="t">        <span class="nam">group_variables</span> <span class="op">=</span> <span class="nam">group_variables</span> <span class="op">+</span> <span class="nam">variable_cache</span><span class="op">.</span><span class="nam">group_variables</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1074" href="#t1074">1074</a></span><span class="t">            <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">group_name</span><span class="op">,</span> <span class="nam">skip_annotations</span><span class="op">=</span><span class="nam">skip_annotations</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1075" href="#t1075">1075</a></span><span class="t">        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1076" href="#t1076">1076</a></span><span class="t">    <span class="nam">group_leaf_variables</span><span class="op">:</span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1077" href="#t1077">1077</a></span><span class="t">    <span class="key">for</span> <span class="nam">group_name</span> <span class="key">in</span> <span class="nam">leaves_of_group</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1078" href="#t1078">1078</a></span><span class="t">        <span class="nam">group_leaf_variables</span> <span class="op">=</span> <span class="nam">group_leaf_variables</span> <span class="op">+</span> <span class="nam">variable_cache</span><span class="op">.</span><span class="nam">group_leaves</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1079" href="#t1079">1079</a></span><span class="t">            <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">group_name</span><span class="op">,</span> <span class="nam">skip_annotations</span><span class="op">=</span><span class="nam">skip_annotations</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1080" href="#t1080">1080</a></span><span class="t">        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1081" href="#t1081">1081</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1082" href="#t1082">1082</a></span><span class="t">    <span class="com"># Concatenate them all.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1083" href="#t1083">1083</a></span><span class="t">    <span class="nam">download_variables</span> <span class="op">=</span> <span class="nam">download_variables</span> <span class="op">+</span> <span class="nam">group_variables</span> <span class="op">+</span> <span class="nam">group_leaf_variables</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t994" href="#t994">994</a></span><span class="t">            <span class="nam">census_variables_url</span> <span class="op">=</span> <span class="nam">CensusApiVariableSource</span><span class="op">.</span><span class="nam">variables_url</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t995" href="#t995">995</a></span><span class="t">                <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">response_format</span><span class="op">=</span><span class="str">"html"</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t996" href="#t996">996</a></span><span class="t">            <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t997" href="#t997">997</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t998" href="#t998">998</a></span><span class="t">            <span class="key">raise</span> <span class="nam">CensusApiException</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t999" href="#t999">999</a></span><span class="t">                <span class="str">f"Unable to get metadata on the variable {variable} from the "</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1000" href="#t1000">1000</a></span><span class="t">                <span class="str">f"dataset {dataset} for year {vintage} from the census API. "</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1001" href="#t1001">1001</a></span><span class="t">                <span class="str">f"Check the census URL for the variable ({census_url}) to ensure it exists. "</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1002" href="#t1002">1002</a></span><span class="t">                <span class="str">f"If not found, check {census_variables_url} for all variables in the dataset."</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1003" href="#t1003">1003</a></span><span class="t">            <span class="op">)</span> <span class="key">from</span> <span class="nam">exc</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1004" href="#t1004">1004</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1005" href="#t1005">1005</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1006" href="#t1006">1006</a></span><span class="t"><span class="key">def</span> <span class="nam">_parse_download_variables</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1007" href="#t1007">1007</a></span><span class="t">    <span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1008" href="#t1008">1008</a></span><span class="t">    <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1009" href="#t1009">1009</a></span><span class="t">    <span class="op">*</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1010" href="#t1010">1010</a></span><span class="t">    <span class="nam">download_variables</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">Union</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1011" href="#t1011">1011</a></span><span class="t">    <span class="nam">group</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">Union</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1012" href="#t1012">1012</a></span><span class="t">    <span class="nam">leaves_of_group</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">Union</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1013" href="#t1013">1013</a></span><span class="t">    <span class="nam">skip_annotations</span><span class="op">:</span> <span class="nam">bool</span> <span class="op">=</span> <span class="key">True</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1014" href="#t1014">1014</a></span><span class="t">    <span class="nam">variable_cache</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="str">"VariableCache"</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1015" href="#t1015">1015</a></span><span class="t"><span class="op">)</span> <span class="op">-></span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1016" href="#t1016">1016</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1017" href="#t1017">1017</a></span><span class="t"><span class="str">    Parse out the full set of download variables.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1018" href="#t1018">1018</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1019" href="#t1019">1019</a></span><span class="t"><span class="str">    These may be encoded in `download_variables`, `group`, and/or `leaves_of_group`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1020" href="#t1020">1020</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1021" href="#t1021">1021</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1022" href="#t1022">1022</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1023" href="#t1023">1023</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1024" href="#t1024">1024</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1025" href="#t1025">1025</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1026" href="#t1026">1026</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1027" href="#t1027">1027</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1028" href="#t1028">1028</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1029" href="#t1029">1029</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1030" href="#t1030">1030</a></span><span class="t"><span class="str">    download_variables</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1031" href="#t1031">1031</a></span><span class="t"><span class="str">        The census variables to download, for example `["NAME", "B01001_001E"]`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1032" href="#t1032">1032</a></span><span class="t"><span class="str">    group</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1033" href="#t1033">1033</a></span><span class="t"><span class="str">        One or more groups (as defined by the U.S. Census for the data set)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1034" href="#t1034">1034</a></span><span class="t"><span class="str">        whose variable values should be downloaded. These are in addition to</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1035" href="#t1035">1035</a></span><span class="t"><span class="str">        any specified in `download_variables`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1036" href="#t1036">1036</a></span><span class="t"><span class="str">    leaves_of_group</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1037" href="#t1037">1037</a></span><span class="t"><span class="str">        One or more groups (as defined by the U.S. Census for the data set)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1038" href="#t1038">1038</a></span><span class="t"><span class="str">        whose leaf variable values should be downloaded.These are in addition to</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1039" href="#t1039">1039</a></span><span class="t"><span class="str">        any specified in `download_variables` or `group`. See</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1040" href="#t1040">1040</a></span><span class="t"><span class="str">        :py:meth:`VariableCache.group_leaves` for more details on the semantics of</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1041" href="#t1041">1041</a></span><span class="t"><span class="str">        leaves vs. non-leaf group variables.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1042" href="#t1042">1042</a></span><span class="t"><span class="str">    skip_annotations</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1043" href="#t1043">1043</a></span><span class="t"><span class="str">        If `True` try to filter out `group` or `leaves_of_group` variables that are</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1044" href="#t1044">1044</a></span><span class="t"><span class="str">        annotations rather than actual values. See :py:meth:`VariableCache.group_variables`</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1045" href="#t1045">1045</a></span><span class="t"><span class="str">        for more details. Variable names passed in `download_variables` are not</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1046" href="#t1046">1046</a></span><span class="t"><span class="str">        affected by this flag.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1047" href="#t1047">1047</a></span><span class="t"><span class="str">    variable_cache</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1048" href="#t1048">1048</a></span><span class="t"><span class="str">        A cache of metadata about variables.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1049" href="#t1049">1049</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1050" href="#t1050">1050</a></span><span class="t"><span class="str">    Returns</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1051" href="#t1051">1051</a></span><span class="t"><span class="str">    -------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1052" href="#t1052">1052</a></span><span class="t"><span class="str">        The fully expanded list of variables to download.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1053" href="#t1053">1053</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1054" href="#t1054">1054</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1055" href="#t1055">1055</a></span><span class="t">    <span class="com"># Turn the variables we were given into a list if they are not already.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1056" href="#t1056">1056</a></span><span class="t">    <span class="key">if</span> <span class="nam">download_variables</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1057" href="#t1057">1057</a></span><span class="t">        <span class="nam">download_variables</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1058" href="#t1058">1058</a></span><span class="t">    <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">,</span> <span class="nam">str</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1059" href="#t1059">1059</a></span><span class="t">        <span class="nam">download_variables</span> <span class="op">=</span> <span class="op">[</span><span class="nam">download_variables</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1060" href="#t1060">1060</a></span><span class="t">    <span class="key">elif</span> <span class="key">not</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">,</span> <span class="nam">list</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="mis show_mis"><span class="n"><a id="t1061" href="#t1061">1061</a></span><span class="t">        <span class="nam">download_variables</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1062" href="#t1062">1062</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1063" href="#t1063">1063</a></span><span class="t">    <span class="key">if</span> <span class="nam">group</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1064" href="#t1064">1064</a></span><span class="t">        <span class="nam">group</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1065" href="#t1065">1065</a></span><span class="t">    <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">group</span><span class="op">,</span> <span class="nam">str</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1066" href="#t1066">1066</a></span><span class="t">        <span class="nam">group</span> <span class="op">=</span> <span class="op">[</span><span class="nam">group</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1067" href="#t1067">1067</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1068" href="#t1068">1068</a></span><span class="t">    <span class="key">if</span> <span class="nam">leaves_of_group</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1069" href="#t1069">1069</a></span><span class="t">        <span class="nam">leaves_of_group</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1070" href="#t1070">1070</a></span><span class="t">    <span class="key">elif</span> <span class="nam">isinstance</span><span class="op">(</span><span class="nam">leaves_of_group</span><span class="op">,</span> <span class="nam">str</span><span class="op">)</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1071" href="#t1071">1071</a></span><span class="t">        <span class="nam">leaves_of_group</span> <span class="op">=</span> <span class="op">[</span><span class="nam">leaves_of_group</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1072" href="#t1072">1072</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1073" href="#t1073">1073</a></span><span class="t">    <span class="com"># Add group variables and leaves as appropriate.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1074" href="#t1074">1074</a></span><span class="t">    <span class="nam">group_variables</span><span class="op">:</span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1075" href="#t1075">1075</a></span><span class="t">    <span class="key">for</span> <span class="nam">group_name</span> <span class="key">in</span> <span class="nam">group</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1076" href="#t1076">1076</a></span><span class="t">        <span class="nam">group_variables</span> <span class="op">=</span> <span class="nam">group_variables</span> <span class="op">+</span> <span class="nam">variable_cache</span><span class="op">.</span><span class="nam">group_variables</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1077" href="#t1077">1077</a></span><span class="t">            <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">group_name</span><span class="op">,</span> <span class="nam">skip_annotations</span><span class="op">=</span><span class="nam">skip_annotations</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1078" href="#t1078">1078</a></span><span class="t">        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1079" href="#t1079">1079</a></span><span class="t">    <span class="nam">group_leaf_variables</span><span class="op">:</span> <span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span> <span class="op">=</span> <span class="op">[</span><span class="op">]</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1080" href="#t1080">1080</a></span><span class="t">    <span class="key">for</span> <span class="nam">group_name</span> <span class="key">in</span> <span class="nam">leaves_of_group</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1081" href="#t1081">1081</a></span><span class="t">        <span class="nam">group_leaf_variables</span> <span class="op">=</span> <span class="nam">group_leaf_variables</span> <span class="op">+</span> <span class="nam">variable_cache</span><span class="op">.</span><span class="nam">group_leaves</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1082" href="#t1082">1082</a></span><span class="t">            <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">group_name</span><span class="op">,</span> <span class="nam">skip_annotations</span><span class="op">=</span><span class="nam">skip_annotations</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1083" href="#t1083">1083</a></span><span class="t">        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t1084" href="#t1084">1084</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1085" href="#t1085">1085</a></span><span class="t">    <span class="com"># Dedup and maintain order.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1086" href="#t1086">1086</a></span><span class="t">    <span class="nam">download_variables</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="nam">dict</span><span class="op">.</span><span class="nam">fromkeys</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">)</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1085" href="#t1085">1085</a></span><span class="t">    <span class="com"># Concatenate them all.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1086" href="#t1086">1086</a></span><span class="t">    <span class="nam">download_variables</span> <span class="op">=</span> <span class="nam">download_variables</span> <span class="op">+</span> <span class="nam">group_variables</span> <span class="op">+</span> <span class="nam">group_leaf_variables</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t1087" href="#t1087">1087</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1088" href="#t1088">1088</a></span><span class="t">    <span class="key">return</span> <span class="nam">download_variables</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1089" href="#t1089">1089</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1088" href="#t1088">1088</a></span><span class="t">    <span class="com"># Dedup and maintain order.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1089" href="#t1089">1089</a></span><span class="t">    <span class="nam">download_variables</span> <span class="op">=</span> <span class="nam">list</span><span class="op">(</span><span class="nam">dict</span><span class="op">.</span><span class="nam">fromkeys</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">)</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t1090" href="#t1090">1090</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1091" href="#t1091">1091</a></span><span class="t"><span class="key">def</span> <span class="nam">census_table_url</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1092" href="#t1092">1092</a></span><span class="t">    <span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1093" href="#t1093">1093</a></span><span class="t">    <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1094" href="#t1094">1094</a></span><span class="t">    <span class="nam">download_variables</span><span class="op">:</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1095" href="#t1095">1095</a></span><span class="t">    <span class="op">*</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1096" href="#t1096">1096</a></span><span class="t">    <span class="nam">api_key</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1097" href="#t1097">1097</a></span><span class="t">    <span class="op">**</span><span class="nam">kwargs</span><span class="op">:</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">InSpecType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1098" href="#t1098">1098</a></span><span class="t"><span class="op">)</span> <span class="op">-></span> <span class="nam">Tuple</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Mapping</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">str</span><span class="op">]</span><span class="op">,</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">BoundGeographyPath</span><span class="op">]</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1099" href="#t1099">1099</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1100" href="#t1100">1100</a></span><span class="t"><span class="str">    Construct the URL to download data from the U.S. Census API.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1101" href="#t1101">1101</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1102" href="#t1102">1102</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1103" href="#t1103">1103</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1104" href="#t1104">1104</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1105" href="#t1105">1105</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1106" href="#t1106">1106</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1107" href="#t1107">1107</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1108" href="#t1108">1108</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1109" href="#t1109">1109</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1110" href="#t1110">1110</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1111" href="#t1111">1111</a></span><span class="t"><span class="str">    download_variables</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1112" href="#t1112">1112</a></span><span class="t"><span class="str">        The census variables to download, for example `["NAME", "B01001_001E"]`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1113" href="#t1113">1113</a></span><span class="t"><span class="str">    api_key</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1114" href="#t1114">1114</a></span><span class="t"><span class="str">        An optional API key. If you don't have or don't use a key, the number</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1115" href="#t1115">1115</a></span><span class="t"><span class="str">        of calls you can make will be limited.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1116" href="#t1116">1116</a></span><span class="t"><span class="str">    kwargs</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1117" href="#t1117">1117</a></span><span class="t"><span class="str">        A specification of the geometry that we want data for.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1118" href="#t1118">1118</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1119" href="#t1119">1119</a></span><span class="t"><span class="str">    Returns</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1120" href="#t1120">1120</a></span><span class="t"><span class="str">    -------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1121" href="#t1121">1121</a></span><span class="t"><span class="str">        The URL, parameters and bound path.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1122" href="#t1122">1122</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1123" href="#t1123">1123</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1124" href="#t1124">1124</a></span><span class="t">    <span class="nam">bound_path</span> <span class="op">=</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">PathSpec</span><span class="op">.</span><span class="nam">partial_prefix_match</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1091" href="#t1091">1091</a></span><span class="t">    <span class="key">return</span> <span class="nam">download_variables</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1092" href="#t1092">1092</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1093" href="#t1093">1093</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1094" href="#t1094">1094</a></span><span class="t"><span class="key">def</span> <span class="nam">census_table_url</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1095" href="#t1095">1095</a></span><span class="t">    <span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1096" href="#t1096">1096</a></span><span class="t">    <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1097" href="#t1097">1097</a></span><span class="t">    <span class="nam">download_variables</span><span class="op">:</span> <span class="nam">Iterable</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1098" href="#t1098">1098</a></span><span class="t">    <span class="op">*</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1099" href="#t1099">1099</a></span><span class="t">    <span class="nam">api_key</span><span class="op">:</span> <span class="nam">Optional</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span> <span class="op">=</span> <span class="key">None</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1100" href="#t1100">1100</a></span><span class="t">    <span class="op">**</span><span class="nam">kwargs</span><span class="op">:</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">InSpecType</span><span class="op">,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1101" href="#t1101">1101</a></span><span class="t"><span class="op">)</span> <span class="op">-></span> <span class="nam">Tuple</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">Mapping</span><span class="op">[</span><span class="nam">str</span><span class="op">,</span> <span class="nam">str</span><span class="op">]</span><span class="op">,</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">BoundGeographyPath</span><span class="op">]</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1102" href="#t1102">1102</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1103" href="#t1103">1103</a></span><span class="t"><span class="str">    Construct the URL to download data from the U.S. Census API.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1104" href="#t1104">1104</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1105" href="#t1105">1105</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1106" href="#t1106">1106</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1107" href="#t1107">1107</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1108" href="#t1108">1108</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1109" href="#t1109">1109</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1110" href="#t1110">1110</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1111" href="#t1111">1111</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1112" href="#t1112">1112</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1113" href="#t1113">1113</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1114" href="#t1114">1114</a></span><span class="t"><span class="str">    download_variables</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1115" href="#t1115">1115</a></span><span class="t"><span class="str">        The census variables to download, for example `["NAME", "B01001_001E"]`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1116" href="#t1116">1116</a></span><span class="t"><span class="str">    api_key</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1117" href="#t1117">1117</a></span><span class="t"><span class="str">        An optional API key. If you don't have or don't use a key, the number</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1118" href="#t1118">1118</a></span><span class="t"><span class="str">        of calls you can make will be limited.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1119" href="#t1119">1119</a></span><span class="t"><span class="str">    kwargs</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1120" href="#t1120">1120</a></span><span class="t"><span class="str">        A specification of the geometry that we want data for.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1121" href="#t1121">1121</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1122" href="#t1122">1122</a></span><span class="t"><span class="str">    Returns</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1123" href="#t1123">1123</a></span><span class="t"><span class="str">    -------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1124" href="#t1124">1124</a></span><span class="t"><span class="str">        The URL, parameters and bound path.</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t1125" href="#t1125">1125</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1126" href="#t1126">1126</a></span><span class="t">    <span class="key">if</span> <span class="nam">bound_path</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="mis show_mis"><span class="n"><a id="t1127" href="#t1127">1127</a></span><span class="t">        <span class="key">raise</span> <span class="nam">CensusApiException</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1128" href="#t1128">1128</a></span><span class="t">            <span class="str">f"Unable to match the geography specification {kwargs}.\n"</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1129" href="#t1129">1129</a></span><span class="t">            <span class="str">f"Supported geographies for dataset='{dataset}' in year={vintage} are:\n"</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1130" href="#t1130">1130</a></span><span class="t">            <span class="op">+</span> <span class="str">"\n"</span><span class="op">.</span><span class="nam">join</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1131" href="#t1131">1131</a></span><span class="t">                <span class="str">f"{path_spec}"</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1132" href="#t1132">1132</a></span><span class="t">                <span class="key">for</span> <span class="nam">path_spec</span> <span class="key">in</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">geo_path_snake_specs</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">)</span><span class="op">.</span><span class="nam">values</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1133" href="#t1133">1133</a></span><span class="t">            <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1134" href="#t1134">1134</a></span><span class="t">        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1135" href="#t1135">1135</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1136" href="#t1136">1136</a></span><span class="t">    <span class="nam">query_spec</span> <span class="op">=</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">CensusGeographyQuerySpec</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1137" href="#t1137">1137</a></span><span class="t">        <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">list</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">)</span><span class="op">,</span> <span class="nam">bound_path</span><span class="op">,</span> <span class="nam">api_key</span><span class="op">=</span><span class="nam">api_key</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1138" href="#t1138">1138</a></span><span class="t">    <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1139" href="#t1139">1139</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1140" href="#t1140">1140</a></span><span class="t">    <span class="nam">url</span><span class="op">,</span> <span class="nam">params</span> <span class="op">=</span> <span class="nam">query_spec</span><span class="op">.</span><span class="nam">table_url</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1141" href="#t1141">1141</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1142" href="#t1142">1142</a></span><span class="t">    <span class="key">return</span> <span class="nam">url</span><span class="op">,</span> <span class="nam">params</span><span class="op">,</span> <span class="nam">bound_path</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1143" href="#t1143">1143</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1126" href="#t1126">1126</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1127" href="#t1127">1127</a></span><span class="t">    <span class="nam">bound_path</span> <span class="op">=</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">PathSpec</span><span class="op">.</span><span class="nam">partial_prefix_match</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="op">**</span><span class="nam">kwargs</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1128" href="#t1128">1128</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1129" href="#t1129">1129</a></span><span class="t">    <span class="key">if</span> <span class="nam">bound_path</span> <span class="key">is</span> <span class="key">None</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="mis show_mis"><span class="n"><a id="t1130" href="#t1130">1130</a></span><span class="t">        <span class="key">raise</span> <span class="nam">CensusApiException</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1131" href="#t1131">1131</a></span><span class="t">            <span class="str">f"Unable to match the geography specification {kwargs}.\n"</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1132" href="#t1132">1132</a></span><span class="t">            <span class="str">f"Supported geographies for dataset='{dataset}' in year={vintage} are:\n"</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1133" href="#t1133">1133</a></span><span class="t">            <span class="op">+</span> <span class="str">"\n"</span><span class="op">.</span><span class="nam">join</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1134" href="#t1134">1134</a></span><span class="t">                <span class="str">f"{path_spec}"</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1135" href="#t1135">1135</a></span><span class="t">                <span class="key">for</span> <span class="nam">path_spec</span> <span class="key">in</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">geo_path_snake_specs</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">)</span><span class="op">.</span><span class="nam">values</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1136" href="#t1136">1136</a></span><span class="t">            <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1137" href="#t1137">1137</a></span><span class="t">        <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1138" href="#t1138">1138</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1139" href="#t1139">1139</a></span><span class="t">    <span class="nam">query_spec</span> <span class="op">=</span> <span class="nam">cgeo</span><span class="op">.</span><span class="nam">CensusGeographyQuerySpec</span><span class="op">(</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1140" href="#t1140">1140</a></span><span class="t">        <span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">,</span> <span class="nam">list</span><span class="op">(</span><span class="nam">download_variables</span><span class="op">)</span><span class="op">,</span> <span class="nam">bound_path</span><span class="op">,</span> <span class="nam">api_key</span><span class="op">=</span><span class="nam">api_key</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1141" href="#t1141">1141</a></span><span class="t">    <span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1142" href="#t1142">1142</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1143" href="#t1143">1143</a></span><span class="t">    <span class="nam">url</span><span class="op">,</span> <span class="nam">params</span> <span class="op">=</span> <span class="nam">query_spec</span><span class="op">.</span><span class="nam">table_url</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
     <p class="pln"><span class="n"><a id="t1144" href="#t1144">1144</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1145" href="#t1145">1145</a></span><span class="t"><span class="key">def</span> <span class="nam">geographies</span><span class="op">(</span><span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">)</span> <span class="op">-></span> <span class="nam">List</span><span class="op">[</span><span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1146" href="#t1146">1146</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1147" href="#t1147">1147</a></span><span class="t"><span class="str">    What geographies are supported for a dataset and vintage?</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1148" href="#t1148">1148</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1149" href="#t1149">1149</a></span><span class="t"><span class="str">    This utility gives us a list of the different geography</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1150" href="#t1150">1150</a></span><span class="t"><span class="str">    keywords we can use in calls to :py:func:`download` with</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1151" href="#t1151">1151</a></span><span class="t"><span class="str">    for the given dataset and vintage.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1152" href="#t1152">1152</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1153" href="#t1153">1153</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1154" href="#t1154">1154</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1155" href="#t1155">1155</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1156" href="#t1156">1156</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1157" href="#t1157">1157</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1158" href="#t1158">1158</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1159" href="#t1159">1159</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1160" href="#t1160">1160</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1161" href="#t1161">1161</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1162" href="#t1162">1162</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1163" href="#t1163">1163</a></span><span class="t"><span class="str">    Returns</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1164" href="#t1164">1164</a></span><span class="t"><span class="str">    -------</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1165" href="#t1165">1165</a></span><span class="t"><span class="str">        A list of lists of geography keywords. Each element</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1166" href="#t1166">1166</a></span><span class="t"><span class="str">        of the outer list is a list of keywords that can be</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1167" href="#t1167">1167</a></span><span class="t"><span class="str">        used together.</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1168" href="#t1168">1168</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
-    <p class="mis show_mis"><span class="n"><a id="t1169" href="#t1169">1169</a></span><span class="t">    <span class="key">return</span> <span class="nam">list</span><span class="op">(</span><span class="nam">cgeo</span><span class="op">.</span><span class="nam">geo_path_snake_specs</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">)</span><span class="op">.</span><span class="nam">values</span><span class="op">(</span><span class="op">)</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1170" href="#t1170">1170</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="pln"><span class="n"><a id="t1171" href="#t1171">1171</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
-    <p class="run"><span class="n"><a id="t1172" href="#t1172">1172</a></span><span class="t"><span class="nam">variables</span> <span class="op">=</span> <span class="nam">VariableCache</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1145" href="#t1145">1145</a></span><span class="t">    <span class="key">return</span> <span class="nam">url</span><span class="op">,</span> <span class="nam">params</span><span class="op">,</span> <span class="nam">bound_path</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1146" href="#t1146">1146</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1147" href="#t1147">1147</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1148" href="#t1148">1148</a></span><span class="t"><span class="key">def</span> <span class="nam">geographies</span><span class="op">(</span><span class="nam">dataset</span><span class="op">:</span> <span class="nam">str</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">:</span> <span class="nam">VintageType</span><span class="op">)</span> <span class="op">-></span> <span class="nam">List</span><span class="op">[</span><span class="nam">List</span><span class="op">[</span><span class="nam">str</span><span class="op">]</span><span class="op">]</span><span class="op">:</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1149" href="#t1149">1149</a></span><span class="t">    <span class="str">"""</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1150" href="#t1150">1150</a></span><span class="t"><span class="str">    What geographies are supported for a dataset and vintage?</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1151" href="#t1151">1151</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1152" href="#t1152">1152</a></span><span class="t"><span class="str">    This utility gives us a list of the different geography</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1153" href="#t1153">1153</a></span><span class="t"><span class="str">    keywords we can use in calls to :py:func:`download` with</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1154" href="#t1154">1154</a></span><span class="t"><span class="str">    for the given dataset and vintage.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1155" href="#t1155">1155</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1156" href="#t1156">1156</a></span><span class="t"><span class="str">    Parameters</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1157" href="#t1157">1157</a></span><span class="t"><span class="str">    ----------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1158" href="#t1158">1158</a></span><span class="t"><span class="str">    dataset</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1159" href="#t1159">1159</a></span><span class="t"><span class="str">        The dataset to download from. For example `"acs/acs5"`,</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1160" href="#t1160">1160</a></span><span class="t"><span class="str">        `"dec/pl"`, or `"timeseries/poverty/saipe/schdist"`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1161" href="#t1161">1161</a></span><span class="t"><span class="str">    vintage</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1162" href="#t1162">1162</a></span><span class="t"><span class="str">        The vintage to download data for. For most data sets this is</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1163" href="#t1163">1163</a></span><span class="t"><span class="str">        an integer year, for example, `2020`. But for</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1164" href="#t1164">1164</a></span><span class="t"><span class="str">        a timeseries data set, pass the string `'timeseries'`.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1165" href="#t1165">1165</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1166" href="#t1166">1166</a></span><span class="t"><span class="str">    Returns</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1167" href="#t1167">1167</a></span><span class="t"><span class="str">    -------</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1168" href="#t1168">1168</a></span><span class="t"><span class="str">        A list of lists of geography keywords. Each element</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1169" href="#t1169">1169</a></span><span class="t"><span class="str">        of the outer list is a list of keywords that can be</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1170" href="#t1170">1170</a></span><span class="t"><span class="str">        used together.</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1171" href="#t1171">1171</a></span><span class="t"><span class="str">    """</span>&nbsp;</span><span class="r"></span></p>
+    <p class="mis show_mis"><span class="n"><a id="t1172" href="#t1172">1172</a></span><span class="t">    <span class="key">return</span> <span class="nam">list</span><span class="op">(</span><span class="nam">cgeo</span><span class="op">.</span><span class="nam">geo_path_snake_specs</span><span class="op">(</span><span class="nam">dataset</span><span class="op">,</span> <span class="nam">vintage</span><span class="op">)</span><span class="op">.</span><span class="nam">values</span><span class="op">(</span><span class="op">)</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1173" href="#t1173">1173</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="pln"><span class="n"><a id="t1174" href="#t1174">1174</a></span><span class="t">&nbsp;</span><span class="r"></span></p>
+    <p class="run"><span class="n"><a id="t1175" href="#t1175">1175</a></span><span class="t"><span class="nam">variables</span> <span class="op">=</span> <span class="nam">VariableCache</span><span class="op">(</span><span class="op">)</span>&nbsp;</span><span class="r"></span></p>
 </main>
 <footer>
     <div class="content">
@@ -1261,7 +1264,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_geography_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_5a366ca900b21d9c_geography_py.html b/reports/coverage/d_5a366ca900b21d9c_geography_py.html
index 7c2f918b0..774a680d9 100644
--- a/reports/coverage/d_5a366ca900b21d9c_geography_py.html
+++ b/reports/coverage/d_5a366ca900b21d9c_geography_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b___init___py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -462,7 +462,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_1ef9b076751c2c3b___init___py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_5a366ca900b21d9c_maps_py.html b/reports/coverage/d_5a366ca900b21d9c_maps_py.html
index dc52d1bd6..d8d777101 100644
--- a/reports/coverage/d_5a366ca900b21d9c_maps_py.html
+++ b/reports/coverage/d_5a366ca900b21d9c_maps_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_c7b4b9502c408abc___init___py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -1185,7 +1185,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_c7b4b9502c408abc___init___py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_5a366ca900b21d9c_states_py.html b/reports/coverage/d_5a366ca900b21d9c_states_py.html
index 497a2a944..3862dd897 100644
--- a/reports/coverage/d_5a366ca900b21d9c_states_py.html
+++ b/reports/coverage/d_5a366ca900b21d9c_states_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_values_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -533,7 +533,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_values_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_5a366ca900b21d9c_values_py.html b/reports/coverage/d_5a366ca900b21d9c_values_py.html
index 14ea68bdc..75ac07cc5 100644
--- a/reports/coverage/d_5a366ca900b21d9c_values_py.html
+++ b/reports/coverage/d_5a366ca900b21d9c_values_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="index.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -155,7 +155,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="index.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_aea9b701da09b1b0___init___py.html b/reports/coverage/d_aea9b701da09b1b0___init___py.html
index dafb6343c..df873cc50 100644
--- a/reports/coverage/d_aea9b701da09b1b0___init___py.html
+++ b/reports/coverage/d_aea9b701da09b1b0___init___py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_aea9b701da09b1b0_base_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -89,7 +89,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_aea9b701da09b1b0_base_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_aea9b701da09b1b0_base_py.html b/reports/coverage/d_aea9b701da09b1b0_base_py.html
index f58dfd58b..82fa3ed98 100644
--- a/reports/coverage/d_aea9b701da09b1b0_base_py.html
+++ b/reports/coverage/d_aea9b701da09b1b0_base_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_aea9b701da09b1b0_censusapi_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -270,7 +270,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_aea9b701da09b1b0_censusapi_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_aea9b701da09b1b0_censusapi_py.html b/reports/coverage/d_aea9b701da09b1b0_censusapi_py.html
index 22d4bcf15..ed549bf79 100644
--- a/reports/coverage/d_aea9b701da09b1b0_censusapi_py.html
+++ b/reports/coverage/d_aea9b701da09b1b0_censusapi_py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_maps_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -270,7 +270,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_maps_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/d_c7b4b9502c408abc___init___py.html b/reports/coverage/d_c7b4b9502c408abc___init___py.html
index 45cc9dc3e..edbec1ffd 100644
--- a/reports/coverage/d_c7b4b9502c408abc___init___py.html
+++ b/reports/coverage/d_c7b4b9502c408abc___init___py.html
@@ -65,7 +65,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_states_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
         <aside class="hidden">
             <button type="button" class="button_next_chunk" data-shortcut="j"/>
@@ -89,7 +89,7 @@ <h2>
             <a id="nextFileLink" class="nav" href="d_5a366ca900b21d9c_states_py.html">&#xbb; next</a>
             &nbsp; &nbsp; &nbsp;
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </footer>
diff --git a/reports/coverage/index.html b/reports/coverage/index.html
index fa2a113e2..abb7c8ab5 100644
--- a/reports/coverage/index.html
+++ b/reports/coverage/index.html
@@ -45,7 +45,7 @@ <h1>Coverage report:
         </form>
         <p class="text">
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
 </header>
@@ -70,10 +70,10 @@ <h1>Coverage report:
             </tr>
             <tr class="file">
                 <td class="name left"><a href="d_5a366ca900b21d9c_data_py.html">censusdis/data.py</a></td>
-                <td>212</td>
+                <td>214</td>
                 <td>7</td>
                 <td>0</td>
-                <td class="right" data-ratio="205 212">97%</td>
+                <td class="right" data-ratio="207 214">97%</td>
             </tr>
             <tr class="file">
                 <td class="name left"><a href="d_5a366ca900b21d9c_geography_py.html">censusdis/geography.py</a></td>
@@ -163,10 +163,10 @@ <h1>Coverage report:
         <tfoot>
             <tr class="total">
                 <td class="name left">Total</td>
-                <td>1059</td>
+                <td>1061</td>
                 <td>52</td>
                 <td>0</td>
-                <td class="right" data-ratio="1007 1059">95%</td>
+                <td class="right" data-ratio="1009 1061">95%</td>
             </tr>
         </tfoot>
     </table>
@@ -178,7 +178,7 @@ <h1>Coverage report:
     <div class="content">
         <p>
             <a class="nav" href="https://coverage.readthedocs.io">coverage.py v6.5.0</a>,
-            created at 2023-05-19 13:19 +0000
+            created at 2023-06-03 13:13 +0000
         </p>
     </div>
     <aside class="hidden">


Test patch:
diff --git a/reports/junit/tests-badge.svg b/reports/junit/tests-badge.svg
index 747a1f97e..a14e9a953 100644
--- a/reports/junit/tests-badge.svg
+++ b/reports/junit/tests-badge.svg
@@ -1,1 +1,1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="20" role="img" aria-label="tests: 94"><title>tests: 94</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="60" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="37" height="20" fill="#555"/><rect x="37" width="23" height="20" fill="#4c1"/><rect width="60" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="195" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="270">tests</text><text x="195" y="140" transform="scale(.1)" fill="#fff" textLength="270">tests</text><text aria-hidden="true" x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="130">94</text><text x="475" y="140" transform="scale(.1)" fill="#fff" textLength="130">94</text></g></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="20" role="img" aria-label="tests: 95"><title>tests: 95</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="60" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="37" height="20" fill="#555"/><rect x="37" width="23" height="20" fill="#4c1"/><rect width="60" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="195" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="270">tests</text><text x="195" y="140" transform="scale(.1)" fill="#fff" textLength="270">tests</text><text aria-hidden="true" x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="130">95</text><text x="475" y="140" transform="scale(.1)" fill="#fff" textLength="130">95</text></g></svg>
\ No newline at end of file
diff --git a/tests/test_integration.py b/tests/test_integration.py
index 6a3edeefc..d4adbc90e 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -5,6 +5,7 @@
 these tests actually call the census API itself to cover the bits of code
 immediately around those calls.
 """
+
 import tempfile
 import unittest
 from pathlib import Path
@@ -1087,5 +1088,24 @@ def test_multi_year_no_maps(self):
         self.assertTrue(gdf_inferred_geometry_multi_year["geometry"].isnull().all())
 
 
+class LongIdTestCase(unittest.TestCase):
+    """
+    This is a test of long IDs.
+
+    Sometimes the metadata says a variable is an int, but it is
+    too long to fit into one. So we fall back on treating it like
+    a string.
+
+    We used to fail to do this as described in issue #98.
+    """
+
+    def test_cps_asec_mar(self):
+        df_cps_asec_mar = ced.download("cps/asec/mar", 2020, "H_IDNUM", state="*")
+
+        self.assertEqual(2, len(df_cps_asec_mar.columns))
+        self.assertIn("STATE", df_cps_asec_mar.columns)
+        self.assertIn("H_IDNUM", df_cps_asec_mar.columns)
+
+
 if __name__ == "__main__":
     unittest.main()
diff --git a/tests/test_maps.py b/tests/test_maps.py
index d4e127ac5..6a5d59b02 100644
--- a/tests/test_maps.py
+++ b/tests/test_maps.py
@@ -128,7 +128,7 @@ def test_closest_epsg(self):
 
             self.assertEqual(expected_epsg, epsg)
 
-    def assert_structurally_similar(self, file0, file1, threshold: float = 0.99):
+    def assert_structurally_similar(self, file0, file1, threshold: float = 0.98):
         """
         Assert that the images stored in two files are structurally similar.