NEWS.md
plot_monitor(type = "heatmap")) is removed: with many days it is hard to read. The stacked-bar intake plot and the pig table show the feed intake of each pig.plot_monitor(type = "intake") draws stacked bars as fid_monitor() of pptsdm did: the share of each pig in the station’s feed intake (top) and its feed intake in kg (bottom), with the daily total above the bar. One colour per pig in both panels and one legend; the number of colours grows with the number of pigs. Pigs without visit or with low feed intake on the last day are marked in the legend. The heat map of 1.0.0 is no longer in the HTML report.plot_monitor(type = "trend") has a body weight panel: the mean of the pigs’ daily median weight, with a band from the lightest to the heaviest pig.The package is renamed from pptsdm to tidypptsdm and rewritten on top of tidypptsda. None of the old functions remain; see the article “从 pptsdm 迁移” for the mapping.
read_station() and prepared with prep_visits() from tidypptsda (both re-exported): the same columns and units for NEDAP and FIRE (feed intake in g, body weight in kg, duration in seconds), unidentified visits kept with identified = FALSE, pigs moved to another station resolved. Every function accepts a folder of exports, a raw export in R, or the result of either function, and never modifies its input.run_monitor() computes everything once: monitor_stations(), monitor_houses(), monitor_pigs(), monitor_hours() and the alerts of the last day (station_down, unidentified, feed_drop, pig_no_visit, pig_low_feed). Thresholds are arguments (low_feed_kg, max_unidentified_pct, max_feed_drop_pct, iqr_k).wide_table() gives the wide view.plot_monitor() draws one plot per station: "trend", "intake" (heat map of feed intake per pig and day), "weight" and "hours"; save_monitor_plots() saves them.write_monitor_report() writes an offline HTML report to browse station by station, in the style of tidypptsda::write_report(). It replaces fid_monitor() (PDF) and station_monitor() (PNG files).write_monitor_tables() writes an Excel workbook with colour scales, or CSV files. It replaces table_monitor().schedule_monitor() writes the daily script and registers it in the Windows Task Scheduler, or prints the crontab line on Linux and macOS. It replaces monitor_schedule() and monitor_all().verbose = 0/1/2, as in tidypptsda.nedap and fire datasets of tidypptsda and run everywhere; the package has tests.days + 1 days, and some tables ended the day before the others. Now every table covers the same days days ending on end_date."no_visit" and give an alert.occupation_h, occupation_min).feed_time_n sheet had none.station_monitor() gave every PNG the size of the first station, and its date axis showed only the month.fid_monitor() failed with more pigs at a station than colours.hour_stat(), fid_monitor() and station_monitor() modified the data passed to them.monitor_schedule() only worked on Windows with a C:/Temp folder.