Usually gathered as part of a community survey.
Possible survey questions could be:
To what extent do you agree or disagree that in my community the gender / age / faith / ethnicity / political affiliation* of an individual:
- …affects their chances of being part of the leadership of the community
- …affects their ability to access government services such as health or education
*Adapt to suit the identity marker that you are interested in
For analysis a simpe percentage should be taken of the number of respondents reporting that they agree or strongly agree with the statement. Care should be taken in deciding whether this percentage applies to just those surveyed or whether it can be ascribed to the population as a whole. This will depend on the design of the survey and whether it was a representative sample of the population.