I tried OpenWeatherMap but I need to put a credit card in and I don't have that right now. I also tried weatherstack but the info it gave me was wrong. Meteo wants a free trial.
Are there alternative weather API that are free and accurate without having put credit details in?
Videos
i have tried so many and i cant get one singular API
I’m trying to build a small weather-tracking app and went looking for an API. Found Meteomatics, lots of good reviews, looks solid. But I can’t reach their dev team and I can’t even sign up to get API access.
So… I’m kinda stuck.
Anyone got any advice or alternatives?
Hey there r/Python. Watched a random netflix show about the government and realized that Weather.gov is a free, mostly untapped resource for accurate weather data that doesn't try and sell your data when you use it like The Weather Channel, Accuweather, or Weatherbug. After looking for a bit I couldn't find a package that utilized weather.gov so I decided to write it myself.
PyPi : https://pypi.org/project/weather-gov/0.1/
Source: https://github.com/spectrshiv/python-weather_gov
I've been writing python for internal use for quite a while, but this is my first real public project I've actually put some thought into and followed through on. I appreciate any feedback you guys have.
Licensed under GPLv3.
Does anyone know a good website to use for mock data for a weather API? I am following along using Brad Traversy's Github Finder, but I want to learn how to do my own in regards to weather.
I think one of the big issues when learning to program is the absolut lack of data and for most semi-useful tools you need at least some of. Do you know of any cool websites that provide real world data / lots of data that can be easily accessed with an API (JSON) call?
I'm building a weather forecast personal project and need an API that I can enter "New York" and "06-06-2022" and get the weather forecast for that day (preferable to have a free plan).
So far, I have only found APIs that can get data from specific days in the future but expect latitude and longitude as parameter, or the other way around, where it accepts city name but you can't specify a future date.
Thanks in advance!
Save this in a file ex filename.py I would suggest using VSCode.
Get you API key for free from https://openweathermap.org/api (This is not an advertisement this is a fun project) Replace the value of variable "Key" with the key that you got in double or single quotes.
Then make another file named Functions.py exactly if you really want to change the name, go to the 4th line (Including Spaces) and change the "import Functions as Geocode" to "import {name here} as Geocode"
Here have the code:
____________________________________________________________________________________________________________
filename.py
import requests
import Functions as Geocode
# File check functions
# Variables
Key = 'Your key goes here'
# Geocoding Setup
countryCode = input("Enter the country code of your country (IN for India):")
Zip = input("Enter the zip code of your city:")
City = Geocode.City(Key, countryCode, Zip)
lat = Geocode.Latitude(Key, countryCode, Zip)
lon = Geocode.Longitude(Key, countryCode, Zip)
CurrAirPol = f'http://api.openweathermap.org/data/2.5/air_pollution?lat={lat}&lon={lon}&appid={Key}'
AQI = Geocode.CurrentAirPollution(CurrAirPol)
print(AQI)End of Code here!
____________________________________________________________________________________________________________
Functions.py
import requests
def City(Key, countryCode, Zip):
Geocoding = f'http://api.openweathermap.org/geo/1.0/zip?zip={Zip},{countryCode}&appid={Key}'
response = requests.get(Geocoding).json()
print(f"Are you trying to access the data of {response['name']}")
return response['name']
def Latitude(Key, countryCode, Zip):
Geocoding = f'http://api.openweathermap.org/geo/1.0/zip?zip={Zip},{countryCode}&appid={Key}'
response = requests.get(Geocoding).json()
return response['lat']
def Longitude(Key, countryCode, Zip):
Geocoding = f'http://api.openweathermap.org/geo/1.0/zip?zip={Zip},{countryCode}&appid={Key}'
response = requests.get(Geocoding).json()
return response['lon']
def CurrentAirPollution(Path):
response = requests.get(Path).json()
AQI = response['list'][0]['main']['aqi']
CO = response['list'][0]['components']['co']
print(f'Carbon Monoxide = {CO}')
NO = response['list'][0]['components']['no']
print(f'Nitric Oxide = {NO}')
NO2 = response['list'][0]['components']['no2']
print(f'Nitrogen Dioxide = {NO2}')
O3 = response['list'][0]['components']['o3']
print(f'Trioxygen = {O3}')
SO2 = response['list'][0]['components']['so2']
print(f'Sulfur Dioxide = {SO2}')
PM = response['list'][0]['components']['pm2_5']
print(f'Dangerous: PM2.5 = {PM}')
PM10 = response['list'][0]['components']['pm10']
print(f'Dangerous: PM10, Particulate Matter = {PM10}')
NH3 = response['list'][0]['components']['nh3']
print(f'Azane = {NH3}')
if AQI >= 1 and AQI <= 3:
return f"Bad Air Quality, Air Quality = {AQI}"
elif AQI >= 4 and AQI <= 6:
return f"Moderate Air Quality, Air Quality = {AQI}"
elif AQI >= 7 and AQI <= 9:
return f"High Air Quality, Air Quality = {AQI}"
else:
return f"Very High Air Quality, Air Quality = 10"End of Code
____________________________________________________________________________________________________________
Note: This will display all of the things like how much carbon monoxide and stuff, I am not good at chemistry so I googled all of the chemical names sorry ):
Hope this helps you all beginners to getting a good idea of how much pain I felt making this CurrentAirPollution Functions cus too many errors started coming but I came up with this. Please don't be arrogant like me I suffered a lot, 2 hours of work );
Send help
Regards.
Hi y'all, I'm planning to develop a nautic web application which would require a reliable weather forecast API, but its for a friend and I'm not looking for a super-scalable/pricy option.
I would like to get some recomendations on a reliable and cheap (or free, due that I'd do low requests pet day/month)
I've seen windycom API's but the free version is not for production (not real data) and the paid one is ~1k€/yr
Thanks 4ur time.
Openweathermaps does not seem to have that information. I looked on google quite a bit and so far havent found anything that I can use for free. Thanks for any help, I am new to programming, trying to make my homepage with JavaScript.
I'm in need of an API that will provide current weather conditions (static location- UK). I had my heart set on Weather Underground but that's not going to be possible for much longer.
I'm still in the process of looking for myself but thought I'd ask, for my recommendations too.
UPDATE:
I've looked at the sites mentioned below and stuck with: Darksky.net, API, their API provides 1,000 free calls per day. (Suggested by Steeze206)
Then for icons I used - https://erikflowers.github.io/weather-icons/ (suggested by Gizm083)
Ever since Dark Sky announced they were shutting down, I wanted to find a drop-in compatible replacement for the half dozen things around my house that relied on weather data. Moreover, weather forecast are mostly run by governments, I wanted a data source that made this data much easier to use. The combination of these two goals was Pirate Weather. It’s designed to be 1:1 compatible with Dark Sky, and since every processing step is documented, you can work out exactly where the data is coming from and what it means.
All the processing scripts are in the GitHub repository. Since releasing it last year, the API has come a long way, squashing a ton of bugs and improving stability. The community feedback has been invaluable, and I’ll be continuing to make improvements to it over time, with better text summaries coming next!
As part of this, I also put together a repository with a python notebook to grab a weather data variable directly from NOAA and process it, which might also be useful to some applications here!
I found a decent free tier API that gives some hourly forecast data (openWeatherMap.com). It's pretty decent, but I started looking at their pricing for paid plans, and like, holy FUCK the "developer" plan is $180 per month! for a weather api? with limited endpoints? Why would anyone pay that much?
What's your favorite free weather API?
EDIT: I ended up going with weatherapi.com. Their endpoints are much more detailed than other options and offer 3 days of hour-by-hour forecast data on free tier, which is best in class.
Hello all,
I decided to try my hand at a weather app to familiarize myself with API interactions, JSON data and the end goal is to make this data accessible through a gui. I have currently made my API get request and after much trial and error, can isolate the json data values into variables.
I am making this post looking for some advice as to the best way to organize this data. Ultimately I would like to be able to input the city and date/time into the gui and have it output results such as max/min temps and real feel. I know that once I can have it output those few results adding more will be simple.
My real question is, what is the best way to organize the data I extract from the json with that functionality in mind?
import requests
import json
import datetime
import pprint
payload = {'lat': 43.94, 'lon': -70.89, 'appid': 'api_key' , 'units': 'imperial'}
api_url = 'http://api.openweathermap.org/data/2.5/forecast'
r = requests.get(api_url, params=payload)
w_data = r.json()
r_dict_f = json.dumps(w_data, indent=2)
results = []
loc = []
dates = []
highs = []
lows = []
city = w_data['city']['name']
for item in w_data['list']:
date = item['dt_txt']
dates.append(date)
results.append(date)
low = item['main']['temp_min']
lows.append(low)
results.append(low)
high = item['main']['temp_max']
highs.append(high)
results.append(high)
data = {
'date': dates,
'city': city,
'weather': {
'highs': highs,
'lows': lows
}
}
pprint.pprint(data)So right now I'm just trying to print out the data. It seems like I am organizing it poorly so I am reaching out for some advice.
Please do not write any code for me. If you could just explain what I might want to do next to work toward my goal I would appreciate it. I find that I learn better when I have a direction to move in and do the research myself.
Thank you!