I am currently using meteostat weather API and extracting data, but I see that sunshine minutes is NaN for mostly all the countries. Am I doing something wrong? Should I look for a Paid weather API? my major focus is Sunshine minutes or hours per day for last 3 years.
I m using the below code snippet
!pip install meteostat
# Import Meteostat library and dependencies
from datetime import datetime
import matplotlib.pyplot as plt
from meteostat import Stations, Daily
# Set time period
start = datetime(2016, 1, 1)
end = datetime(2022, 12, 31)
# Get daily data
data = Daily('06660', start, end)
data = data.fetch()
data
where 06660 is the weather station WMO code for Switzerland. Thank you in advance.
I did some digging in the
meteostatdocumentation and issues on github. If you change the weather station from the one you're using to the one given in the documentation example, values oftsunaren'tNaN. You are able to see proper data. So it's probably not an issue with your code but simple thetsundata for your weather station isn't available. In this issue on their Githib repo, the Founder of meteostat has commented saying