add Python code for analysis