I've implemented the modification to the trade matrix based on the gravity model of trade.
The PyTradeShifts now has an additional parameter 'beta' that controls the strength of the modification.
The idea is that we multiple the trade matrix by the distance between regions raised to the power of negative beta -- higher the beta, the less trade.
For beta == 0 we get no change, for beta < 0 we amplify the trade.
Put _prepare_centroids in utils.py and import it, as model.py is already busy enough as it is and the method does not really need to be in there.
Please us os.sep for file paths, so we are platform independent
Please put the file with the locations in the subfolder "geospatial_references"
Load natural Earth data directly from the files in geospatial references, as geopandas plans to deprecate loading the datasets with gpd.read_file(gpd.datasets.get_path("naturalearth_lowres"))
I've implemented the modification to the trade matrix based on the gravity model of trade. The PyTradeShifts now has an additional parameter 'beta' that controls the strength of the modification. The idea is that we multiple the trade matrix by the distance between regions raised to the power of negative beta -- higher the beta, the less trade. For beta == 0 we get no change, for beta < 0 we amplify the trade.