I have the following type of data and another data in which distance from India to Bhutan and India to Sri Lanka is mentioned:
Country Year x
India 2015 15243
India 2017 16389
India 2018 20808
India 2020 17432
India 2023 19908
Bhutan 2015 12893
Bhutan 2017 14672
Bhutan 2019 15812
Bhutan 2020 13789
Sri Lanka 2015 15873
Sri Lanka 2017 14897
Sri Lanka 2018 16897
Sri Lanka 2020 15800
Sri Lanka 2023 18789
Start Point End Point Distance
India Bhutan 132433
India Sri Lanka 142308
Bhutan Sri Lanka 208979
I want to create a dataset in which for India in 2015, I can take weighted sum of x of Bhutan and Sri Lanka in 2015, with weights being 1/(distance) and similarly for other places in different time periods. Please help.
Country Year x
India 2015 15243
India 2017 16389
India 2018 20808
India 2020 17432
India 2023 19908
Bhutan 2015 12893
Bhutan 2017 14672
Bhutan 2019 15812
Bhutan 2020 13789
Sri Lanka 2015 15873
Sri Lanka 2017 14897
Sri Lanka 2018 16897
Sri Lanka 2020 15800
Sri Lanka 2023 18789
Start Point End Point Distance
India Bhutan 132433
India Sri Lanka 142308
Bhutan Sri Lanka 208979
I want to create a dataset in which for India in 2015, I can take weighted sum of x of Bhutan and Sri Lanka in 2015, with weights being 1/(distance) and similarly for other places in different time periods. Please help.
