Closed hellonewman closed 2 years ago
Giovanni will look into this!
I think I misunderstood what is going on. It actually appears that what should happen is our supermarkets should always have fresh produce "checked", because supermarkets by definition have fresh produce. But instead many have NAs.
In prep_SNAP.R we specify that any site with a type of farmers market or supermarket should be fresh produce: fresh_produce = ifelse(type %in% c("farmer's market", "supermarket"), 1, NA),
However, we don't actually set the site type in this script. All sites are type=NA and I believe type must be set later in a different script. We should find that script and modify the Fresh Produce rule there.
Looking into this!
Right now, types are set in the prep scripts, with each prep script doing separate type-setting. I'm looking into making a script that sets flags later in the workflow, just to keep that type-setting in the same area and save us some code.
Because this issue appears to be relegated to fresh_produce solely, I'm closing this issue and redirecting the discussion solely to the issue related to setting a new fresh_produce script. https://github.com/CodeForPittsburgh/food-access-map-data/issues/198
The filtering for "services" appears to be match all instead of match any. So if you select only "fresh produce", it eliminates sites that have SNAP and fresh produce instead of showing any site that has fresh produce regardless of whatever else they have.