How-To: Weather API App
This weather data provides current day weather and 5 day forecast (3hr windows) information and can be utilized to drive advertising strategy.
The app uses Alli Client Credentials and maps the files outputted from the app to the corresponding client S3 buckets. The app also provides the links to the two files (current weather, forecast) within the execution, you can copy the S3 link to download the CSV files locally.
Getting Started
Google Sheet Setup:
The template will pull in these fields to get the corresponding weather information from the Weather API.
Link to Google Sheet you can copy:
https://docs.google.com/spreadsheets/d/1J9kIomm_CjX00gI_rAxEMikHsAZyodLKDDWEqM9OwJo/edit#gid=0
Follow the same column structure and country code format (for USA, country code: us).
States are required only for US regions. For other countries, states should be blank.
Once a copy is made, share it with this email so that the template has access to it:
data-innovation-2018@pmg-datawarehouse.iam.gserviceaccount.com
You can name the tab and the sheet as per your preference, the tab name will be required while setting up the app.
Alli Datasource Setup:
This is an optional step and can be added to the app at any time.
You are required to set up individual data sources for current weather data and forecast data as they are stored in two different files in the S3 bucket. Follow the same steps for both data sources:
Select Add New Datasource in Alli Data → Choose Alli Cloud Storage → Give it a datasource name
In Additional Configuration, you are required to provide the filename containing the data.
Current Weather Data Filename:
{client_name}_weatherapi_{filename}.csv
Forecast Data Filename:
{client_name}_weatherapi_{filename}.csv
You will need to provide the datasource schema for setting up the datasource. You can either drag and drop the files linked below to automatically set up the schema or manually feed the schema in.
Current Weather Data Sample: https://drive.google.com/file/d/10eY55oSgbvTddn7C6cHwuRT96bC-7d62/view?usp=sharing
Forecast Weather Data Sample: https://drive.google.com/file/d/1BKZbvRIUS_tCJHUSIx8GpcFxABDjjY6J/view?usp=sharing
Data Columns:
Current Weather:
Columns: weather_main, weather_description, temp, temp_min, temp_max, pressure, humidity, city, state, country, date
Forecast:
Columns: weather_main, weather_description, temp, temp_min, temp_max, pressure, humidity, timestamp, city, state, country, data_pull_date
Marketplace App Setup:
Name the app per your preference, set it on any necessary schedules and check the notification email.
Enter the client name as it appears in Alli Data. For instance, ace_hardware, etc.
Provide the Sheet ID of the Google Sheet containing the list of cities. ID is the alphanumeric string found in the Google Sheet URL.
Enter the tab name that contains the list of cities within the Google Sheet.
(Optional) Enter the datasource IDs for current weather/forecast data sources. IDs are the alphanumeric strings found in the URL of the corresponding datasource page.
Enter the filenames for the current and forecast weather files. These filenames will be appended to the prefix.