get_meteo¶
get_meteo(latitude, longitude, date)
Description¶
Get meteo
for latitude
, longitude
and date
Usage¶
Call or Deploy get_meteo
?
Call get_meteo
directly
The easiest way to use bigfunctions
get_meteo
function is deployed in 39 public datasets for all of the 39 BigQuery regions.- It can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
- (You need to use the dataset in the same region as your datasets otherwise you may have a function not found error)
Public BigFunctions Datasets
Region | Dataset |
---|---|
eu |
bigfunctions.eu |
us |
bigfunctions.us |
europe-west1 |
bigfunctions.europe_west1 |
asia-east1 |
bigfunctions.asia_east1 |
... | ... |
Deploy get_meteo
in your project
Why deploy?
- You may prefer to deploy
get_meteo
in your own project 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).
- Get started by reading the framework page
Deployment
get_meteo
function can be deployed with:
pip install bigfunctions
bigfun get get_meteo
bigfun deploy get_meteo
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 |
+-------+
| {...} |
+-------+
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.
Need help or Found a bug?
Get help using get_meteo
The community can help! Engage the conversation on Slack
We also provide professional suppport.
Report a bug about 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.
We also provide professional suppport.