What factors influence a person or group of people's empathy toward another group? The recent Paris terrorist attack highlights the discrepancy in the levels of empathy that Western people feel toward other Western people, compared to the empathy they feel toward Middle-Eastern people for example, who suffer such attacks regularly. 

The question is:


How can a person or group of people's empathy be measured?
What factors influence this level of empathy? 


Have any studies been done on this subject?
Empathy can be measured in many different ways. As this source outlines:


  Psychologists distinguish between measurements of situational
  empathy—that is, empathic reactions in a specific situation—and
  measurements of dispositional empathy, where empathy is understood as
  a person's stable character trait. Situational empathy is measured
  either by asking subjects about their experiences immediately after
  they were exposed to a particular situation, by studying the “facial,
  gestural, and vocal indices of empathy-related responding” (Zhou,
  Valiente, and Eisenberg 2003, 275), or by various physiological
  measures such as the measurement of heart rate or skin conductance.


Empathy is influenced by a very wide range of factors. Some are innate (e.g., one's capacity for empathy), some are due to upbringing and some are related to the characteristics of the individual or group involved (e.g, their familiarity, or appearance). I couldn't find a comprehensive list of these different factors (probably as there are too many), but [1,2,3,4] should give you a sense of the range of factors.

Please let me know if you require any further clarification such as a more specific question.

References:

1 McDonald, Nicole M., and Daniel S. Messinger. "The development of empathy: How, when, and why." Moral Behavior and Free Will: A Neurobiological and Philosophical Aprroach (2011): 341-368.

[2] JACKSON, P. L., MELTZOFF, A. N. &amp; DECETY, J. 2005. How do we perceive the pain of others? A window into the neural processes involved in empathy. NeuroImage, 24, 771-779.

[3] GALLESE, V. 2003. The roots of empathy: The shared manifold hypothesis and the neural basis of intersubjectivity. Psychopathology, 36, 171-180.

[4] CHAPMAN, E., BARON-COHEN, S., AUYEUNG, B., KNICKMEYER, R., TAYLOR, K. &amp; HACKETT, G. 2006. Fetal testosterone and empathy: Evidence from the Empathy Quotient (EQ) and the “Reading the Mind in the Eyes” Test. Social Neuroscience, 1, 135-148.