This post is about a function that I produced in R as part of the GIS class coursework at CASA. We were asked to come up with an idea of a generic function that could be used by others. I developed MapIndex(), a function that produces a spatial surface regarding the index of Diversity or the index of Entropy for a certain feature of a multigroup residential segregation analysis(e.g race, ethnicity, wage, age etc.).
“Residential segregation is defined as the extent to which within a given geographical area (e.g, a city), individuals belonging to different social groups live in neighbourhoods characterized by different social compositions.” (Reardon and O’Sullivan 2004)
In other words, if there are three age groups for an area (children, working age, older) and I (as a working aged individual) am living in an area with high percentage of people in my age group, my area is defined as segregated (or more segregated than other areas). The indexes of Diversity and Entropy are two different formulas to perform the above analysis and the user of the function may choose the proper one.
MapIndex() returns a map of the given area as a spatial surface over-layered by a given boundary image. The spatial surface is produced by the Inverse Distance Weighting algorithm. The boundary image (shapefile) provided by the user could be of any type. In the example that I produced for the age groups in London I used both Wards and Boroughs as boundary files.
I am going to upload the function file and the data I used after I get feedback for the assignment!