lightbulbdeath

lightbulbdeath t1_ivi9974 wrote

>Good use case here for using Power Query in Excel - add this into the advanced editor window, pass the year and city as a variable, and you're away. Probably better to run it as a function, but I did this in 3 mins.
>
>let
>
>yr= "1976",
>
>city = "concord",
>
>src = Web.Page(Web.Contents("https://www.extremeweatherwatch.com/cities/" & city &"/year-" & yr)),
>
>tables = Table.Combine({src{1}[Data],src{2}[Data],src{3}[Data],src{4}[Data],src{5}[Data],src{6}[Data], src{7}[Data],src{8}[Data],src{9}[Data], src{10}[Data],src{11}[Data],src{12}[Data]}),
>
>#"Added Suffix" = Table.TransformColumns(tables, {{"Day", each _ & " " & yr, type text}}),
>
>#"Changed Type" = Table.TransformColumnTypes(#"Added Suffix",{{"Day", type date}, {"High (°F)", Int64.Type}, {"Low (°F)", Int64.Type}})
>
>in
>
>#"Changed Type"

1