Comprehensive analysis of AMS data: a cluster-graph approach tested on a dairy farm