updated function with latest tested code
except we do not filter inside function
moved function definition
except moved means really deleted from old location
merge MR and national data per MR; compute resilience3 index
code formatting
fixed variable names
fixed used variable
removed test code