class: center, middle, inverse, title-slide # Voronoi Cells ## Visualizing intramunicipality votes distribution ### Lucas da Cunha Godoy Augusto Felix Marcolin Douglas R. Mesquita Azevedo Luis Gustavo Silva e Silva ### May, 2018 RBRAS - Curitiba, PR - Brasil --- class: center, middle, inverse #
Introduction --- class: venn # Electoral data in Brazil - As in any other country, it is a valuable information for politicians - Public interest - Data available at [Superior Electoral Court ](http://www.tse.jus.br/) -- - Aggregation levels: Country, State, City, Electoral Zone, Electoral Section ![](img/venn.svg) - How can we visualize and analyze this data in a intramunicipality level? -- - In great cities we have the electoral zones well defined - Small cities share electoral zones -- This makes electoral zones a bad choice for this problem. A solution would be work with electoral sections. --- # Electoral sections .middle[ - There is no official administrative divisions for the electoral sections, we only have access to the addresses of this sections - This lead us to some problems: ] --- class: center, middle ## 1 - Can be difficult for those who are not familiarized with _geostatistics_ to interpret the data --- class: center, middle ![](index_files/figure-html/sp_sec_points-1.svg)<!-- --> --- class: center, middle ## 2 - Aggregation of census data is not straightforward --- class: center, middle ![](index_files/figure-html/sp_join-1.svg)<!-- --> --- class: center, middle ![](index_files/figure-html/sp_wasted-1.svg)<!-- --> --- class: center, middle, inverse #
Tools and Method --- class: center, middle #
Voronoi Tesselation --- # Voronoi Tesselation .center[ ![](img/voronoi_ex.gif) ] --- # Voronoi Tesselation .middle[ - Suppose a region `\(S \in \Re^2\)` and a set of `\(n\)` points `\(\big\{Z: z_i = (x_i, y_i)\big\}\)` - A Voronoi Tesselation is used to split `\(S\)` in `\(n\)` partitions `\(V_i\)` - Each partition is associated with one point in `\(Z\)` - Any new point `\(z^*\)` selected inside a partition `\(V_i\)`, will be closer to the point `\(z_i\)` than `\(z_j, \forall j\neq i\)` ] --- class: center, middle #
Polygons Intersection --- class: center ![](index_files/figure-html/poly_inter-1.svg)<!-- --> --- class: center, middle # Voronoi + Polygon Intersection ## Getting information from areas --- .center[ ![](img/poly_inter2.gif) ] --- # Getting information from areas #### Voronoi Cells `$$V_i: i = 1, ..., m$$` -- #### Areas `$$C_j: j = 1,...,n$$` -- #### Area from `\(V_i\)` covered by `\(C_j\)` `$$P_{i,j} = \frac{Area(V_i \cap C_j)}{Area(V_j)}$$` -- #### Variable observed on `\(C_j\)` `$$X_j, n_j$$` --- # Getting information from areas #### Counts `$${X_i}^* = \sum_j P_{i,j} X_j$$` -- #### Averages `$${X_i}^* = \frac{\sum_j P_{i,j} n_j X_j }{\sum_i P_{i,j}n_j}$$` --- class: center, middle, inverse #
Results --- .center[ ![](index_files/figure-html/log_renda-1.svg)<!-- --> ] </br> .footnote[Our method used 99.6% of the total population.] --- .center[ ![](index_files/figure-html/correlation-1.svg)<!-- --> ] </br> .footnote[Correlation: 0.8895.] --- class: middle .pull-left[ ![](index_files/figure-html/pca-1.svg)<!-- --> ] .pull-right[ ![](index_files/figure-html/pca_2-1.svg)<!-- --> ] --- .center[ ![](index_files/figure-html/final_plot-1.svg)<!-- --> ] --- # Other applications .middle[ - Verifying the socio-economic profile of the population living in the neighborhood of UBS (basic health units) - Given a clients data base with addresses, you can know about the social profile of them using our method ] --- class: center, middle, inverse #
Conclusion --- # Conclusion .middle[ - Our approach seems efficient to aggregate information from areas to points - Also can improve the interpretation of _geostatistical data_ for those who are not familiar with that - Has several applications ] --- class: center, middle, final ##
lcgodoy.github.io ##
lucasdac.godoy@gmail.com