They had the worst record in baseball on May 6 at 11-22. They were the only team below .400 at that point.
In April, they had a batting OPS of .664 while allowing .739. In May it was .754/.695 and June was .721/.659. So after a bad
-.075 In April, they were a positive .059 and .062 the last two months.
My rough formula for winning pct is
Pct = .5 + 1.25*OPSDIFF
So they should have been .575 over May and June while they were actually 30-24 or .556. A .575 pct would give them 31 wins.
Through May 6, they were outscored 158-123, slightly more than 1 run per game. Since then, including beating the Cubs today 1-0, they have outscored their opponents 219-186. That gives them a Pythagorean winning pct of .581 while 31-20 is .608.