bigfunctions > get_meteo
get_meteo¶
Call or Deploy get_meteo
?
✅ You can call this get_meteo
bigfunction directly from your Google Cloud Project (no install required).
- This
get_meteo
function is deployed inbigfunctions
GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error). - Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
- You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework
Public BigFunctions Datasets:
Region | Dataset |
---|---|
eu |
bigfunctions.eu |
us |
bigfunctions.us |
europe-west1 |
bigfunctions.europe_west1 |
asia-east1 |
bigfunctions.asia_east1 |
... | ... |
Description¶
Signature
get_meteo(latitude, longitude, date)
Description
Get meteo
for latitude
, longitude
and date
Examples¶
select bigfunctions.eu.get_meteo(52.52, 13.41, '2023-05-10')
select bigfunctions.us.get_meteo(52.52, 13.41, '2023-05-10')
select bigfunctions.europe_west1.get_meteo(52.52, 13.41, '2023-05-10')
+-------+
| meteo |
+-------+
| {...} |
+-------+
Need help using get_meteo
?
The community can help! Engage the conversation on Slack
For professional suppport, don't hesitate to chat with us.
Found a bug using get_meteo
?
If the function does not work as expected, please
- report a bug so that it can be improved.
- or open the discussion with the community on Slack.
For professional suppport, don't hesitate to chat with us.
Use cases¶
This get_meteo
function appears to retrieve meteorological data (likely temperature, precipitation, wind, etc.) based on a given latitude, longitude, and date.
Here's a potential use case:
Analyzing the impact of weather on sales for a retail chain.
Imagine a retail company with stores across various locations. They want to understand how weather conditions influence daily sales. They could use this function in the following way:
-
Data Preparation: They have a BigQuery table with daily sales data for each store, including the store's location (latitude and longitude) and the date of the sales.
-
Enriching Sales Data with Weather: They can use the
get_meteo
function within a BigQuery query to add weather information to their sales data. For example:
SELECT
sales.*,
bigfunctions.us.get_meteo(sales.latitude, sales.longitude, sales.date) AS weather_data
FROM
`project.dataset.sales_table` AS sales;
(Assuming the sales table is in the US region. Adjust the dataset name according to the table's location).
-
Analysis: Now they have a combined table with sales and corresponding weather data. They can analyze this data to identify correlations and patterns. For example:
- Do rainy days lead to increased sales of umbrellas or indoor games?
- Does hot weather boost sales of ice cream and cold drinks?
- Does extreme weather (heavy snow, heat waves) negatively impact overall sales?
-
Predictive Modeling: This enriched data can be used to train machine learning models to predict future sales based on weather forecasts.
Other potential use cases:
- Agriculture: Analyzing historical weather patterns to optimize planting and harvesting schedules.
- Real Estate: Understanding the climate of different locations for property valuation and development.
- Tourism: Providing weather information to tourists planning their trips.
- Insurance: Assessing weather-related risks for pricing policies.
Essentially, anytime you need to combine location-based data with historical or current weather information within BigQuery, the get_meteo
function could be a valuable tool. The documentation emphasizes its ease of use by being directly callable within BigQuery without needing to deploy it separately.
Spread the word¶
BigFunctions is fully open-source. Help make it a success by spreading the word!