rfortherestofus / api-food-asset-map

5 stars 1 forks source link

Merge all data into one giant data frame #40

Closed dgkeyes closed 3 years ago

dgkeyes commented 3 years ago

See #39

grahamammal commented 3 years ago

Completed in f77a0e785575956082491a980640f01547fa9b1a

I used the following for the mapping between file and category:

tribble(~name, ~category, "bay_area_211", "Offers Free, Prepared Food or Hot Meals", "convenience_stores_osm", "Corner Store", "drugstores_osm", "Drug Store", "farmers_markets", "Farmers Market", "fast_food_osm", "Fast Food Restaurant", "food_banks", "Food Bank", "food_pantries", "Food Pantry", "food_pharmacies", "Food Pharmacy", "pop_up_pantries", "Food Pantry", "prepared_food", "Offers Free, Prepared Food or Hot Meals", "restaurants_osm", "Restaurant", "snap_stores", "Accepts SNAP", "supermarkets", "Supermarket", "wic_stores", "Accepts WIC")

Let me know if I should change any. I also didn't include the market_osm dataset, I couldn't really figure out what it contained?

katiejolly commented 3 years ago

The markets data was a first pass at farmers markets from the OSM data, but your dataset is much higher quality! So don’t worry about that one.

Sent from my iPhone

On May 7, 2021, at 16:52, Ellen Graham @.***> wrote:

 Completed in f77a0e7

I used the following for the mapping between file and category:

tribble(~name, ~category, "bay_area_211", "Offers Free, Prepared Food or Hot Meals", "convenience_stores_osm", "Corner Store", "drugstores_osm", "Drug Store", "farmers_markets", "Farmers Market", "fast_food_osm", "Fast Food Restaurant", "food_banks", "Food Bank", "food_pantries", "Food Pantry", "food_pharmacies", "Food Pharmacy", "pop_up_pantries", "Food Pantry", "prepared_food", "Offers Free, Prepared Food or Hot Meals", "restaurants_osm", "Restaurant", "snap_stores", "Accepts SNAP", "supermarkets", "Supermarket", "wic_stores", "Accepts WIC")

Let me know if I should change any. I also didn't include the market_osm dataset, I couldn't really figure out what it contained?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

katiejolly commented 3 years ago

Labels look great @grahamammal ! image

katiejolly commented 3 years ago

@grahamammal I added liquor store data into the full dataset, I'd previously missed that category

dgkeyes commented 3 years ago

This looks great! I made a few small tweaks to the labels in https://github.com/rfortherestofus/api-food-asset-map/commit/4ff9d9a490e9d79e7271e409333eff378e7606f4

katiejolly commented 3 years ago

I'm thinking the plural labels are good for the menu and singular labels for the tooltip? I'm forgetting the name but there's an R package that will make all the labels singular so we don't need to go back and do that ourselves.

dgkeyes commented 3 years ago

That's a great point! If you find that package, let me know. We can also just create two columns manually, one for each purpose.

katiejolly commented 3 years ago

Found it! https://cran.r-project.org/web/packages/pluralize/pluralize.pdf None of these labels are particularly difficult or obscure so I'm guessing this will be a good solution

katiejolly commented 3 years ago

image

dgkeyes commented 3 years ago

That works!

dgkeyes commented 3 years ago

@grahamammal here are the final categories. I started to update the code in make-full-dataset.R but was worried I might mess something up. Do you mind finalizing things there?

Also, since accepts SNAP/WIC is now a separate variable, please go ahead and create that variable and do the merging we are able to (see #26). Please let me know when that's all set so I can get the client to help with manual matching. Thanks!

grahamammal commented 3 years ago

Do we still want the Ethnic Markets category if we have a separate variable for international markets? I can match the stores with that category to another category if we want

dgkeyes commented 3 years ago

First of all, I think I had a typo above (forgot to change Ethnic Markets to International Grocery Stores). I fixed that now.

We no longer need ethnic markets as a category/variable. With the international_grocery_store variable, we should make any store that has that get the category "International Grocery Stores". We can then drop the international_grocery_store variable.

Let me know if this makes sense after I did my best to confuse you!

grahamammal commented 3 years ago

Okay I think I got that sorted out in 79a1eb94b76506a0e9657fb0b1bbc38b2487c412, but you should check to make sure it looks correct

grahamammal commented 3 years ago

One thing I forgot to mention, I'm leaving in the snap/wic category in that dataset, so I can use it in the file for matching up with snap/wic info

dgkeyes commented 3 years ago

Great, looks good to me! Onward to doing the programatic matching we can do in #26! I'll close this issue and we can discuss anything else that comes up in #26.