def get_diff(old: dict, new: dict, value: str, statistics=False):
    """ Get the difference between old and new osu! user data. """
    if not new or not old:
        return 0
    if statistics:
        new_value = float(new["statistics"][value]) if new["statistics"][value] else 0.0
        old_value = float(old["statistics"][value]) if old["statistics"][value] else 0.0
    else:
        new_value = float(new[value]) if new[value] else 0.0
        old_value = float(old[value]) if old[value] else 0.0

    return new_value - old_value