Rural Accessbility Index (RAI)

Single country

scripts.RAI.single_country(country, continent_osm, base_path, grump, overwrite=False, tertiary=False, track=False)[source]

Estimation of the Rural Accesibility Index (RAI) for the specified country.

The RAI is calculated by using the methodology specified in the report below:

World Bank. 2016. Measuring rural access: using new technologies. Washington, D.C. : World Bank Group. http://bit.ly/2p5asME
Args:

country: to country for which we calculate the RAI.

continent_osm: the continent that the country ‘belongs’ to. This is required in the osm extraction.

base_path: base path to location of all files.

idx_urban: rTree index of the urban areas. By using an rtree index, we can quickly find the intersecting areas.

tertiary: default option is ‘False’, but if we want to estimate the RAI for tertiary roads as well, we can set this option to ‘True’.

track: default option is ‘False’, but if we want to estimate the RAI for both tracks and tertiary roads as well, we can set this option to ‘True’.

Returns:
A dictionary with the total rural population, the total rural population within 2km of the selected roads and the RAI for the specified country.

All countries

scripts.RAI.all_countries(base_path, multiprocess=True, overwrite=True, tertiary=False)[source]

Main function to estimate the RAI for all the countries we are interested in.

Args:

base_path : Base path to the location of all files and directories in this project.

multiprocess : Set to True by default. Set to False in the case of limited processing power.

overwrite : Set to True by default. This relates to all input data (i.e. .poly files, .osm.pbf files and shapefiles).

tertiary : Set to False by default. When set to True, the calculation of the RAI will run a second time, now including tertiary roads.

Returns:
An Excel with file the total rural population, the total rural population within 2km of the selected roads and the RAI for each country. if tertiary is set to True, the Excel file will return an additional sheet with the results of that second calculation.