Sometimes data from the predicted metrics API has NA values in the 10th percentile field due to modeling errors where these numbers were originally set to negative values and were replaced with NA in the API. This function, which needs to be enabled using the ffc$predicted_percentiles_fill_na_p10 flag on FFCProcessor objects, fills any NA values it finds in the p10 field *if* the p25 field is 0. Otherwise, it leaves them as they are. Raises a warning if it finds any NA values in the p10 field regardless of whether it fills them.

fill_na_10th_percentile(df, fill_na_p10)

Details

This function can be used with any other data frame that contains field p10 and p25 as well, though I'm not sure the conditions you'd need to!