After replacing extract with exact_extract, we have the coverage fraction for each grid pixel. We need to take this into account in the area averages and the population-weighted averages. For area average, just use the usual weighted average calculation we currently use for population, replacing pop with coverage. For population, we need to construct new weights by multiplying the pop and coverage weights.
After replacing extract with exact_extract, we have the coverage fraction for each grid pixel. We need to take this into account in the area averages and the population-weighted averages. For area average, just use the usual weighted average calculation we currently use for population, replacing pop with coverage. For population, we need to construct new weights by multiplying the pop and coverage weights.