Data-driven Koopman Theory for Transient Stability and Safety Analysis of Power Systems with Renewable Penetration