DIMMiN Notes
My working notes related to the development of dimmin.com.
2025-10-08-Wednesday
- Found a way to accurately join the
competitionandlottables (first on explicitly validated rows where a direct link was present, then on rank and farm_name) - Cleaned up
competitionandlotaggregation code (now there is no explicit script to aggregate this data together) - Now have a dataset with ~
4.3kvalid rows of different coffees - Started associating each coffee
lotwith itscountryandyear - Identified a bug where some
urls are associated with incorrectlotinformation in the output of theoffline_pipeline_spider.py
2025-10-06-Monday
- Added a check that a
lot'surlfeature was inassociated_lots before adding it as a feature via theoffline_pipeline_spider - Validated that most pages with invalid associated
lots actually did not have references tolots - Identified a bug where there was some duplicate information, combining data where possible to discover
5,317unique coffeelots (validated with their individualurls) within thecompetitionpage - A direct Inner Join on between
composite_lot_data.csvandscore_dfreveals5,251unique rows (indicating a much higher match rate than I saw initially) - Identified (and fixed) a bug with the
price_per_unitFloat converter code to account for,used to indicate cents.
2025-10-05-Sunday
- Found out that the
price_per_unitis a good marker of the auction table within thecompetitionpage - Found an additional
2,000lot associations forprice_per_unit(now at ~4.8ktotal lots) - Changed the format of
associated_lotto a list to eliminate redundant data - Started using the
associated_lotfeature to determine which tables on a given page have a direct link tolot-level data - Broke trackpad on
Elvisso I couldn't use the mouse (this resolved itself on system reboot but was sp00ky).
2025-10-04-Saturday
- Normalized
total_lot_value_usdandprice_per_unit(thankfully the latter is always in \$/lbs which makes things easier) - Normalized
auction_lot_size_kg(though this one needs some work, integer values here typically indicate a 30kg box of coffee instead of a raw weight of kg which itself is usually to two decimal places) - Identified that the most important feature for this analysis will be
price_per_unit, therefore it makes the most sense to find features most relevant to this aspect. - Finished a rough draft of the processing for this dataset which currently provides
2,444coffeelots with a knownprice_per_unitvalue. Given that we start with5,482unique coffeelots identifiable by their uniqueurls the biggest bottleneck I've identified right now is associating a coffee'slotwith its respective auction results in thecompetitionpage. - Added an association between each
competitionand its respectivelots in thecoe_scraper/spiders/offline_pipeline_spider.pypipeline procedure. This should make it much easier to joincompetitionpage data to its associatedlot. - Added a quick validation check within this pipeline to see if the links available in the
competitionpage were also available in my local.
2025-10-01-Wednesday
- Finished applying the data validation hierarchy idea, now working with a composite dataset called
composite_raw.csvthat I can use to start building my ML-ready dataset - Normalized
score,rank,year,country(certainly needs work), andfarm_size_square_meters(the rows I checked seemed ok but it could also use a validation check) - Started extracting the different
varietys from each row. Decided to stick with 12 "canonical" coffees since we don't want to explode to70different varieties when we apply One Hot Encodeing. - Tried multi-shot calling on ollama's API to see if a consensus could be reached about which coffee varieties were present for a given
lot. Little success so far but the code is established for other rows if they need to be cleaned.
2025-09-30-Tuesday
- Re-defined the goals of the data cleaning step for this analysis (mainly establishing
competitionpages as a backup and re-orienting my focus on thelot-level data) - Extracted relevant data from existing
lotpages inparse_lot_data.py - Combined this relevant data with
competitiondata based on my competition data parser, applying a Left Join on thelot'surlfield - Established the start of a data validation hierarchy where missing data is filled in using data that is known in a specific order (
LLM consensus<auction_table<score_table<<lot)
2025-09-29-Monday
- Found a quick way to merge the most relevant auction and score data at the
competitionlevel (however it might be useful to keep in mind that this data will be supplementary to the data provided in thelotpage) - Tried using ollama API to extract data from raw HTML of
competitionpage in an attempt to side-step this whole data cleaning process. Didn't work. - Found that I'm missing some pages (like this one) on my local machine even though I grepped the
20210921_coe_spider.loglogs and found that a GET request was successfully made. This points to a potential for additional data that needs to be collected.
2025-09-26-Friday
- Developed a function to identify primary tables (tables that link between
competitionpages andlots) - Found out I was missing most of the lot competition data (A total of 240
lots) from2020 - Also found out that there are some
competitionpages that don't have anylotlinks (indicating that I don't actually have the data I need to use as input for those coffees) - Parsed the Wayback Machine for missing
competition/lotdata from 2020 and found some of it. - Found out that the Wayback Machine has a useful REST API. Tried working with Claude to build some Middleware for the
coeScrapy Spider so that404or unknown links are sent to the most recent snapshot of the HTML page from the Wayback Machine. If I can get this to work it could be a really useful little backup plan for any Web Scraping project.
2025-09-25-Thursday
- Found out how to call the local ollama API to run local models at scale using
Leviathan - Fixed a corrupted
competitionHTML file for Guatemala 2013 - Found that Brazil 2025 and Peru 2025
competitiondo not have any tables of data yet - Identified all unique feature names across my different
competitiontables, used Claude to create a mapping between the relevant features I need from the competition page and those from my JSON schema that I developed.