#!/usr/bin/python3
#
# VIZ (ET/ST)
###################
# sa: ../schrebatrondata/08_alpha_rep1_rep2/02_data_inspect/ana.py
# preq: should work on one huge table with all data!
#	> amount PatchCrossingEvents - Time -> activity histogram per unit/rep
#	> detection_duration_plot
#	> timespan_id_last_seen foreach tag
#	> timespan_id_last_seen foreach group (boxplot)
#	> Graphs per unit:
#		* all
#		* species group A ..
#	> cluster?
#
# CAMTRACK VIZ:
#	>	Total distance of movement
#	>	Minimum and maximum speed
#	>	If possible: turning angle
#
# Processing
##############
# > parse CSV fields neccessary?
# 	movement per tagID: #detections
#	coolOffPhase = 1s?
#	interPatch crossings
# 	most/least movement
# 	tag not detected (dead,malfunct,lost)
# 	... is there a complete tagList somewhere?
# 	sensors with most detection
# 	sensors with no/least detection
# 	need patchConfig.json ?

#from 3k data scripts:
###############

# > collect all tagIDs in list
# > get species - tagID mapping -> xtract from .ods file

# > sort by tagID
# for element in sorted(csvdata, key=attrgetter('tagID')):

# import json
# json.load("patchconfig.json")


speciesDict = {
			"C" 	: "Carabus nemoralis",
			"N" 	: "Nebria brevicollis",
			"PM" 	: "Pterochstichus melanarius",
			"A" 	: "Abax parallelus",
			"P" 	: "Pyrrhocoris apterus",
			"CS" 	: "Coccinella septempunctata",
			"CA" 	: "Cattalus fuscipes",
			"PO" 	: "Poecilus spec.",
			"PR" 	: "Pseudophonus rufipes",
			"HL" 	: "Harpalus latus",
			"H" 	: "Harpalus spec.",
			"PC" 	: "Pterochtichus cristatus",
			"CG" 	: "Carabus granulatus"
			"PQ" 	: "Pterostichus quadrifoveolatus"
}