For the Python code used to calculate oppositions of Jupiter and their distances, using the same data NASA uses to plan planetary exploration missions, is available in this GitHub repository.