I don't do this, but here are my thoughts.
I just upload my .prices file to maddavo, via the web page. There is no explicit "delete all these items".
But I do capture every screen, ALL the station data before I import it into local TD.
My guess is that the 'sparse' stations are a result of user error/misunderstanding of what they ought to be doing. If you look at the comments in a whole maddavo download, the sparse stations normally have an OCR source noted in the commentary.
The only way to deal with this (at maddavo and TD import) IMO is to keep the old commodity data if an update does not contain it. I think this is a valid approach. I have yet to see an item completely disappear from a station commodity market listing. I have seen stock go to 0 and demand too, but not seen a commodity disappear altogether.
Does this present a challenge to asking for trades by age, if commodities have different ages? There would be a need to define 'station age' based on a commodity update mean/standard deviation calculation I think, or consider the age of every commodity, which feels compute intensive.
The way the prices merging on MMS works at the moment is LINE-BY-LINE. TD does it STATION-BY-STATION. I decided to do line-by-line because there are many circumstances where I don't get a full station's worth or prices sent to me. EDDN sends prices one at a time. If you listen for a while, then you get the whole station? Not quite. In many cases people are only sending partial stations rather than religiously getting all lines on all screenshots in EliteOCR.
BUT line-by-line processing has a drawback - I cannot test for the absence of a price in order to delete it. ie: If an item is no longer bought/sold at a station then processing of incoming prices doesn't tell me if the item is deleted. That is why the updated.prices file created by TD when you do a manual update with TD will add in every item and put buy=0 and sell=0 for items that are not at the station.
Now most people are using EliteOCR to capture prices, and only capture part-stations, so what to do? How do we get rid of dead items easily?
In an attempt to get rid of these dead items, today I have added a routine that will delete any price that is greater than 14days older than the latest price at a station. Essentially, all the items at a station will be within a 14day window. This will get rid of a dead item at a station, BUT it may also have some undesirable effects. eg: If there's a station that hasn't been visited for 14 days, and someone goes and updates ONE item, then all the others will be deleted. I am hoping that is unlikely but it's something we should monitor.
As more of a manual and immediate method to get rid of a dead item, (as I can't wait 14 days), I have been doing the following:
trade.py update --sub <station> -T
changing the price of the offending item manually to 0 buy 0 sell
increment the timestamp on that line a bit
upload the updated.prices file
I
think this has the effect of not changing any of the other price timestamps for the station.
- - - - - Additional Content Posted / Auto Merge - - - - -
Also, in the prices files I have added a comment at the end of each line that is received via EDDN. This shows some info from the sender of the data. This may be useful for us to spot bad data and blacklist it.