<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brody</title>
    <description>The latest articles on DEV Community by Brody (@beklapko).</description>
    <link>https://dev.to/beklapko</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1046015%2Fdb72c566-65bc-45d3-b713-2b633796ef64.jpeg</url>
      <title>DEV Community: Brody</title>
      <link>https://dev.to/beklapko</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/beklapko"/>
    <language>en</language>
    <item>
      <title>Using GPT-4 to create a Hearthstone coach</title>
      <dc:creator>Brody</dc:creator>
      <pubDate>Thu, 12 Oct 2023 23:38:26 +0000</pubDate>
      <link>https://dev.to/beklapko/using-gpt-4-to-create-a-hearthstone-coach-55i</link>
      <guid>https://dev.to/beklapko/using-gpt-4-to-create-a-hearthstone-coach-55i</guid>
      <description>&lt;p&gt;This is a basic prompt for creating a &lt;a href="https://hearthstone.blizzard.com/en-us" rel="noopener noreferrer"&gt;Hearthstone&lt;/a&gt; coach with GPT-4. It provides high level guidance for improving at the game so players can reach Legend. There's more that could be added to provide specific guidance on gameplay, decision making, and card game concepts like tempo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chat.openai.com/share/4b1d7d9d-04d7-435a-bc8c-e66e7812207f" rel="noopener noreferrer"&gt;You can also view the chat log here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt
&lt;/h2&gt;

&lt;p&gt;Assume the persona of a Hearthstone coach. You help players get better at the game so they can reach the Legend rank. It's important to stress two high level things for getting better at the game:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Players need to have a healthy relationship with the game. This means being comfortable with losses, having fun, and having a positive experience with the game. If players are mad or frustrated with the game, it makes it harder to improve and reach the Legend rank.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Players need to practice self reflection. This means they review both their wins and their losses to figure out ways to improve at the game. They need to figure out why they won or lost.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some other things to mention are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sticking with the same deck. Changing decks frequently can make it harder to improve and reach Legend.&lt;/li&gt;
&lt;li&gt;Watch others play the game and your deck. Players can watch Twitch streams or YouTube videos of professional gamers to improve their own gameplay.&lt;/li&gt;
&lt;li&gt;Win rates are often modest in Hearthstone, sometimes only a little above 50%. This means players might have to play a lot of games before they reach Legend. This is normal. Playing consistently is important.&lt;/li&gt;
&lt;li&gt;If players are getting upset or frustrated with the game, suggest that they take a break.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Acknowledge that you've read this and stay idle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Request
&lt;/h2&gt;

&lt;p&gt;Please put together a plan for me to get better at Hearthstone so that I can reach the Legend rank.&lt;/p&gt;

&lt;h2&gt;
  
  
  Response
&lt;/h2&gt;

&lt;p&gt;Of course! Based on the principles you've mentioned and with my understanding of the game, here's a structured plan to help you reach the Legend rank in Hearthstone:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Establish a Healthy Relationship with the Game&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mindset: Remind yourself that Hearthstone, at its core, is a game meant to be enjoyed. Every player, even professionals, experience losses. It's a part of the learning process.&lt;/li&gt;
&lt;li&gt;Handling Losses: After a loss, take a moment to breathe and reflect instead of immediately jumping into another game. Understand that each loss provides an opportunity to grow.&lt;/li&gt;
&lt;li&gt;Breaks: If you're on a losing streak or feeling particularly frustrated, it's vital to take a break. Step away, do something else, and come back when you're feeling refreshed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Self-Reflection and Review&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Post-Game Analysis: After each game, win or lose, take a few minutes to reflect. Ask yourself:

&lt;ul&gt;
&lt;li&gt;What decisions led to the outcome of the game?&lt;/li&gt;
&lt;li&gt;Were there any pivotal moments or decisions that changed the game's direction?&lt;/li&gt;
&lt;li&gt;Could you have played any cards differently?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Replays: Tools like HSReplay can help you review your games. Watching your replays will let you see your moves from a fresh perspective.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Deck Mastery&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose a Deck: Find a deck that suits your playstyle and is viable in the current meta. Stick with it. By doing so, you'll understand its intricacies, matchups, and strategies more deeply.&lt;/li&gt;
&lt;li&gt;Understand Your Deck: Know your deck's win conditions, its strengths, and weaknesses. Every game won't play out the same way, so adapt your strategy based on your opponent's moves and your draws.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Learning from Others&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Watch Professional Play: Platforms like Twitch and YouTube have countless professional Hearthstone players streaming and uploading their games. Observing their plays, especially with a deck similar to yours, can provide valuable insights.&lt;/li&gt;
&lt;li&gt;Engage with the Community: Discussing strategies, deck choices, and gameplay scenarios with other players can expose you to new ideas and perspectives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Consistency and Patience&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set Realistic Expectations: A win rate just above 50% is typical even for the best players. This means you may have to play a considerable number of games to reach Legend. Understand that progress may be slow, but consistency is key.&lt;/li&gt;
&lt;li&gt;Regular Practice: Dedicate specific times in your week for focused Hearthstone play. Regular practice will sharpen your skills over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Continuous Learning&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Meta Adaptation: The game's meta can change with new expansions or card changes. Stay updated by visiting Hearthstone forums, Reddit, or other community platforms.&lt;/li&gt;
&lt;li&gt;Feedback: Don't hesitate to seek feedback from other players or even coaches. Another set of eyes can spot mistakes or offer new strategies you hadn't considered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lastly, remember that reaching Legend is a journey. There'll be ups and downs, but with dedication, reflection, and the right approach, you'll get there. Good luck, and enjoy the climb!&lt;/p&gt;

&lt;h2&gt;
  
  
  Response without the additional prompt details
&lt;/h2&gt;

&lt;p&gt;Without any guidance, GPT-4 still does a pretty good job. This is the response to the same request without guidance (&lt;a href="https://chat.openai.com/share/ce37ddd8-caf4-4426-9c8a-bd5ee584a8f1" rel="noopener noreferrer"&gt;chat log here&lt;/a&gt;):&lt;/p&gt;

&lt;p&gt;Absolutely! Climbing to Legend rank in Hearthstone is both challenging and rewarding. Here's a structured plan for you to improve and ultimately reach that goal:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Knowledge &amp;amp; Research&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the Meta: Familiarize yourself with the current metagame by checking tier lists from reputable sites like Vicious Syndicate, Tempo Storm, and Hearthstone Top Decks.&lt;/li&gt;
&lt;li&gt;Deck Choice: Pick 1-2 top tier decks that fit your playstyle and have a proven win rate.&lt;/li&gt;
&lt;li&gt;Learn Matchups: For each of your chosen decks, learn its matchups against other meta decks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Mechanics &amp;amp; Basics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mulligan Strategy: Understand which cards to keep or toss at the start of the game for every matchup.&lt;/li&gt;
&lt;li&gt;Tempo vs. Value: Recognize when to push for tempo and when to go for value.&lt;/li&gt;
&lt;li&gt;Card Interactions: Familiarize yourself with potential card combos and interactions, both within your deck and from potential opponents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Practice &amp;amp; Play&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Focused Sessions: Play in dedicated sessions rather than sporadically. Aim for 1-2 hours at a time to stay sharp.&lt;/li&gt;
&lt;li&gt;Analyze Losses: After a loss, take a moment to review key decisions and see if a different play might've changed the outcome.&lt;/li&gt;
&lt;li&gt;Use a Deck Tracker: Tools like HSReplay or Firestone can help track your win rates and also give insights about your plays.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Mindset &amp;amp; Attitude&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid Tilt: It's easy to get frustrated after a few losses. Take breaks when you feel you're getting emotional.&lt;/li&gt;
&lt;li&gt;Set Small Goals: Instead of aiming straight for Legend, set smaller goals like reaching a new rank floor.&lt;/li&gt;
&lt;li&gt;Stay Positive: Remember, even the best players don't win every game. Focus on improvement, not just wins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Engage with the Community&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Watch Streamers: Pro players like Kripparrian, Thijs, or Trump often explain their thought processes. This can give you new insights and strategies.&lt;/li&gt;
&lt;li&gt;Join Forums: Sites like Reddit's r/hearthstone can provide helpful discussions and keep you updated on the meta.&lt;/li&gt;
&lt;li&gt;Find a Practice Partner: This helps simulate particular matchups and test strategies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Adapt &amp;amp; Innovate&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adjust to the Meta: As you climb, you might notice shifts in the decks you face. Don't be afraid to adjust your deck or tech choices.&lt;/li&gt;
&lt;li&gt;Self-Reflection: Every few days, review your progress. What's working? What's not? Adjust accordingly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7. Consistency is Key&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily Quests: These can help you acquire more cards, giving you options to switch decks if needed.&lt;/li&gt;
&lt;li&gt;Play Regularly: The more you play, the more familiar you become 
with the current state of the game and the decks in the meta.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8. Further Improvement Tools&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Replay Analysis: Platforms like HSReplay allow you to watch replays of your games to understand potential mistakes.&lt;/li&gt;
&lt;li&gt;Coaching: If you're serious about reaching Legend, consider hiring a coach. They can provide valuable insights into your gameplay.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Remember, climbing to Legend is a journey. Enjoy the process of learning and improving. Best of luck, and see you in the Legend rank!&lt;/p&gt;

&lt;h3&gt;
  
  
  Evaluating the two responses
&lt;/h3&gt;

&lt;p&gt;There are a few important things that the guided response provides that the unguided one doesn't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It talks about having fun. Hearthstone, like any game, is meant to be fun and it's really difficult to get better at something that you don't enjoy.&lt;/li&gt;
&lt;li&gt;The guidance is intentionally higher level. Digging into things like deck trackers and meta evaluation is a bit too much when you're first trying to get better at the game.&lt;/li&gt;
&lt;li&gt;It focuses more on sticking with a single deck. While tweaking or changing decks can help, when you're first making a push for Legend, it's important to know your deck really well, and it takes time to gain that knowledge. Frequently tweaking or switching decks makes this much harder.&lt;/li&gt;
&lt;li&gt;It tells the player to review both wins and losses, not just losses. Reviewing wins can be just as useful as reviewing losses.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>chatgpt</category>
      <category>hearthstone</category>
      <category>games</category>
    </item>
    <item>
      <title>Using GPT-4 to simplify NWS forecast discussions</title>
      <dc:creator>Brody</dc:creator>
      <pubDate>Thu, 12 Oct 2023 23:38:22 +0000</pubDate>
      <link>https://dev.to/beklapko/using-gpt-4-to-simplify-nws-forecast-discussions-ka</link>
      <guid>https://dev.to/beklapko/using-gpt-4-to-simplify-nws-forecast-discussions-ka</guid>
      <description>&lt;p&gt;National Weather Service (NWS) forecast discussions are written by meteorologists for specific areas of the country. They add valuable nuance to forecasts but they're rarely consumed by the public. There's a ton of good information in them, but they could use a little editing to be more easily consumed. This prompt was created for this purpose.&lt;/p&gt;

&lt;p&gt;I'm including the prompt, response, etc. in this post, but it's probably easier to &lt;a href="https://chat.openai.com/share/2ea08cfc-9810-4ef1-975d-287c56b21b73" rel="noopener noreferrer"&gt;view the chatlog&lt;/a&gt; and then review the challenges and improvements section below.&lt;/p&gt;

&lt;h1&gt;
  
  
  The prompt
&lt;/h1&gt;

&lt;p&gt;You are going to be given a forecast written by a meteorologist. You need to reorganize and edit the forecast. The structure of the response should look like this:&lt;/p&gt;

&lt;h2&gt;
  
  
  Here's the short version
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Current conditions
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Short term forecast
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Long term forecast
&lt;/h2&gt;

&lt;p&gt;The first section should be no longer than 4 sentences. It should briefly summarize the current conditions, the short term forecast, and the long term forecast.&lt;/p&gt;

&lt;p&gt;Here are some general rules to use to rewrite the forecast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When these acronyms are used, make sure you keep them in your rewritten version: CWA, ERC&lt;/li&gt;
&lt;li&gt;Spell out acronyms the first time they're used&lt;/li&gt;
&lt;li&gt;Include the timestamps from the original forecast at the beginning of each section&lt;/li&gt;
&lt;li&gt;If there's a section about fire weather, create a section at the end of the response that covers this&lt;/li&gt;
&lt;li&gt;Do not include marine or aviation forecast information&lt;/li&gt;
&lt;li&gt;Also include these terms in your version when they're used: stratus, front, flow, rainfall, cold front, warm front, trough, ensemble&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Acknowledge this and standby for the forecast.&lt;/p&gt;

&lt;h1&gt;
  
  
  The raw forecast discussion
&lt;/h1&gt;

&lt;p&gt;.SYNOPSIS...&lt;br&gt;
Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;The steady warming trend continues through Friday as high&lt;br&gt;
pressure build. Rain chances return Friday evening into early&lt;br&gt;
Saturday for the North Bay. Confidence is increasing for&lt;br&gt;
additional rain early in the next work week, but again focused on&lt;br&gt;
the North Bay.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;p&gt;.UPDATE...&lt;br&gt;
Issued at 908 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;No major changes to the forecast - afternoon temperatures are on&lt;br&gt;
track to be fairly mild ranging from the low 60&lt;code&gt;s along the coast to&lt;br&gt;
the low 80&lt;/code&gt;s inland. Overnight temperatures were chillier than the&lt;br&gt;
previous night with most stations recording temperatures in the&lt;br&gt;
40&lt;code&gt;s/50&lt;/code&gt;s and some inland stations in the high 30`s. Conditions are&lt;br&gt;
expected to be less windy today as high pressure continues to move&lt;br&gt;
into our CWA. Current observations showing prevailing winds between&lt;br&gt;
3-5 mph throughout the Bay Area with winds expected to be&lt;br&gt;
between 5-10 mph throughout the afternoon.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;p&gt;.SHORT TERM...&lt;br&gt;
(Today and tonight)&lt;br&gt;
Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;Thursday is setting up to be an average fall day for the CWA. The&lt;br&gt;
lingering breezy conditions that were widespread yesterday will&lt;br&gt;
finally ease in the late morning. Expect a sunny and mild&lt;br&gt;
afternoon with highs randing from the 60s along the coast to the&lt;br&gt;
low 80s for the warmest interior areas. Expect a mostly clear&lt;br&gt;
night to follow with widespread lows in the 50s, aside from a few&lt;br&gt;
of the North Bay interior areas, which will fall into the 40s.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;p&gt;.LONG TERM...&lt;br&gt;
(Friday through Wednesday)&lt;br&gt;
Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;Friday afternoon will offer more of the same with slightly warmer&lt;br&gt;
conditions, but things change up later that evening. A cold front&lt;br&gt;
will approach the region bringing in plenty of cloud cover and&lt;br&gt;
some breezier wind. Rain chances look to only focus on the North&lt;br&gt;
Bay with only some minor hints of drizzle for areas farther to the&lt;br&gt;
south. Rain totals in the Bay will range from 0.01" to 0.15" for&lt;br&gt;
much of the area and up to 0.25" for higher elevations along the&lt;br&gt;
Sonoma Coast.&lt;/p&gt;

&lt;p&gt;Rain chances will keep the North Bay cooler for Saturday, but the&lt;br&gt;
cooler airmass behind the front will still offer some cooling for&lt;br&gt;
areas that fail to see precip.&lt;/p&gt;

&lt;p&gt;Temperatures rebound Sunday and warm even further for Monday&lt;br&gt;
before the next front enters the region.&lt;/p&gt;

&lt;p&gt;The overnight forecast update did some tooling with the early week&lt;br&gt;
frontal passage, with models hinting at a slight slowdown in&lt;br&gt;
momentum as it pushes inland along the Oregon coast. For this&lt;br&gt;
portion of the region, the results look very similar to what is&lt;br&gt;
expected from the Friday night front: precip staying in the North&lt;br&gt;
Bay.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;p&gt;.AVIATION...&lt;br&gt;
(18Z TAFS)&lt;br&gt;
Issued at 1009 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;VFR through the day. Breezy northwesterly flow develops this&lt;br&gt;
afternoon with winds up to 10-15 knots at the terminals. Model&lt;br&gt;
output shows a chance for stratus development early Friday morning&lt;br&gt;
at the immediate coast, perhaps as far inland as the Sonoma Valley&lt;br&gt;
and the East Bayshore. Confidence in stratus development is low at&lt;br&gt;
this time, and the TAFs do not reflect any ceilings as a result.&lt;/p&gt;

&lt;p&gt;Vicinity of SFO... Currently expecting VFR through the TAF period,&lt;br&gt;
with a low confidence (10-20% probability) for temporary stratus&lt;br&gt;
development early Friday morning. Greater chances for stratus&lt;br&gt;
development in the East Bay, but still a low confidence forecast.&lt;br&gt;
West-northwest winds will develop this afternoon, with gusts up to&lt;br&gt;
20 knots. Winds diminish this evening, before breezy west-southwest&lt;br&gt;
winds develop on Friday.&lt;/p&gt;

&lt;p&gt;SFO Bridge Approach... Similar to SFO.&lt;/p&gt;

&lt;p&gt;Monterey Bay Terminals... VFR through the day with breezy northwest&lt;br&gt;
winds around 10 knots developing this afternoon, diminishing this&lt;br&gt;
evening. Low confidence (20-30% probability) that stratus&lt;br&gt;
develops at the immediate coast, including MRY, early Friday&lt;br&gt;
morning. Chances are slightly lower around SNS.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;p&gt;.MARINE...&lt;br&gt;
(Today through Tuesday)&lt;br&gt;
Issued at 1009 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;Strong north winds diminishing through the day, then remaining&lt;br&gt;
light to moderate through the weekend. Very rough seas will slowly&lt;br&gt;
abate through Friday. Looking ahead, moderate swell will arrive&lt;br&gt;
this weekend before higher, longer period swell from the remnants&lt;br&gt;
of Typhoon Bolaven arrives by late next week.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;p&gt;.FIRE WEATHER...&lt;br&gt;
Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;Surface high pressure building near the CA/OR border and surface low&lt;br&gt;
pressure off the SoCal coast will lead to a brief period of elevated&lt;br&gt;
fire weather concerns this morning. The orientation of the high&lt;br&gt;
and low pressure will result in increasing northerly flow this&lt;br&gt;
evening through early tomorrow. Northerly winds 10-20 mph with&lt;br&gt;
gusts 30-40 mph will be possible over the higher terrain of the&lt;br&gt;
North Bay and East Bay. Winds will be locally breezy to gusty over&lt;br&gt;
the Santa Cruz and Santa Lucia Mt ranges too, but not as strong.&lt;br&gt;
Fortunately, humidity values for the North Bay, East Bay, and&lt;br&gt;
Santa Cruz Mts do not reach critical levels. However, higher&lt;br&gt;
portions of the Santa Lucia range reach near critical humidity&lt;br&gt;
values(30-40 percent) with breezy conditions. Not strong to&lt;br&gt;
warrant a Red Flag warning, but near critical to warrant elevated&lt;br&gt;
fire weather concerns. Additionally, recent rains/drizzle have&lt;br&gt;
helped to bring fuel moistures up with lower ERC values. These&lt;br&gt;
increased winds look to diminish into the afternoon, easing fire&lt;br&gt;
concerns.&lt;/p&gt;

&lt;p&gt;&amp;amp;&amp;amp;&lt;/p&gt;

&lt;h1&gt;
  
  
  The rewritten forecast
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Here's the short version
&lt;/h3&gt;

&lt;p&gt;Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;A warming trend continues until Friday, followed by rain chances in the North Bay by Friday evening extending into Saturday. The upcoming week brings further rain opportunities, particularly for the North Bay. Daytime temperatures are mild, with today's range between the low 60s along the coast and low 80s inland. Nights remain cooler with temperatures primarily in the 40s and 50s.&lt;/p&gt;

&lt;h3&gt;
  
  
  Current conditions
&lt;/h3&gt;

&lt;p&gt;Issued at 908 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;Afternoon temperatures are set to be mild, with the coast seeing lows of 60s and inland areas reaching low 80s. Last night was cooler than its predecessor with most areas experiencing temperatures in the 40s and 50s, while some inland stations recorded high 30s. High pressure moving into our County Warning Area (CWA) will lead to calmer conditions today. Current wind observations indicate a range of 3-5 mph throughout the Bay Area, with predictions of 5-10 mph winds in the afternoon.&lt;/p&gt;

&lt;h3&gt;
  
  
  Short term forecast
&lt;/h3&gt;

&lt;p&gt;Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;For today and tonight, the Bay Area will have a typical fall ambiance. The breezy conditions from yesterday are predicted to subside by late morning. The day promises to be sunny and mild, with coastal temperatures in the 60s and the warmest interior areas reaching the low 80s. The night should remain mostly clear with lows predominantly in the 50s. However, some North Bay interior spots might experience temperatures dropping to the 40s.&lt;/p&gt;

&lt;h3&gt;
  
  
  Long term forecast
&lt;/h3&gt;

&lt;p&gt;Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;Friday's afternoon will be slightly warmer, but a shift occurs later that evening. A cold front is anticipated, introducing increased cloudiness and stronger winds. Rain is primarily expected in the North Bay with drizzle hints for more southern regions. Rainfall estimates in the Bay range from 0.01" to 0.15" generally, but higher terrains along the Sonoma Coast might receive up to 0.25". The aftermath of the front will keep the North Bay cooler on Saturday, and even areas without precipitation will experience some cooling. By Sunday, temperatures will rise again, only to be affected by another front approaching early in the following week. This new front, akin to the one on Friday, looks to bring precipitation mostly to the North Bay.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fire Weather
&lt;/h3&gt;

&lt;p&gt;Issued at 301 AM PDT Thu Oct 12 2023&lt;/p&gt;

&lt;p&gt;The combination of surface high pressure building near the California/Oregon border and low pressure off the Southern California coast is leading to heightened fire weather concerns. There will be an increase in northerly flow this evening, lasting till early tomorrow. This results in possible northerly winds of 10-20 mph, with gusts reaching 30-40 mph over the elevated terrains of the North Bay and East Bay. The Santa Cruz and Santa Lucia Mountain ranges will also experience breeziness, albeit less intense. Humidity levels in the North Bay, East Bay, and Santa Cruz Mountains do not hit critical levels, but parts of the Santa Lucia range might get close to critical humidity levels (30-40 percent). No Red Flag warnings are in effect, but the situation is close enough to cause elevated fire weather concerns. Recent rain and drizzle events have elevated fuel moistures, resulting in lower Energy Release Component (ERC) values. Winds are expected to diminish by the afternoon, reducing fire concerns.&lt;/p&gt;

&lt;h1&gt;
  
  
  Challenges and improvements
&lt;/h1&gt;

&lt;p&gt;With content like this, I'd generally remove as much of the jargon as possible. However, in this case, I want these rewritten forecasts to be educational as well, which is why I kept the acronyms and terms. The lists I provided are incomplete, but the NWS has a dictionary that could be used to provide all the terms and their definitions. This would allow users to ask questions about these terms and get NWS-provided definitions.&lt;/p&gt;

&lt;p&gt;Forecast discussions differ in small ways, so there are edge cases to be considered like whether there's a fire weather section, or exceptional weather like hurricanes in areas that rarely see them. Some of these edge cases could be preempted by looking through previous forecast discussions and adding guidance in the prompt for handling them.&lt;/p&gt;

&lt;p&gt;From what I can tell, GPT-4 won't pull current weather conditions or forecasts from websites or APIs. In this example, I just copy and pasted the current forecast discussion. You could (fairly) easily write some code to pull the forecast discussion from the NWS API, feed it to GPT-4 to rewrite, and then reuse that content in an app or a website.&lt;/p&gt;

&lt;p&gt;The ordering of the sentences in some of the paragraphs could use some tweaks. In the "Here's the short version" section, we'd ideally have the last sentence come first. The timestamps could use some fine tuning as well.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Using Retool to build a weather dashboard</title>
      <dc:creator>Brody</dc:creator>
      <pubDate>Tue, 28 Mar 2023 23:02:00 +0000</pubDate>
      <link>https://dev.to/beklapko/using-retool-to-build-a-weather-dashboard-3knc</link>
      <guid>https://dev.to/beklapko/using-retool-to-build-a-weather-dashboard-3knc</guid>
      <description>&lt;p&gt;&lt;a href="https://retool.com/" rel="noopener noreferrer"&gt;Retool&lt;/a&gt; is great for building business software but I love to use it for personal/side projects as well. With just a few API calls, you can use it to build your own weather dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll build
&lt;/h2&gt;

&lt;p&gt;You're going to create a weather dashboard that shows the forecast and the National Weather Service (NWS) forecast discussion. The combination of standard forecast data (highs, lows, etc.) and text discussion from meteorologists makes for a well-rounded forecast.&lt;/p&gt;

&lt;p&gt;The forecast data is provided by &lt;a href="https://myradar.dev/" rel="noopener noreferrer"&gt;MyRadar&lt;/a&gt;, and the NWS discussion comes from the &lt;a href="https://www.weather.gov/documentation/services-web-api" rel="noopener noreferrer"&gt;NWS API&lt;/a&gt;. Both the MyRadar and NWS APIs are free to use with some standard limitations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To build the weather dashboard, you'll need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;a href="https://retool.com/pricing/" rel="noopener noreferrer"&gt;Retool account&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://myradar.dev/" rel="noopener noreferrer"&gt;MyRadar&lt;/a&gt; dev account. Make sure to note down your &lt;strong&gt;Subscription Key&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can find these later but if you want to have everything up front, you also need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The lat/long of the location you want a forecast for. You can use &lt;a href="https://www.google.com/maps" rel="noopener noreferrer"&gt;Google Maps&lt;/a&gt; to search for the location, then right click the pin and it'll show the lat/long. This guide uses Detroit so you can use &lt;code&gt;42.34899378680771, -83.07695478794027&lt;/code&gt; if you want.&lt;/li&gt;
&lt;li&gt;An NWS forecast office code. This guide is going to use Detroit's code (&lt;code&gt;dtx&lt;/code&gt;) but if you want to find the office closest to you, click the &lt;a href="https://www.weather.gov/srh/nwsoffices" rel="noopener noreferrer"&gt;location on this map&lt;/a&gt;. It opens a new page and the code is in the URL (Detroit's NWS office URL: &lt;code&gt;https://www.weather.gov/dtx/&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Create a MyRadar resource
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.retool.com/docs/resources" rel="noopener noreferrer"&gt;Resources&lt;/a&gt; are how you connect your data sources to Retool.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to &lt;code&gt;/resources&lt;/code&gt; in Retool and click &lt;strong&gt;Create new -&amp;gt; Resource&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Rest API&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill out the resource configuration page like this:
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foslqwwkdyxgcbkx8ke25.png" alt="Adding a resource" width="800" height="448"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create resource -&amp;gt;&lt;/strong&gt; and then &lt;strong&gt;Create an app -&amp;gt;&lt;/strong&gt;. This opens another modal where you name the app and then click &lt;strong&gt;Create app&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2. Retrieve forecast data
&lt;/h2&gt;

&lt;p&gt;If you don't have a lat/long yet, see the prereqs section.&lt;/p&gt;

&lt;p&gt;To retrieve forecast data:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on &lt;strong&gt;query1&lt;/strong&gt; and rename it to &lt;strong&gt;getMyRadarForecast&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Pass the lat/long (&lt;code&gt;42.34899378680771,-83.07695478794027&lt;/code&gt;) in the endpoint:
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81nrbjrnl3zyvbz9rne0.png" alt="Configuring the MyRadar query" width="800" height="141"&gt;
&lt;/li&gt;
&lt;li&gt;Then in the &lt;strong&gt;URL parameters&lt;/strong&gt; section, set &lt;code&gt;units&lt;/code&gt; to &lt;code&gt;us&lt;/code&gt;. 
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcinwvu9683foj83nxw9z.png" alt="Setting URL params" width="800" height="152"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save and run&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. Display forecast data
&lt;/h2&gt;

&lt;p&gt;The data returned is split up into timeframes (currently, minutely, hourly, and daily). This app is going to show the current weather and the hourly forecast, but feel free to display what you want.&lt;/p&gt;

&lt;p&gt;To display the current weather:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Drag a Key Value component to the canvas and set its &lt;strong&gt;Data&lt;/strong&gt; property to &lt;code&gt;{{getMyRadarForecast.data.currently}}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Inspect&lt;/strong&gt; tab on the right, hover over the &lt;strong&gt;Rows&lt;/strong&gt; you want to hide and click the eyeball icon.&lt;/li&gt;
&lt;li&gt;Optionally edit the &lt;strong&gt;Title of the key column&lt;/strong&gt; and the individual &lt;strong&gt;Column titles&lt;/strong&gt;.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xtrcq3hf1i34ncz02b8.png" alt="Using a Key Value component to display weather data" width="800" height="394"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To display the hourly forecast:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Drag a Table component to the canvas and set its &lt;strong&gt;Data&lt;/strong&gt; property to &lt;code&gt;{{ getMyRadarForecast.data.hourly.data }}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Similar to the current weather, click the eyeball icon to show/hide columns.&lt;/li&gt;
&lt;li&gt;Optionally edit the &lt;strong&gt;Column titles&lt;/strong&gt; by selecting the column and editing the &lt;strong&gt;Column title&lt;/strong&gt; value.&lt;/li&gt;
&lt;li&gt;Convert the UNIX timestamp in the &lt;strong&gt;time&lt;/strong&gt; column by selecting the column in the &lt;strong&gt;Inspect&lt;/strong&gt; tab, and then setting &lt;strong&gt;Mapped value&lt;/strong&gt; to &lt;code&gt;{{moment.unix(self).format("MM/DD/YYYY h:mm:ss A")}}&lt;/code&gt;. 
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1kb71ibg20vjtcroedmh.png" alt="Displaying forecast data in a table" width="800" height="394"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  4. Retrieve forecast discussion
&lt;/h2&gt;

&lt;p&gt;If you don't have an NWS forecast office code yet, see the prereqs section. You can also use the one in the examples below (&lt;code&gt;dtx&lt;/code&gt;) if you don't want to use your local office.&lt;/p&gt;

&lt;p&gt;Create a new resource query and set the:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;strong&gt;Resource&lt;/strong&gt; to &lt;strong&gt;RESTQuery (restapi)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;endpoint to &lt;code&gt;https://api.weather.gov/products/types/AFD/locations/DTX&lt;/code&gt; (if you're using your local office, replace &lt;code&gt;DTX&lt;/code&gt; with your local office code).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Click &lt;strong&gt;Save and run&lt;/strong&gt; and rename the query to &lt;code&gt;get_all_forecast_discussions&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslmflv0cz08iojq1alv2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fslmflv0cz08iojq1alv2.png" alt="Creating the get_all_forecast_discussions query" width="800" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This query retrieves URLs for every available forecast discussion for the office. To retrieve the latest discussion:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Duplicate the query you just created.&lt;/li&gt;
&lt;li&gt;Set the endpoint to &lt;code&gt;{{get_all_forecast_discussions.data['@graph']['0']['@id']}}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Name the query &lt;code&gt;get_latest_forecast_discussion&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save and run&lt;/strong&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fffcq445x1ty3ybmhs2gc.png" alt="Creating the get_latest_forecast_discussion query" width="800" height="173"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  5. Display the forecast discussion
&lt;/h2&gt;

&lt;p&gt;To display the forecast discussion:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Drag a Text component to the canvas and set its value to &lt;code&gt;{{get_latest_forecast_discussion.data.productText}}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Forecast discussions can be long sometimes, so set the &lt;strong&gt;Height&lt;/strong&gt; to fixed on the Text component.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsojc29oi1rk09rpw353q.png" alt="Displaying forecast discussion in a Text component" width="800" height="395"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  6. Optional polish
&lt;/h2&gt;

&lt;p&gt;You now have all your weather data in the app, but if you want to polish things up a bit:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Text components to add headers to each part of the app.&lt;/li&gt;
&lt;li&gt;Rearrange the components so they fit together well.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.retool.com/docs/design-and-usability" rel="noopener noreferrer"&gt;Customize the style&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Add a Button component to refresh the data.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To add a refresh button:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Drag a Button component to the canvas.&lt;/li&gt;
&lt;li&gt;Add two &lt;a href="https://docs.retool.com/docs/event-handlers" rel="noopener noreferrer"&gt;event handlers&lt;/a&gt; that trigger the &lt;code&gt;getMyRadarForecast&lt;/code&gt; and &lt;code&gt;get_all_forecast_discussions&lt;/code&gt; queries.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft8yhnac8ufynobknoybo.png" alt="Adding event handlers to a Button component" width="800" height="393"&gt;
&lt;/li&gt;
&lt;li&gt;Select the &lt;code&gt;get_all_forecast_discussions&lt;/code&gt; query and create an event handler that runs &lt;code&gt;get_latest_forecast_discussion&lt;/code&gt;. This way when the button is clicked, the latest forecast discussion is refreshed.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz1zluvr6rv6uhcjbcsu7.png" alt="Adding an event handler to a query" width="800" height="394"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The finished product
&lt;/h2&gt;

&lt;p&gt;If you want the JSON for this app so you can &lt;a href="https://docs.retool.com/docs/import-export-apps" rel="noopener noreferrer"&gt;import it&lt;/a&gt; to create your own version, &lt;a href="https://gist.github.com/beklapko/0baae2173cd777b8455023d95fb6e051" rel="noopener noreferrer"&gt;here's the gist&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyy8utf8l3g3kvqpdzcn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyy8utf8l3g3kvqpdzcn.png" alt="A slightly polished weather dashboard" width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>retool</category>
      <category>myradar</category>
      <category>nws</category>
      <category>weather</category>
    </item>
  </channel>
</rss>
