def add_ndvi(image):
    """
    Calculates the Normalized Difference Vegetation Index (NDVI)
    """
    ndvi = image.normalizedDifference(['NIR', 'R']).rename('NDVI');
    return image.addBands(ndvi)