I would venture to say that the protection is not a direct result of doing Mitzvot.
We have an explicit Mishna we say every morning that [only] specific Mitzvot have some reward in this world - besides for the reward all Mitzvot have in the world to come.
See the Gemara in Kidushin 39b and Chullin 122a for a discussion about שכר מצוה בהאי עלמא; rewards for Mitzvot in this world.
However, the Gemara in Kidushin (40b) says::
ר' אלעזר בר' שמעון אומר לפי שהעולם נידון אחר רובו והיחיד נידון אחר רובו עשה מצוה אחת אשריו שהכריע את עצמו ואת כל העולם לכף זכות
Doing a Mitzva makes you better (as in: more of a Tzadik) and as a result the world is a better place.
Thus, every Mitzva done has the potential of averting disaster - as we already learned that the world is continuously being judged.
So, to answer your question: Doing Mitzvot can help protect you, those close to you and to a lesser degree "everybody". It's not location based; it's based on Hashem's view of you and the world at any given moment.
(Since you are the one being judged, the more the tragedy affects you, the greater chance your merit will avert it.)