def Get_LoR_Score (roads_criticality):
    """
    This function assigns a length of road score to each road segment within the road network
    Length of road score assigned based on criteria outlined in Hayes et al.

    Parameters
    ----------
    roads_criticality : GeoDataFrame that is the output of the Assign_criticality function

    Returns
    ----------
    GeoDataFrame that contains a length of road score (LoR score)

    """
    print("reprojecting roads layer")
    roads_criticality = roads_criticality.to_crs(epsg=3857)
    print("Calculating segment lengths")
    roads_criticality['length'] = roads_criticality["geometry"].length
    print("Obtaining quantiles")
    Percentile_25 = roads_criticality['length'].quantile(0.25)
    Percentile_50 = roads_criticality['length'].quantile(0.50)
    Percentile_75 = roads_criticality['length'].quantile(0.75)
    print("Assigning length of road score")
    roads_criticality.loc[roads_criticality['length'] <= Percentile_25, 'LoR score'] = 0.01
    roads_criticality.loc[roads_criticality['length'] > Percentile_25, 'LoR score'] = 0.1
    roads_criticality.loc[roads_criticality['length'] > Percentile_50, 'LoR score'] = 1
    roads_criticality.loc[roads_criticality['length'] > Percentile_75, 'LoR score'] = 10

    return(roads_criticality)