Weather Data
I looked through the community forums and it appears that there is very few discussions about adding weather data to an existing dataset. The few discussions I found didn't seem to offer a solution for my scenario. I have a dataset that contains GPS location information of the property related to the customer. I would like to connect the weather based on the date the property was entered into the system. I would have to call for the weather data each time there is a new entry. What is the best way to accomplish this task?
Best Answer
-
Opps….that code example is Python. As @MarkSnodgrass answered, you can find Jupyter Notebooks by going to Data and then follow the three dots. If you want a basic overview, post in questions and one of us will give you a few steps to follow.
There are also ways to make JSON calls for weather that I have used to do hurricane tracking in a blank brick. But that doesn't seem applicable to your senario.** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Answers
-
@MichelleH I pulled in their connectors but they don't seem to have a connector that will allow me to grab data instantly. My need is that a property is entered on a specific date. I need the weather on that date. If a person makes a visit to that property the next day or later, a new line of data will appear in the dataset with the date of that visit. I want the weather for that visit also. Maybe I need to find an API connector that will communicate with the weather database but NOAA doesn't seem to have that capability or I just don't understand what they have out there. On a side note, this is a side project I am working on that gets a backseat to the other things I am handling.
0 -
I haven't found very many good pre-built weather connectors myself. If you find a good API to query, you can use something like the Jupyter Notebook to pull in the data and create a weather dataset and then use Magic ETL to join that to your property data based on date and location.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
There are various sites that offer current and historical weather data. But most of the historic data requires a paid plan.
OpenWeatherMap:
Endpoints for current weather: /weather
Historic: /timemachine
Parameters: lat, lon for location, dt for the specific timestamp (Unix format)
Limit on requests per minute; historic requires paid planWeatherstack:
Endpoints for historic: /historic
Parameters: historical_date for the desired date and GPS coordinates
Limited to real-time data in free tier. Historical data requires paid plan.
Visual Crossing Weather API
Historic endpoints: /history
Parameters: lat and lon for location, and startdate/enddate for the date range.
URL for API documentation: https://www.visualcrossing.com/weather-apiOthers:
Meteostat
Weather API by Tomorrow.ioGET https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/history
?location=37.7749,-122.4194
&startDate=2024-11-01
&endDate=2024-11-05
&unitGroup=metric
&key=YOUR_API_KEY
&contentType=jsonimport requests
# Define API endpoint and parameters
api_key = "YOUR_API_KEY"
base_url = "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/history"
params = {
"location": "37.7749,-122.4194", # Example: San Francisco
"startDate": "2024-11-01",
"endDate": "2024-11-05",
"unitGroup": "metric",
"key": api_key,
"contentType": "json"
}
# Make the API request
response = requests.get(base_url, params=params)
# Check the response
if response.status_code == 200:
weather_data = response.json()
print(weather_data)
else:
print(f"Error: {response.status_code}, {response.text}")Test in browser (replace the API key):
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/weatherdata/history?location=37.7749,-122.4194&startDate=2024-11-01&endDate=2024-11-05&unitGroup=metric&key=YOUR_API_KEY&contentType=json
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Opps….that code example is Python. As @MarkSnodgrass answered, you can find Jupyter Notebooks by going to Data and then follow the three dots. If you want a basic overview, post in questions and one of us will give you a few steps to follow.
There are also ways to make JSON calls for weather that I have used to do hurricane tracking in a blank brick. But that doesn't seem applicable to your senario.** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive