%% BioMed_Central_Tex_Template_v1.06     %%
%%                                       %%
%%  bmc_article.tex            ver: 1.06 %%
%%                                       %%

%%IMPORTANT: do not delete the first line of this template
%%It must be present to enable the BMC Submission system to
%%recognise this template!!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                     %%
%%  LaTeX template for BioMed Central  %%
%%     journal article submissions     %%
%%                                     %%
%%          <8 June 2012>              %%
%%                                     %%
%%                                     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                 %%
%% For instructions on how to fill out this Tex template           %%
%% document please refer to Readme.html and the instructions for   %%
%% authors page on the biomed central website                      %%
%% http://www.biomedcentral.com/info/authors/                      %%
%%                                                                 %%
%% Please do not use \input{...} to include other tex files.       %%
%% Submit your LaTeX manuscript as one .tex document.              %%
%%                                                                 %%
%% All additional figures and files should be attached             %%
%% separately and not embedded in the \TeX\ document itself.       %%
%%                                                                 %%
%% BioMed Central currently use the MikTex distribution of         %%
%% TeX for Windows) of TeX and LaTeX.  This is available from      %%
%% http://www.miktex.org                                           %%
%%                                                                 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% additional documentclass options:
%  [doublespacing]
%  [linenumbers]   - put the line numbers on margins

%%% loading packages, author definitions

%\documentclass[twocolumn]{bmcart}% uncomment this for two column layout and comment line below
\documentclass{bmcart}

%%% Load packages
\usepackage{amsthm,amsmath}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{lmodern}
\usepackage{float}
\usepackage{algorithm}% http://ctan.org/pkg/algorithm
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx

%\RequirePackage{natbib}
%\RequirePackage[authoryear]{natbib}% uncomment this for author-year bibliography
%\RequirePackage{hyperref}
\usepackage[utf8]{inputenc} %unicode support
%\usepackage[applemac]{inputenc} %applemac support if unicode package fails
%\usepackage[latin1]{inputenc} %UNIX support if unicode package fails


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                             %%
%%  If you wish to display your graphics for   %%
%%  your own use using includegraphic or       %%
%%  includegraphics, then comment out the      %%
%%  following two lines of code.               %%
%%  NB: These line *must* be included when     %%
%%  submitting to BMC.                         %%
%%  All figure files must be submitted as      %%
%%  separate graphics through the BMC          %%
%%  submission process, not included in the    %%
%%  submitted article.                         %%
%%                                             %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\def\includegraphic{}
\def\includegraphics{}



%%% Put your definitions there:
\startlocaldefs
\endlocaldefs


%%% Begin ...
\begin{document}

%%% Start of article front matter
\begin{frontmatter}

\begin{fmbox}
\dochead{Research}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% Enter the title of your article here     %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{Building a Sanitary Vulnerability Map from Open Source Data. Argentina, 2010-2018}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% Enter the authors here                   %%
%%                                          %%
%% Specify information, if available,       %%
%% in the form:                             %%
%%   <key>={<id1>,<id2>}                    %%
%%   <key>=                                 %%
%% Comment or delete the keys which are     %%
%% not used. Repeat \author command as much %%
%% as required.                             %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\author[
   addressref={aff1,aff2,aff3},                   % id's of addresses, e.g. {aff1,aff2}
   corref={aff1},                       % id of corresponding address, if any
   noteref={n1},                        % id's of article notes, if any
   email={grosati@unsam.edu.ar}   % email address
]{\inits{GR}\fnm{Germán} \snm{Rosati}}
\author[
   addressref={aff2},
   noteref={n1}, 
   email={olegotomas@gmail.com}
]{\inits{TAO}\fnm{Tomás Alberto} \snm{Olego}}
\author[
	addressref={aff2},
	noteref={n1}, 
	email={vazquezbrust.h@northeastern.edu}
]{\inits{HAVB}\fnm{H. Antonio} \snm{Vazquez Brust}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% Enter the authors' addresses here        %%
%%                                          %%
%% Repeat \address commands as much as      %%
%% required.                                %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\address[id=aff1]{%                           % unique id
  \orgname{National Council of Scientific and Technical Research, CONICET}, % university, etc
  \street{Godoy Cruz 2290},                     %
  \postcode{C1425FQB},                            % post or zip code
  \city{Buenos Aires},                              % city
  \cny{Argentina}                                    % country
}
\address[id=aff2]{%
  \orgname{Bunge I\& Born Foundation},
  \street{25 de Mayo 501 6º Piso},
  \postcode{C1425FQB},
  \city{Buenos Aires},
  \cny{Argentina}
}
\address[id=aff3]{%
	\orgname{Institute for High Social Studies, University of San Martín},
	\street{25 de Mayo y Francia},
	\postcode{1650}
	\city{San Martín},
	\cny{Argentina}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% Enter short notes here                   %%
%%                                          %%
%% Short notes will be after addresses      %%
%% on first page.                           %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{artnotes}
%\note{Sample of title note}     % note to the article
\note[id=n1]{Equal contributor} % note, connected to author
\end{artnotes}

\end{fmbox}% comment this for two column layout

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% The Abstract begins here                 %%
%%                                          %%
%% Please refer to the Instructions for     %%
%% authors on http://www.biomedcentral.com  %%
%% and include the section headings         %%
%% accordingly for your article type.       %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{abstractbox}

\begin{abstract} % abstract
	\begin{itemize} 	
	\item \textbf{Background:} Designing public health policies to target the needs of specific places requires highly granular data. When geographic health statistics from official sources are absent or lacking in spatial detail, Sanitary Vulnerability metrics derived from Census and other georeferenced public data can be used to identify areas in particular need of attention. With that aim, a Vulnerability Map was developed, identifying areas with a substantial deficit in its population health coverage.\\
	\item \textbf{Methods:} Census, official listings of public health facilities and crowdsourced georeferenced data are used. The Vulnerability Index is built using dimensionality reduction techniques such as Autoencoders and Non-parametric PCA. \\
	\item \textbf{Main results:} The high resolution map shows the geographical distribution of a Sanitary Vulnerability Index, produced using official and crowdsourced open data sources, overcoming the lack of official sources on health indicators at the local level.
	\item \textbf{Conclusions:} The Sanitary Vulnerability Map's value as a tool for place specific policymaking was validated by using it to predict local health related metrics such as health coverage. Further lines of work contemplate using the Map to study the interaction between Sanitary Vulnerability and the prevalence of different diseases, and  also applying its methodology in the context of other public services such as education, security, housing, etc.
	\end{itemize}                                                        
\parttitle{First part title} %if any                                 
Building a Sanitary Vulnerability Map from Open Source Data          
                                                                     
\parttitle{Second part title} %if any                                
Argentina, 2010-2018                                                 
\end{abstract}                                                       
                                                                     
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% The keywords begin here                  %%
%%                                          %%
%% Put each keyword in separate \kwd{}.     %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{keyword}
\kwd{sample}
\kwd{article}
\kwd{Health, Vulnerability, Census, Public Policy, Open Data}
\end{keyword}

% MSC classifications codes, if any
%\begin{keyword}[class=AMS]
%\kwd[Primary ]{}
%\kwd{}
%\kwd[; secondary ]{}
%\end{keyword}

\end{abstractbox}
%
%\end{fmbox}% uncomment this for twcolumn layout

\end{frontmatter}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% The Main Body begins here                %%
%%                                          %%
%% Please refer to the instructions for     %%
%% authors on:                              %%
%% http://www.biomedcentral.com/info/authors%%
%% and include the section headings         %%
%% accordingly for your article type.       %%
%%                                          %%
%% See the Results and Discussion section   %%
%% for details on how to create sub-sections%%
%%                                          %%
%% use \cite{...} to cite references        %%
%%  \cite{koon} and                         %%
%%  \cite{oreg,khar,zvai,xjon,schn,pond}    %%
%%  \nocite{smith,marg,hunn,advi,koha,mouse}%%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%% start of article main body
% <put your article body there>

%%%%%%%%%%%%%%%%
%% Background %%
%%
%%\section*{Content}
%%Text and results for this section, as per the individual journal's instructions for authors. 
%\cite{koon,oreg,khar,zvai,xjon,schn,pond,smith,marg,hunn,advi,koha,mouse}

\section*{Background}
The notion of Sanitary Vulnerability is related with health determinants. In other words, there are certain factors and variables that are strongly linked with the health status - in an broad fashion, in terms of biology, psychology and social aspects- of a person or population. These determinants can be of different types and if they are absent or weak, a state of vulnerability occurs. 

We built an indicator that tries to identify places where high Sanitary Vulnerability prevails. That is, places where it is not possible to attain the minimum threshold in terms of access to health services. To do so, articulating an operative definition of Sanitary Vulnerability is an important first step that guides the later surveying and processing of available information.

The Map we built is highly disaggregated: the smallest unit of analysis is the Census Block, the smallest statistical unit in Argentina for which Census tabulations are publicly available. In urban settings a Census Block can be as small as a single city block. In rural areas, where population density is low, Census Blocks are much larger and can cover areas of several square kilometers.

The paper is structured as follows:

\begin{itemize}
	\item In Section 2 we discuss the operative definitions for the indicators shown in the Map.
	\item Section 3 explains the different analytical methods used for the estimation of the Sanitary Vulnerability Index
	\item In Sections 4 and 5 we report the sources of information used, and the procedures and techniques used to process and analyze the raw information.
	\item Section 6 describes the transformations used  to combine multiple indexes into a single indicator.
	\item Finally, we discuss limitations and further avenues of research in Section 7. 
\end{itemize}


\subsection*{Definition of Sanitary Vulnerability}

There are well known determinants linked to health status, related to unequal access to health services, both in terms of quantity and quality. The development of an index such as the one proposed here, aims at quantifying these inequalities to complement and contextualize other sources of health related information. It also raises awareness of particularly vulnerable regions. The estimation of a Sanitary Vulnerability could help identify and eventually prioritize “hot spots” on places with poor access to sanitary services that demand focused public health policy.

The presence of inequalities in the access to health services has been thoroughly studied and documented. Not all population strata show the same chances of accessing medical treatment. In general, the most vulnerable sectors and/or residents of low population density areas have a disadvantage in terms of access to health services. (\cite{beard}, \cite{timyan1993access}).

In specialized literature there is a differentiation between the notion of “inequality in access” with the notion of “vulnerability”, which is linked to a heightened risk to develop certain illnesses, or being exposed to certain factors of environmental risk.

An obstacle when trying to quantify “vulnerability” comes from the necessity to consider multiple factors that could explain inequalities in the access to the health system. In \cite{grabo} the main dimensions and indicators linked to notions of  vulnerability and inequality related to health care access are summarized.

Table 1 shows the main indicators from a number of previous studies analyzed in \cite{grabo} such as those linked to experiencing poverty, belonging to a minority, suffering from chronic mental or physical illnesses, and lacking medical insurance. While these indicators are defined at the individual level, there are other factors affecting Sanitary Vulnerability that are prominently correlated with the environmental realm. \cite{pruss2016preventing}.

\begin{table}[htp]
	\begin{center}
		\begin{tabular}{l r r}
			\hline
			Vulnerability Indicators & Papers & Percentage \\
			\hline
			Poverty & 21 & 91.3 \% \\
			Ethnic or Racial minority & 18 & 78.3 \%\\
			Chronic physical or mental illnesses & 12 & 52.2 \% \\
			Lack of Health Insurance & 8 & 34.8 \% \\
			Old age & 6 & 26.0 \% \\
			Incarceration & 3 & 13.0 \% \\
			Migration & 3 & 13.0 \% \\
			Low level of education & 3 & 13.0 \% \\
			Residence in underserved areas & 2 & 8.7 \% \\
			Unemployment & 1 & 4.3 \% \\
			Widowhood & 1 & 4.3 \% \\
			Homelessness  & 1 & 4.3 \% \\
			\hline
		\end{tabular}
	\end{center}
	\caption{Sanitary Vulnerability Indicators from ~\cite{grabo}}
	\label{tab:indicators}
\end{table}%


We evaluated many of the aforementioned indicators. Based on the availability of public data sets providing both nation-wide coverage and high spatial resolution, our approach for the Sanitary Vulnerability Index integrates two dimensions:

\begin{itemize}
	\item Access to public -that is, universal, Government funded- health services: for this dimension, we used physical proximity to public health facilities. A data set with the addresses of public health facilities throughout Argentina was compiled, based on data extracted from official listings published on websites ran by Municipal, Provincial and National authorities. These addresses were georeferenced to obtain their geographical coordinates. Then, for every Census Block in the country, a number of locations were sampled at random and then the shortest route to its nearest public health facility was calculated.
	
	\item Socioeconomic Status (SES): to construct a SES  index we used Census information. As it will be detailed later, the indicator is based on Census 2010 data at the individual level. A series of relevant variables (education level, poverty indicators, etc.) were combined using variational autoencoders, a method for dimensionality reduction based on neuronal nets (see section 5).
	
\end{itemize}


\section*{Methods}

The two dimensions mentioned before were combined into a georeferenced Sanitary Vulnerability Index that was projected onto the territory as a Sanitary Vulnerability Map. As discussed, the Map was designed to help identify areas with a potential deficit in sanitary services; that is, places were the local population access to health services lie below a minimum threshold. With this in mind, we built a metric to sort and classify the different zones in terms of their potential deficit.

\subsection*{Data sources}
To construct the Map, four different classes of sources were employed:

\begin{itemize}
	\item Census data (National Census of Population and Homes and Households 2010 \cite{indec_censo1} \cite{cnpyvv})
	\item Georeferenced polygons representing Census Blocks.
	\item Names, service level and geocoded addresses of public health facilities: Public hospitals, health centers, and health posts (n = 16.564)
	\item Street grids (national and provincial routes, municipal roads) used to find the shortest path between households and health facilities. 
\end{itemize}


All information was aggregated at the Census Block level, an areal unit.

In the following sections the procedures employed to process and analyze these diverse sources are explained.

\subsection*{Distance to Public Hospitals and Health Centers}

To build distance metrics, a unified, nation-wide health facility location data set was compiled by pooling different official data sources:

\begin{itemize}
	\item  National data set of Hospital and Primary Care Centers: based on the National Database of Hospital and Primary Care Centers (Base Nacional de Hospitales y Centros de Atención Primaria), which was compiled through the Sanitary Information System of Argentina (SISA) and published at the Argentine Republic Spatial Data Infrastructure (IDERA) site at http://catalogo.idera.gob.ar. This was considered the "master" data set, to be expanded with information from additional sources \end{itemize}

Other health facility location sources:

\begin{itemize}
	\item SUMAR health centers: SUMAR is a National program aimed at improving access to health coverage for people with no health insurance. Their official website lists thousands of public health facilities that were “scraped”\footnote{The term “scrapping” or “web scrapping” refers to a set of techniques and technologies used to extract information from websites when no simple data extraction mechanism -like a download link- is provided.} and combined with those found in other sources.
	\item Hospitals and health care centers listed at the National Program for Sex Health and Responsible Reproduction website: Health facility lists, published as separate files for every Province, were downloaded and geocoded.
	\item Local government sources: information from several sources at the Provincial or Municipal level, usually from Provincial Ministries of Health websites, was also extracted and integrated in order to identify facilities not found in any of the National level sources. 
\end{itemize}	

Once the data was identified, the extraction, cleanup, geocoding and deduplication process was : 

\begin{enumerate}
	\item Data was downloaded either as a single consolidated file (when available) or iteratively scraped from its website.
	\item Records with missing or unusable addresses were removed.
	\item Health facility addresses were georeferenced using the Google Geocoding API.
	\item All geocoded locations were overlayed 
	\item For each service-level category (hospitals, health centers, sanitary posts) geocoded facility locations were projected on a map, adding 100 meter buffer zone around each one. Where locations overlapped -i.e. their buffer areas intersected- those records were considered duplicates and only one kept. In that way, it was possible to identify and unify records obtained from different sources that used different addresses or names referring to a single site.
\end{enumerate}

As an example, health facility locations in Buenos Aires City, obtained from different sources, are shown. The data set was clearly enriched by combining sources: while there are some overlapping sites corresponding to different data sets (red and blue dots), some others represent facilities that were found only on one of the sources (yellow and green dots).


\begin{figure}[h!]
	\caption{\csentence{Comparison between master data set (SISA) and a \\ municipal source. Buenos Aires City}}
\end{figure}


\subsubsection*{Classification of health facilities according to their service level}

After their location was established, public health facilities were classified according to their service level. Establishing their service level is important as not all health facilities are equal. Access to a hospital that offers specialized medical procedures improves the chances of receiving a better treatment, emergency care, and potentially better outcomes compared to being attended in a basic health services center (sometimes referred as a sanitary post in Argentina). As the data sources did not use an standardized system to indicate health service levels, an expert review was conducted with the help of physicians experienced in public health administration, who assessed the data and sorted the facilities into three categories, in decreasing order of complexity:

\begin{enumerate}
	\item Hospital
	\item Health Center
	\item Sanitary Post	
\end{enumerate}


After removing a number of facilities that do not belong to any of the categories (i.e. nursing homes, administrative offices, etc.), 15903 records were retained from the 16654 distinct places originally identified by merging disparate sources.


\subsubsection*{Travel time to the nearest public health facility}


Physical accessibility has been recently used as a proxy to unequal distribution of goods and resources. A recent paper by \cite{weiss} shows that there is a positive correlation between aggregated time access to urban agglomerates and several common socioeconomic indicators: income level, educational level, child mortality rates, etc.

In order to define an accessibility metric based on household proximity to Public health facilities, distance and travel time to the nearest facility was calculated for every Census Block in Argentina.

To solve the issue of the varied shapes and areas of Census Blocks -quite different across the country, with a stark contrast between high and low density areas-, distances and travel times to the nearest facility was calculated by sampling many locations at random inside each Block. The procedure is as follows:

\begin{enumerate}
	\item Five points are randomly chosen for each Census Block
	\item For each point, the nearest health facility is identified
	\item For each point, travel time and distance traversing the local street grid to its nearest facility is calculated.
	\item Distances and times are averaged.
\end{enumerate}

The procedure was repeated for facilities in each of the service level categories (see previous section). To identify the nearest facility, a kNN algorithm -k nearest neighbors- algorithm was used to compare the coordinates of the samples locations and the facility addresses. 

To find the optimal route between the two points we used Open Source Routing Machine (OSRM), a high performance routing system that can find the shortest path between locations through the public road network, by foot and by car (\cite{huber2016calculate}). Detailed road data was obtained from OpenStreetMap (\cite{OpenStreetMap}), an open, global, crowdsourced database whose quality
has made it a frequently used source in mobility studies(\cite{haklay2010good}, \cite{juran2018geospatial})

\subsubsection*{Travel time on foot}

As an accessibility measure, walking distance and time (travel on foot) was chosen over travel by car as there is evidence -at least for certain medical treatments- that the distance by foot to the health facility is a good predictor of treatment outcome. 

\begin{quote}
	
	Results from this study of Baltimore City clients attending outpatient drug addiction treatment programs suggest that having to travel more than 1 mile from the treatment center reduces medical patients’ chances of completing treatment by almost 50\%, after controlling for the effects of demographic variables and type of drug problem. Moreover, living more than 4 miles away from treatment decreases the expected length of treatment by almost 13 days in comparison to clients traveling less than 1 mile.\cite{beard}
	
\end{quote}

Moreover, \cite{beard} indicates that distances longer than a mile (approximately 1.6 km) affect treatment outcome, highly increasing the chances of a patient abandoning rehabilitation treatment. When the distance exceeds 4 miles (6.4 km), the expect duration of a treatment increases by almost two weeks.

For a very reduced number of Census Blocks it was not possible to determine the travel path on foot to the nearest facility (10 out of 52406 Blocks analyzed). For each of them, visual inspection of aerial imagery indicated that they comprise either rural areas near lakes or estuaries, or large plots dedicated to agriculture, where no paths are present. In those instances, the largest distance found for neighboring Blocks was used instead.

The following maps show mean traveling times on foot to the nearest hospital, health centers and sanitary posts in Argentina.

\begin{figure}[h!]
	\caption{\csentence{Travel time (on foot) to different classes of health \\ facilities. Census Block Average.}}
\end{figure}

The results for hospitals and health centers are quite similar. In contrast, the map of sanitary posts shows a clearly different pattern. There is a significant portion of the Country  where travel times to the nearest sanitary post are very high. Closer inspection indicates that there exists an inverse relation between distance to hospitals / health centers and distance to sanitary posts. 

This difference could be explained by two non mutually exclusive reasons:

\begin{itemize}
	\item As local Governments decide the location (even the mere existence) of sanitary posts, the absence of sanitary posts could be explained by lack of local interest in setting up posts, or lack of means.   	
	\item Incomplete sources: that is, additional posts exist but are absent from official listings of health facilities.
\end{itemize}

Even with these caveats regarding the completeness of the data, travel distance to the nearest sanitary post was still included as part of the accessibility indicator. Since the indicator is built based it on a median function, the effect of potential outliers is minimized.

For each Census Block $\Delta_{r}$ is the median distance for all sampled locations inside it, to the nearest facility of each service level class: hospitals (Hosp), health centers (HCter) and sanitary posts (SPost):

\begin{equation}
	\Delta_{r} = MED(\Delta_{Hosp_1},..., \Delta_{Hosp_5}, \Delta_{HCter_1},..., \Delta_{HCter_5},\Delta_{SPost_1},...,\Delta_{SPost_5})
\end{equation}


\subsection*{Socioeconomic Status -SES-}

The second dimension of Sanitary Vulnerability represents a summarized measure of different SES characteristics of the population. This measure represents the population social and economic conditions, considered a key factor for the differences in sanitary risk across different populations.

Data from the 2010 National Census of 2010 at the individual level was available. Since SES is usually measured at household level, we calculated an index for each head of household in the data set from the Census.
To calculate the index the following variables were used, ordinally classified:

\begin{longtable}[]{@{}ll@{}}
	\toprule
	Variable & Unit \tabularnewline
	\midrule
	\endhead
	Dwelling property condition   & Dwelling  \tabularnewline
	Construction Material Quality                      & Dwelling  \tabularnewline
	Basic Services Access Quality & Dwelling  \tabularnewline
	Dwelling Construction Quality & Dwelling  \tabularnewline
	Overcrowding                            & Household \tabularnewline
	Basic Necessity Index        & Household \tabularnewline
	Head of Household Educational Level      & Household \tabularnewline
	Number of Unemployed persons in Household     & Household \tabularnewline
	Domestic Service Existence       & Household \tabularnewline
	Employment Status                  & Individual (head) \tabularnewline
	Educational Level                        & Individual (head) \tabularnewline
	\bottomrule 
	\caption{Indicators used for SE Index}
\end{longtable}

To construct the SES index a "thermometer encoding" for ordinal variables was used. Let $N$ be the number of cases and $v1, \ldots, vI$  the variables. For each variable $v_i$ , there are $K_{i}$   categories. We created the following codified variables $x^{(i)}_{k_i}$ for each variable $v_i$ and for each $k_i$ category where $2 \leq k_i \leq K_i$. For each case $j$ with $1 \leq j \leq N$ we have:

\begin{equation}
x^{(i)}_{k_i}(j)=
\begin{cases}
0, & \ if \ v_i(j) < k_i \\
1, & \ if \ v_i(j) \geq k_i
\end{cases} 
\end{equation}

For example, dwelling construction quality is and ordinal variable, based on the INMAT index\footnote{INMAT is the acronym for the Construction Materials Index, an official statistic. It reflects the quality of the materials with which houses are built (considering the predominant material used for floors and ceilings). It takes into account building strength, proofing, and finishing.}. INMAT values,  ranging from 1 (lowest construction quality) to 4 (highest quality), were represented as:

\begin{longtable}[]{@{}llll@{}}
	\toprule
	INMAT original & INMAT\_2 & INMAT\_3 & INMAT\_4\tabularnewline
	\midrule
	\endhead
	1 & 0 & 0 & 0\tabularnewline
	2 & 1 & 0 & 0\tabularnewline
	3 & 1 & 1 & 0\tabularnewline
	4 & 1 & 1 & 1\tabularnewline
	\bottomrule
	\caption{Example of thermometer encoding}
\end{longtable}

In this example, $INMAT_1$ would be the baseline or reference category.

\subsubsection*{Construction of a SES index}

The final index was computed using an autoencoder, a technique of dimensionality reduction\cite{goodfellow}, based on neuronal networks architecture. In short, an autoencoder has the objective to find a representation of input data (encoding) usually with the aim of reducing dimensionality. Usually, autoencoders learn to replicate inputs in outputs. This seems a trivial problem, but when certain restriction are introduced it becomes a complex task. For example, the size of the representation can be limited, or "noise” could be added to the inputs. Autoencoders try to learn this identity\cite{geron}.

An autoencoder has two elements:

\begin{itemize}
	 \item an encoder (or recognition network) that converts inputs to an internal representations, followed by a
	 \item decoder (or generative network) that re-converts the internal representation to outputs.
\end{itemize}

It has an architecture analogous to a Multi-Layer Perceptron, but the number of neurons in the output layer has to be equal to the number of neurons of the input layer. The trained model has a logistic function as a final layer and regularizes using a dropout (of 0.5) in the intermediate layers to improve generalization performance.

\begin{figure}[h!]
	\caption{\csentence{Autoencoder model used}}
\end{figure}

The estimated model was the following:

\begin{center}
\begin{flalign*}
h_{1} &= \tanh (W_{1} (x * r_1)    + b_{1}) \\
h_{2} &= \tanh (W_{2} (h_{1}* r_2) + b_{2}) \\
h_{3} &= \tanh (W_{3} (h_{2}* r_3) + b_{3}) \\
h_{4} &= \tanh (W_{4} (h_{3}* r_4) + b_{4}) \\
h_{5} &= \tanh (W_{5} (h_{4}* r_5) + b_{5}) \\
\hat{x} &= \sigma (W_{6} h_{5}    + b_{6}) 
\end{flalign*}
\end{center} 

where $W_i$ is the coefficient matrix of layer $i$,  and $b_i$ is the mean of layer $h_{i}$. In this way, the log-likelihood for each case can be written as
$$
\Pi(\hat{x}, x) =  \sum_{i = 1}^{I} \sum_{k_i = 2}^{K_i}
w^{(i)}_{k_i} \bigg( x^{(i)}_{k_i}  \log \left(\hat{x}^{(i)}_{k_i} \right) + \left(1-x^{(i)}_{k_i} \right) \log \left(1-\hat{x}^{(i)}_{k_i} \right) \bigg)
$$ where \(w^{(i)}_{k_i}\) is defined for each variable $v_i$ with its $K_i$ categories as:
\begin{flalign*}
w^{(i)}_{k_i} &= \frac{1}{K_i} \cdot \left( \frac{ \sum_{\ell} K_{\ell} }{I} \right)
\end{flalign*}.

The loss function was defined as a weighted likelihood:

\begin{flalign*}
L(\hat{x}, x) = \mbox{argmin}_{W, b} & \sum_{j=1}^{N} \Pi(\hat{x}(j), x(j) )
\end{flalign*}


The model was trained with ADAM~\cite{geron} defining batches of data resampled with repetition over the empirical distribution to ensure convergence.

Since the model include the population data (the data set is the Census itself), the aim was the generation of a descriptive measure. So, the model evaluation criteria was the weighted average of the probability of each variable-category:

\begin{flalign*}
& Error(\hat{x}, x) = \frac{1}{N} \sum_{j = 1}^{N}  \sum_{i = 1}^{I} \sum_{k_i = 2}^{K_i} 
\frac{1}{\sum_\ell K_\ell}
e^{ x^{(i)}_{k_i}  \log \left(\hat{x}^{(i)}_{k_i} \right) + \left(1-x^{(i)}_{k_i} \right) \log \left(1-\hat{x}^{(i)}_{k_i} \right) } 
\end{flalign*}

The final model preserves  85\% of the total information of the input.

In this way, from $h_{3}$ on, each household head, and therefore, each household, is classified with a value resulting from the autoencoder, which will be called $s_{i}$, SES.

Using SES, a socioeconomic indicator was created from an aggregated measure for each Census Block using data from the head of household head and it SES. So, for each household head $i$ with SES $s_{i}$  living in the Census Block $r$ with a population of $n_{r}$  head of households $\eta$ as


\begin{equation}
\eta_{r} = \frac{1}{4} Q_{.25}(\mathbf{s}_{r_{1,...,n_r}}) + \frac{1}{2} Q_{.5}(\mathbf{s}_{r_{1,..,n_r}}) + \frac{1}{4} Q_{.75}(\mathbf{s}_{r_{1,..,n_r}})
\end{equation}

where $Q_{p}$ is the $p$ quartile and $\eta_{r}$ the result of applying the summary measure known as "Tukey Trimean", which delivers a compromise between robustness and efficiency, compared to the mean.

\begin{figure}[h!]
	\caption{\csentence{SSE by Province density plot }}
\end{figure}

The previous density plots show that the index seems to capture well known disparities between Provinces:

\begin{itemize} 
	\item The city of Buenos Aires presents a distribution clearly skewed to the right (higher values of SES index)
	\item Provinces such as Chaco, Formosa, Jujuy, Salta, show left skewed distributions (lower SES index).
\end{itemize}

\subsection*{Estimation of a Sanitary Vulnerability Index}
The index of Sanitary Vulnerability design took into consideration the following dimensions:

\begin{itemize}
	\item Socioeconomic Level
	\item Access to health center
\end{itemize}

As said, Socioeconomic level can be considered a determinant of the population situation related to sanitation and social resources (such as education, and to conditions of overcrowding and habitability of the dwelling). Some of these resources are related individual and social trajectories and histories. Nevertheless they also have a strong relationship with residence place. In other words, the Socio Economic Level is linked to the distribution  problem of and therefore it is an intensive variable.

To construct the index of Sanitary Vulnerability it is necessary to combine both variables at Census Block level. The strategy adopted was a Principal Components Analysis (PCA), searching for a linear combination of the variables that maximizes explained variance.

When the variables show atypical distributions, for example multimodal, asymmetric or fat-tailed, PCA interpretation can be difficult: the method is sensitive to the variable scaling.  ~\cite{jolliffe2006principal}. One possible solution is to transform variables using ranges of data ~\cite{BaxterRankPCA} ~\cite{compositionalRank}.

Therefore, following ~\cite{solomon}, each $X_j$ was standardized using a rankit transformation:

\begin{equation}
rankit(X_{i,j}) = \frac{r_j(x_{i,j}) - 0.5}{n}
\end{equation}

For each observation i of each variable $X_j$ the rank is calculated $r_j(X_{i,j})$ -ranging from 1 and $n$ -, 0.5 units are subtracted and it is divided by the total number of registries $n$. % CREO QUE ESTO PODRIA VOLAR

As a result, differences in units between variables, changes in scale, displacements and monotone transformations are removed.

\begin{figure}[h!]
	\caption{\csentence{SES without and after the rankit transformation. City of Buenos Aires and Chaco Province.}}
\end{figure}


\begin{figure}[h!]
	\caption{\csentence{Distances to health centers, before and after the rankit transformation. CABA and Chaco Province.}}
\end{figure}

In the previous plot it can be shown the rankit transformation effect in SES -$\eta_{r}$- and access to health units -$\Delta_{r}$-.

It is easy to note that rankit is simply a non parametric estimator of the c.d.f. Following Egger et al. ~\cite{EggerPCA} y a Han y Liu ~\cite{LiuPCA}, an Semiparametric Principal Component Analysis was performed.

\begin{algorithm}
	\caption{Semiparametric Principal Component Analysis}\label{SPCA}
	\begin{algorithmic}[1]
		\Procedure{S-PCA}{X}
		\For{\texttt{j en variables}}
		\For{\texttt{i en cases}}
		\State $z_{i,j}=\Phi^{-1}\big(\frac{r_j(x_{i,j}) - 0.5}{n})\big)$ \Comment{$\Phi^{-1}$ is the inverse of a Gaussian c.d.f.}
		\EndFor
		\EndFor
		\State \textbf{calculate} $\Sigma_z $  \Comment{Covariance Matrix}
		\State \textbf{solve for} $U$, $S$ such as $\Sigma_z = \frac{1}{n} US^2U^t$ \Comment{SVD}
		\State \textbf{return} $ZU^t$, $S$ \Comment{Eigenvectors and Eigenvalues}
		\EndProcedure
	\end{algorithmic}
\end{algorithm}

To combine both variables, it was necessary to calculate Spearman's correlation between rankits ~\cite{LiuPCA}. Then the non-parametric correlation matrix was decomposed. The first autovector absorbed 72\% of the variability and was oriented in the opposite direction of mutual growth. This first autovector was considered the optimal combination between both variables. And after successive application of non parametric transformations, and index tolerant of contamination and above all independent to the scaling characteristics of each entry variable.

The aim was to obtain an index between 0 and 1 whose distribution were homogeneous for all units. There was a new application of a c.d.f - type estimated through log-splines using AIC as criterion of regularization over the main direction, deriving in this way the index $VS_r$ for each Block.

In difference to rankit, when modeling the distribution with log-spline, relative distance are respected.

\begin{figure}[h!]
	\caption{\csentence{Sanitary Vulnerability Index}}
\end{figure}

In the first graph of figure 9, result of S-PCA is shown in the space of $Z$, and the colors show the value of the resulting index. In the second graph, the result is observed in the space of $X$. 

\section*{Results}
Finally in the to graphs below, the index is shown as a function of SES index and distances, respectively.

\begin{figure}[h!]
	\caption{\csentence{Sanitary Vulnerability Index. Argentina.}}
\end{figure}

Now, this visualization needs to be taken with care due to the scale employed. In fact, the previous map seems to represent an expected situation where two zones can be delimited:

\begin{itemize}
	\item “Central" Region: Province of Buenos Aires, City of Buenos Aires, and the large urban agglomerates of each Province, characterized by higher values of Sanitary Vulnerability.
	\item The rest of the country, mainly in less populated regions, with critical values.
\end{itemize}

When aggregating information one level higher (census fraction) the result is slightly different.

\begin{figure}[h!]
	\caption{\csentence{Sanitary Vulnerability Index at Census Fraction level. Argentina.}}
\end{figure}

This map shows a mixed version: the regions previously detected are not so stark. They are observed in the central zone with critic values. In the non-central zone, there are better ranked sectors.

Spotting certain areas (but keeping the level of disaggregation by Census Block), there are patterns that are invisible in the aggregated map. If the aggregated map is displayed for the Provinces of Chaco and CABA the following result arises:

\begin{figure}[h!]
	\caption{\csentence{Index of Sanitary Vulnerability:. CABA (left.), Chaco (right)}}
\end{figure}

Then, in CABA, it is possible to detect higher Sanitary Vulnerability pockets, and in Chaco there are places presenting satisfactory values for this indicator.

\subsection*{Validating the Sanitary Vulnerability Index}

This section will attempt a first validation of the Sanitary Vulnerability Index (SVI) by complementing it with other statistical sources.

If the SVI is valid, it should be safe to assume that higher proportions of population without medical coverage are associated with higher SVI values. In fact, the medical coverage of the population, that is, the access they have to the health system should show a negative correlation with the index values

In this regard, it is necessary to clarify one point: the variable linked to the type of medical coverage of the population was not used for the SVI because the Population Census did not include a question for it in its basic questionnaire (which allows disaggregation at the Census Block level), only in the expanded one.\footnote{The expanded questionnaire is applied to a sample of the total population and contains occupational, health coverage and other variables. For more information, consult ~\cite{indec_censo1}}. The latter allows for a disaggregation only at the Department (an aggregation level comparable to the County level in the United States) level. That is why we will compare both distributions (SVI and health coverage) at the Department level.
	
This exercise will have the following characteristics:
	
	\begin{enumerate}
		\item it will be based on census radio information
		\item different aggregate measures will be calculated at the department level
		\item it will be compared with the proportion of the population with medical coverage (that is, prepaid or social work) at the departmental level
	\end{enumerate}
	
The following plots show the geographical distribution of both variables and a scaterplot.
 
\begin{figure}[h!]
	\caption{\csentence{Sanitary Vulnerability Index, by population proportion with no health care coverage (county level)}}
\end{figure}

\begin{figure}[h!]
	\caption{\csentence{Sanitary Vulnerability Index, by population proportion with no health care (county level)}}
\end{figure}
	
When analyzing the correlation between both variables, it is observed that at higher average values of the SVI, greater proportions of medical coverage in the population are observed: Pearson's R  correlation is about 0.70.

However, it can be seen that the departments with higher values of the SVI, correspond to a greater dispersion in the non-medical coverage of the population. In turn, these departments are the smallest in terms of population size.

\section*{Discussion and Conclusions}

Having validated the Sanitary Vulnerability Map's capacity to predict local health coverage, it seems to be a valuable tool for policymaking, as it provides a spatially granular estimate of the population's access to public health services.   

A current limitation of the Sanitary Vulnerability Index is that it uses data from the latest Argentina Census in 2010. As several years have passed since the Census was completed, having access to up-to-date information is crucial to improve is effectiveness. Because of that, the Index should be re-calculated as soon as future Census data is made public. 

Additionally, the Index could also be improved by including other data highly granular spatial data sources such as climate and environmental metrics.

As it is, the Map has opened up two interesting further lines of work. First, Sanitary Vulnerability can be considered a traversal dimension that affects the evolution, transmission and prevalence of different pathologies. So, a further line of work could use the Sanitary Vulnerability Map as an input to study the correlation of Sanitary Vulnerability with the spread of infectious diseases or the prevalence of chronic ones. Secondly, the methodology can be applied to different contexts. For example, the estimation of travel distance to health facilities can be replicated for other Public services: education, security, social assistance, housing, etc. This opens up the possibility to generate highly disaggregated information that could be useful to take cost-effective decisions in the allocation of public resources.


\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                          %%
%% Backmatter begins here                   %%
%%                                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\begin{backmatter}

\section*{Declarations}

\subsection*{Ethics approval and consent to participate}
Not applicable
\subsection*{Consent for publication}
Not applicable. Data has been obtained from public sources.
\subsection*{Availability of data and material}
This study was a re-analysis of existing data, which is openly available at locations cited in the reference section. The code used during the current study are available from the corresponding author on reasonable request
\subsection*{Competing interests}
The authors declare that they have no competing interests.
\subsection*{Author's contributions}
All authors made the same contributions to this paper. 
\subsection*{Acknowledgements}
The authors would like to thank to the Bunge y Born Foundation directives, Alejandra Candia and Brenda Walter for the material support for this research. Also, to Guillermo Bozzoli who assisted with the article translation.
\subsection*{Author's information}
Germán Rosati is sociologist, Assistant Researcher at CONICET and Quantitative Methods professor at University of San Martín. His researhc interests are social and agrarian structure, machine learning and natural language processing applications to social sciences.
Tomás A. Olego is a professor of Public Opinion Methodology at  University of Buenos Aires and a research fellow at the Bunge \& Born Foundation, in Argentina. His area of interest is the study of political phenomena combining computational and statistical tools.
H. Antonio Vazquez Brust is a professor of Urban Analytics at Torcuato Di Tella University and a research fellow at the Bunge \& Born Foundation, in Argentina. His area of interest is the study of urban phenomena combining computational tools and large scale data sets.

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                  The Bibliography                       %%
%%                                                         %%
%%  Bmc_mathpys.bst  will be used to                       %%
%%  create a .BBL file for submission.                     %%
%%  After submission of the .TEX file,                     %%
%%  you will be prompted to submit your .BBL file.         %%
%%                                                         %%
%%                                                         %%
%%  Note that the displayed Bibliography will not          %%
%%  necessarily be rendered by Latex exactly as specified  %%
%%  in the online Instructions for Authors.                %%
%%                                                         %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% if your bibliography is in bibtex format, use those commands:
\bibliographystyle{bmc-mathphys} % Style BST file (bmc-mathphys, vancouver, spbasic).
\bibliography{biblio}      % Bibliography file (usually '*.bib' )
% for author-year bibliography (bmc-mathphys or spbasic)
% a) write to bib file (bmc-mathphys only)
% @settings{label, options="nameyear"}
% b) uncomment next line
%\nocite{label}

% or include bibliography directly:

% \begin{thebibliography}
% \bibitem{b1}
% \end{thebibliography}


%\end{backmatter}
\end{document}