The function get_adi() calls this function by default as its
final step, but some users may want to calculate ADI values for different
combinations of areas in a given data set. get_adi(raw_data_only
= TRUE) returns the raw census data used to calculate ADI. Users may select
subsets of such a data set and pipe them into calculate_adi().
This function discerns what kind of census data that data contains
(ACS, or one of the decennial censuses) by checking for the existence of key
variables unique to each kind of data set.
Areas listed as having zero households are excluded from ADI calculation.
Their resulting ADIs will be NA.
If calling this function directly (i.e., not via get_adi()) on a data
set that contains median household income (B19013_001) and does not contain
median family income (B19113_001), median household income will be used in
place of median family income, with a warning(). See the "Missingness
and imputation" section of get_adi().