In December 2019 Rob England and Paul Bradshaw reported on the people using Facebook to sell hot food prepared in home kitchens - and how campaigners want this emerging market regulated and subject to council hygiene inspections.
BBC analysis found more than 3,000 listings across the UK on Facebook Marketplace for "homemade food" on one day.
In order to analyse listings, we had to download Facebook Marketplaces pages in Safari's 'web archive' format, then use command line to extract this into a HTML file, and then extract data from those files. The dynamic nature of the pages meant that information could not be extracted using other browsers or methods.
Once downloaded, we used deduplication techniques to remove entries that appeared in Marketplace sections for different cities.
- CSVs: scraped data for each city's Marketplace listings
- CSV: combined data, with duplicate entries removed
- CSV: words used and counts
- CSV: place names appearing most often
- XLSX: most common foods by area
- Annise Middleton, home cook from Stoke-on-Trent
- Nasrin Rehmanwala, home cook from Cheltenham
- Johelis Zambrano, home cook from Birmingham
- Emma Rose, spokeswoman, campaign group Unchecked
- Spokeswoman, Food Standards Agency (FSA)
- Spokesman, Facebook
- Bar chart: 10 most common words in 'homemade food' listings on Facebook Marketplace
A shell script was used in command line to convert Safari's .webarchive format into HTML. R was used to clean and analyse the data.
- Shell script: convert .webarchive to HTML
- XML: OutWit Hub scraper
- R notebook: import and combine data
- R notebook: import and combine data, generate regional breakdown
- R notebook: remove duplicates
- R notebook: extract and count words, identify variations
- R notebook: identify food-related listings
Subsequent analysis was performed in Excel.