{"id":4850,"date":"2023-03-31T20:41:00","date_gmt":"2023-03-31T20:41:00","guid":{"rendered":"https:\/\/dalelane.co.uk\/blog\/?p=4850"},"modified":"2026-04-02T18:35:44","modified_gmt":"2026-04-02T18:35:44","slug":"using-weather-data-in-scratch","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=4850","title":{"rendered":"Using weather data in Scratch"},"content":{"rendered":"<p><strong>In this post, I want to share an example of Scratch projects that use live weather data.<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images.dalelane.co.uk\/2023-03-31-weather\/scratch-project-running.gif\" style=\"border: thin black solid\"\/><\/p>\n<p>At the <a href=\"https:\/\/www.raspberrypi.org\/clubs-conference-2023\/\">Raspberry Pi Clubs Conference<\/a> last week, I talked about the idea of <a href=\"https:\/\/scratch.mit.edu\/\">Scratch<\/a> projects that use live data: projects that do something different every time you run them, based on when or where they are run.<\/p>\n<p>I love this idea. It&#8217;s something I&#8217;ve talked about many times &#8211; like when I tried bringing <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=3900\">NASA data into Scratch<\/a>, or when I built Scratch extensions for different web APIs, such as <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=4329\">Wikipedia<\/a>, <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=3646\">Twitter<\/a>, and <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=4766\">Spotify<\/a>.<\/p>\n<p>I think doing this brings a new perspective to Scratch. Live data can bring projects to life.<\/p>\n<p>So I thought I\u2019d share another example: this time, weather data from <a href=\"https:\/\/open-meteo.com\">Open Meteo<\/a>.<\/p>\n<p><!--more-->This simple demo project shows what is possible.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images.dalelane.co.uk\/2023-03-31-weather\/demo.gif\" style=\"border: thin black solid\"\/><\/p>\n<p>The cat&#8217;s speech bubble has a description of the current weather at the location the project is being run.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images.dalelane.co.uk\/2023-03-31-weather\/weather-code-reporter.png\" style=\"border: thin black solid\"\/><\/p>\n<p>The displayed variable shows the current temperature.<\/p>\n<p>The animated wind sprite shows the wind &#8211; the direction the sprites move in show the current wind direction, and the speed they move is proportional to the current wind speed.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images.dalelane.co.uk\/2023-03-31-weather\/wind-code.png\" style=\"border: thin black solid\"\/><\/p>\n<p><em>And I&#8217;ve added Scratch blocks to <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Geolocation\/getCurrentPosition\">get your current location from the web browser<\/a>, because I assume young students will struggle to find their current latitude and longitude!<\/em><\/p>\n<p>Okay, so this is more of a simple tech demo than an interesting project. But I know that if you put this in the hands of a class of students, between them they could come up with some more fun ways to use it.<\/p>\n<p>And that&#8217;s the point.<\/p>\n<p>I think more of us should be playing with this idea. I&#8217;d love to see more Scratch extensions that enable students to play with different types of data.<\/p>\n<p>If you&#8217;d like to give it a go &#8211; that was the topic of one of my sessions at last week\u2019s Raspberry Pi Clubs Conference. I ran a workshop that ran through everything you need to know to build your own. If you\u2019d like to give it a try, the instructions we went through, and a recording of the workshop, <a href=\"https:\/\/dalelane.co.uk\/blog\/?p=4846\">are all available online<\/a>.<\/p>\n<p>And if you\u2019d just like to play with my weather data demo, you can find it <a href=\"https:\/\/www.dropbox.com\/s\/naycnnl82hp25dn\/weather-report.sb3?dl=0\">in my Dropbox<\/a>. (You&#8217;ll need to use <a href=\"https:\/\/scratch.machinelearningforkids.co.uk\">my copy of Scratch<\/a> to try it).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, I want to share an example of Scratch projects that use live weather data. At the Raspberry Pi Clubs Conference last week, I talked about the idea of Scratch projects that use live data: projects that do something different every time you run them, based on when or where they are run. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[536,609],"class_list":["post-4850","post","type-post","status-publish","format-standard","hentry","category-code","tag-scratch","tag-weather"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4850"}],"version-history":[{"count":2,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4850\/revisions"}],"predecessor-version":[{"id":5977,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4850\/revisions\/5977"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}