Dashboard Week Day 4 - APIs

Brief

Our 'simple' goal today was to build an Alteryx App that builds an HTML trend analysis report based on the user input.

We were able to pick between the Historical Weather API or the Wikimedia API.

We had to design an Alteryx App that allows for user inputs:

  •   A location (if using the Weather API)
  •   A Wikipedia page (if using the Wikipedia API)
  •   A time range (start and end date)
  •   Optional inputs that allows the user to change the prompts / output formats to the desired standard.

The Alteryx App will need to pull in the data for that timeframe, create an LLM prompt using the Al Prompt tool and request a trend report in HTML format so it can be rendered directly in our browsers upon completion.

Plan

Connecting to Historical Weather API

First I had to read through the documentation to find out what fields were needed in my text input.

Required fields:

Everything else was optional and was dependent on what you want to bring back

Fields I chose to bring:

temperature_2m_max, temperature_2m_mean, temperature_2m_min, precipitation_sum, precipitation_hours, apparent_temperature_max, apparent_temperature_mean, apparent_temperature_min, weather_code, sunshine_duration, wind_speed_10m_max and then also start and end date as that was noted in the brief.

this in the url would be:

&start_date=##Start##&end_date=##End##&daily=weather_code,temperature_2m_max,temperature_2m_min,temperature_2m_mean,apparent_temperature_max,precipitation_sum,precipitation_hours,sunshine_duration,wind_speed_10m_max&tiemzone=auto$

Building the flow first

I decided to just build the flow first before I put in any user inputs.

All this flow does is pull the data from the API, and then the prompt tool sends the data to Gemini along with an instruction to write a weather trend analysis as a self contained HTML document. A formula tool was used to set the output file path and then the response was converted to a blob and written to the disk as a html file that opened directly into the browser. The output format can be found further down in the prompt section.

User Input Location

One of the requirements was getting location as a user input field. This is possible by using the Map Input Tool which allows a user to select a point on a map. Then by connecting it to a Spatial Info Tool, we can extract the latitude and longitude of that point.

Designing the Prompt

At first I inputted a very generic prompt:

You are a climate data analyst producing a weather trend report for a general audience. Analyse the daily weather data provided and write a complete, self-contained HTML report.
Work only from the data given. Do not estimate, infer, or invent any figure that is not present in the data.
Daily weather observations, as JSON:
Return a complete HTML document beginning with <!DOCTYPE html>. No
markdown, no code fences

As you can expect it outputted a very generic report:

Formatting the Prompt

To keep it easy to read and process, I split my prompt into different sections

  • #Role
  • #Rules: What they have to adhere to
  • #Data: [DownloadData]
  • #WMO Code Translation
  • #Output Format
  • #Data Array
  • #Page Structure
  • #Header
  • #KPI Cards
  • #Tabs
  • #Closing
  • #Style: What applies to every style
  • #Requested Style: [Style]

The Data and Requested Style were pointed to my [DownloadData] and [Style] columns so it would pull the data from the requested dates and location as well as requested Style.

I also decided to make sure that I added some other features such as:

  • Tabbed Sections
  • Survival rating - Score each day on a made-up index from the actual wind, temperature and precipitation, then show a calendar heatmap coloured by score.
  • Laundry Index - Should you have done your laundry based on the weather conditions

Challenges

  • Over-engineering - the more complex my prompt was, the more times it just would not render
  • Consistency with outputs - even with the same prompt the output would be different every time I ran it.
  • Not asking Gemini what the best structure it needed was. I only did this later on where I fed Gemini the prompt I had and asked it to make it more readable for Gemini. This in theory should have made it more optimal however I found that the prompt it gave back was missing some instructions - e.g. what tabs I wanted and style guides.
  • I ended up reverting back to my original prompt.

Prompt Outputs

Clean and Professional

Weather Report

Weather Report

Location: near Moorcroft, Wyoming (44.32337, -104.72476)

Date Range: 2026-07-05 to 2026-07-11 (7 days)

35.2°C
Warmest Day
2026-07-11
15.1°C
Coldest Day
2026-07-08
24.3°C
Mean Temperature
1.90mm
Total Rainfall
98.3hours
Total Sunshine
23.8km/h
Peak Wind Speed
2026-07-07

Temperature Overview

35.2°C Max Temperature
15.1°C Min Temperature
24.3°C Mean Temperature

The mean temperature started at 26.7°C on 2026-07-05 and ended at 27.3°C on 2026-07-11.

Precipitation Overview

1.90mm Total Precipitation
1.10mm Max Daily Precipitation
5days Days with Precipitation

Daily precipitation was 0.00mm on 2026-07-05 and 0.00mm on 2026-07-11.

Sunshine Overview

98.3hours Total Sunshine
14.8hours Max Daily Sunshine
12.2hours Min Daily Sunshine

Sunshine duration was 14.8 hours on 2026-07-05 and 14.7 hours on 2026-07-11.

Wind Overview

23.8km/h Max Wind Speed
20.2km/h Mean Wind Speed

Maximum wind speed was 21.5 km/h on 2026-07-05 and 22.7 km/h on 2026-07-11.

Weather Conditions Overview

Drizzle Most Common Condition
Clear sky Least Common Condition
1day Days with Clear Sky

The weather condition on 2026-07-05 was Partly cloudy, and on 2026-07-11 it was Clear sky.

Survival Rating

Average score: 96

Best day: 2026-07-05 (Score: 97)

Worst day: 2026-07-07 (Score: 92)

2026-07-05 97
Date: 2026-07-05
Score: 97
Temp: 35.0°C / 17.9°C
Rain: 0.00mm
Wind: 21.5 km/h
2026-07-06 93
Date: 2026-07-06
Score: 93
Temp: 31.2°C / 17.8°C
Rain: 0.10mm
Wind: 23.3 km/h
2026-07-07 92
Date: 2026-07-07
Score: 92
Temp: 29.3°C / 17.9°C
Rain: 0.50mm
Wind: 23.8 km/h
2026-07-08 96
Date: 2026-07-08
Score: 96
Temp: 29.1°C / 15.1°C
Rain: 1.10mm
Wind: 11.9 km/h
2026-07-09 96
Date: 2026-07-09
Score: 96
Temp: 30.0°C / 15.2°C
Rain: 0.20mm
Wind: 15.4 km/h
2026-07-10 96
Date: 2026-07-10
Score: 96
Temp: 32.1°C / 15.5°C
Rain: 0.00mm
Wind: 22.9 km/h
2026-07-11 97
Date: 2026-07-11
Score: 97
Temp: 35.2°C / 19.3°C
Rain: 0.00mm
Wind: 22.7 km/h
0-25
26-50
51-75
76-90
91-100

This is an invented comfort index, not a meteorological standard.

Laundry Index

Best drying day: 2026-07-05 (Score: 90)

Days with good or perfect drying conditions (score 60+): 5 days

☀️ 2026-07-05 90/100 Perfect drying day
Sunshine: 14.8 hours
Wind: 21.5 km/h
Rain: 0.00 mm
Max Temp: 35.0°C
🌤️ 2026-07-06 62/100 Good drying day
Sunshine: 12.2 hours
Wind: 23.3 km/h
Rain: 0.10 mm
Max Temp: 31.2°C
☁️ 2026-07-07 54/100 Slow but workable
Sunshine: 13.1 hours
Wind: 23.8 km/h
Rain: 0.50 mm
Max Temp: 29.3°C
🌧️ 2026-07-08 37/100 Better indoors
Sunshine: 14.6 hours
Wind: 11.9 km/h
Rain: 1.10 mm
Max Temp: 29.1°C
🌤️ 2026-07-09 68/100 Good drying day
Sunshine: 14.2 hours
Wind: 15.4 km/h
Rain: 0.20 mm
Max Temp: 30.0°C
☀️ 2026-07-10 90/100 Perfect drying day
Sunshine: 14.7 hours
Wind: 22.9 km/h
Rain: 0.00 mm
Max Temp: 32.1°C
☀️ 2026-07-11 90/100 Perfect drying day
Sunshine: 14.7 hours
Wind: 22.7 km/h
Rain: 0.00 mm
Max Temp: 35.2°C
☀️ 80-100 Perfect drying day
🌤️ 60-79 Good drying day
☁️ 40-59 Slow but workable
🌧️ 20-39 Better indoors
⛈️ 0-19 Do not bother

This is an invented index, not a meteorological standard.

Over the 7 days from 2026-07-05 to 2026-07-11, the maximum temperature observed was 35.2°C on 2026-07-11.

The total precipitation for the period was 1.90mm, with a total of 98.3 hours of sunshine.

Wind speeds reached a peak of 23.8 km/h on 2026-07-07.

Pinks

Weather Report

Weather Report

near Akureyri, Iceland (65.27241, -18.707855)

Data for July 05, 2026 to July 11, 2026 (7 days)

11.7°C
Warmest Day
July 08, 2026
-0.8°C
Coldest Day
July 05, 2026
6.4°C
Mean Temperature
15.30mm
Total Rainfall
85.09hours
Total Sunshine
31.8km/h
Peak Wind Speed
July 11, 2026

Weather Conditions Overview

Drizzle
Most Common
Overcast, Rain
Least Common

The period began on July 05, 2026 with overcast conditions, and ended on July 11, 2026 with drizzle. Drizzle was the most frequent condition, occurring on 5 days.

The period from July 05, 2026 to July 11, 2026 experienced mean temperatures around 6.4°C, with daily maximums ranging from 7.2°C to 11.7°C. Total rainfall for the 7 days was 15.30 mm, with 6 days recording some precipitation. Sunshine duration varied significantly, totaling 85.09 hours over the week.

Retro

Climate Report

Climate Report

near Parral, Chihuahua, Mexico (27.592266, -106.2444)

Data for 2026-08-02 to 2026-08-08 (7 days)

30.9°C
Warmest Day
2026-08-07
15.8°C
Coldest Day
2026-08-08
23.2°C
Mean Temperature
20.30mm
Total Rainfall
89.16hours
Total Sunshine
18.7km/h
Peak Wind Speed
2026-08-06

Temperature Overview

30.9°C
Max Temperature
15.8°C
Min Temperature
23.2°C
Mean Temperature

The maximum daily temperature started at 29.4°C on 2026-08-02 and ended at 28.9°C on 2026-08-08. The minimum daily temperature started at 20.0°C on 2026-08-02 and ended at 15.8°C on 2026-08-08.

Precipitation Overview

20.30mm
Total Precipitation
14.30mm
Max Daily Precipitation
2026-08-07
6
Days with Rain

Daily precipitation started at 0.30 mm on 2026-08-02 and ended at 3.60 mm on 2026-08-08. The highest daily precipitation was 14.30 mm on 2026-08-07, while 0.00 mm was recorded on 2026-08-04.

Sunshine Overview

89.16hours
Total Sunshine
12.96hours
Max Daily Sunshine
2026-08-04
12.74hours
Mean Daily Sunshine

Daily sunshine duration started at 12.90 hours on 2026-08-02 and ended at 12.75 hours on 2026-08-08. The maximum daily sunshine recorded was 12.96 hours on 2026-08-04.

Wind Speed Overview

18.7km/h
Peak Wind Speed
2026-08-06
16.54km/h
Mean Wind Speed
13.9km/h
Min Wind Speed
2026-08-04

The maximum wind speed started at 18.0 km/h on 2026-08-02 and ended at 15.3 km/h on 2026-08-08. The highest recorded wind speed was 18.7 km/h on 2026-08-06.

Weather Conditions Overview

5
Days with Drizzle
1
Days with Rain
1
Days Overcast

The period began with Drizzle on 2026-08-02 and ended with Drizzle on 2026-08-08. The most frequent condition was Drizzle, occurring on 5 days, while Rain occurred on 1 day.

Survival Rating

Average score: 90.7

Best day: 95.9 on 2026-08-03

Worst day: 76.9 on 2026-08-07

67-100
34-66
0-33

This is an invented comfort index, not a meteorological standard.

Laundry Index

Best drying day: 100.0 on 2026-08-04

Days scoring 60 or above: 5 days

☀️ Perfect drying day (80-100)
🌤️ Good drying day (60-79)
☁️ Slow but workable (40-59)
🌧️ Better indoors (20-39)
⛈️ Do not bother (0-19)

This is an invented index, not a meteorological standard.

The period from 2026-08-02 to 2026-08-08 experienced temperatures ranging from a minimum of 15.8°C to a maximum of 30.9°C, with a mean temperature of 23.2°C.

Total rainfall for the week was 20.30 mm, with the highest daily amount of 14.30 mm occurring on 2026-08-07.

Sunshine was consistent, totaling 89.16 hours across the seven days.

Author:
Sophie Yeung
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2026 The Information Lab