{"id":26973,"date":"2018-07-18T10:26:26","date_gmt":"2018-07-18T09:26:26","guid":{"rendered":"https:\/\/www.alananna.co.uk\/blog\/?p=26973"},"modified":"2018-07-17T10:44:39","modified_gmt":"2018-07-17T09:44:39","slug":"rain-4","status":"publish","type":"post","link":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/","title":{"rendered":"Rain"},"content":{"rendered":"<p>The 2018 drought and heatwave continues. There was a brief respite over the past few days and that maybe partly my fault. The lack of rain prompted me to do some work on the <a href=\"https:\/\/www.forces-of-nature.co.uk\/dbdriven\/home\/weather_station.php\">Borth &amp; Ynyslas weather station website<\/a> pages by adding a &#8216;rainfall&#8217; data page. For some reason I never added this\u00a0when I built the website pages back in 2005. The fact that we had gone 25 days without rain meant that I&#8217;d quite like to see such data on the site so set to building it in.That of course prompted the end of the dry streak.<\/p>\n<p>It took a while as I had of course completely forgotten how I had built the site &#8211; the need for extensive documentation of coding when you build such things should not be overlooked. I worked it out in the end. The weather station software on my PC uses a file full of custom tags to generate a second file that is uploaded to the server. As it does so it replaces the custom tags with the\u00a0appropriate weather data. Once on the server I use a php script to take this textual data (which is delimited by the pipe character [|]) and insert each piece of data into an array. I can then address any location within this array and print it to screen within a PHP script. I\u00a0don&#8217;t do this, I actually turn each item in the array into a php variable using a script in another file as it makes it easier to know what each item refers to rather than simply using array locations. I then have several templates stored in a MySQL database that are queried and used to generate the web-page&#8230; Easy when you know how, but remembering quite how I had done it took a while.<\/p>\n<p>All done now, and subscribers can see the <a href=\"https:\/\/www.forces-of-nature.co.uk\/dbdriven\/home\/weather_station.php?action=rain\">Borth &amp; Ynyslas rainfall data page here<\/a>.<\/p>\n<div id=\"attachment_26974\" style=\"width: 618px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-26974\" class=\"size-full wp-image-26974\" src=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg\" alt=\"Borth Rain Data\" width=\"608\" height=\"465\" srcset=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg 608w, https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data-200x153.jpg 200w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/><\/a><p id=\"caption-attachment-26974\" class=\"wp-caption-text\">Borth Rain Data<\/p><\/div>\n<p>However by the time I had done it we had actually had some rain. Not a huge amount, only 0.8mm on Monday to be exact but that was enough to break the spell of consecutive days without rain which had run from June 20th through to July 15th inclusive. That was 25 days without rain &#8211; almost unheard of in Wales! The counter has now been reset and we are now back to a more usual zero consecutive days without rain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The 2018 drought and heatwave continues. There was a brief respite over the past few days and that maybe partly my fault. The lack of rain prompted me to do some work on the Borth &amp; Ynyslas weather station website pages by adding a &#8216;rainfall&#8217; data page. For some reason I never added this\u00a0when I&#46;&#46;&#46;<\/p>\n","protected":false},"author":1312,"featured_media":26974,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[9,2],"tags":[445,45],"class_list":["post-26973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-weather","category-website_design","tag-rain","tag-weather-station"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Rain - A Simple Life of Luxury<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rain - A Simple Life of Luxury\" \/>\n<meta property=\"og:description\" content=\"The 2018 drought and heatwave continues. There was a brief respite over the past few days and that maybe partly my fault. The lack of rain prompted me to do some work on the Borth &amp; Ynyslas weather station website pages by adding a &#8216;rainfall&#8217; data page. For some reason I never added this\u00a0when I&#046;&#046;&#046;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/\" \/>\n<meta property=\"og:site_name\" content=\"A Simple Life of Luxury\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/justal\/\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/justal\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-18T09:26:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"608\" \/>\n\t<meta property=\"og:image:height\" content=\"465\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alan Cole\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@justalcole\" \/>\n<meta name=\"twitter:site\" content=\"@justalcole\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alan Cole\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/\"},\"author\":{\"name\":\"Alan Cole\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\"},\"headline\":\"Rain\",\"datePublished\":\"2018-07-18T09:26:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/\"},\"wordCount\":409,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\"},\"image\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/Borth-Rain-Data.jpg\",\"keywords\":[\"Rain\",\"Weather Station\"],\"articleSection\":[\"Weather\",\"Website Design\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/\",\"name\":\"Rain - A Simple Life of Luxury\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/Borth-Rain-Data.jpg\",\"datePublished\":\"2018-07-18T09:26:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/Borth-Rain-Data.jpg\",\"contentUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/Borth-Rain-Data.jpg\",\"width\":608,\"height\":465,\"caption\":\"Borth Rain Data\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/2018\\\/07\\\/rain-4\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rain\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/\",\"name\":\"A Simple Life of Luxury\",\"description\":\"Tales from a down-shifted family - Making the most of modest means in West Wales\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/45ecde6c89b31a9e21f97fdde4c21372\",\"name\":\"Alan Cole\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\",\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\",\"contentUrl\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\",\"width\":950,\"height\":713,\"caption\":\"Alan Cole\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Selfie.jpg\"},\"description\":\"Alan is a Freelance Website Designer, Sports &amp; Exercise Science Lab Technician and full time Dad &amp; husband with far too many hobbies: Triathlete, Swimming, Cycling, Running, MTBing, Surfing, Windsurfing, SUPing, Gardening, Photography.... The list goes on.\",\"sameAs\":[\"https:\\\/\\\/www.pixelwave.co.uk\",\"http:\\\/\\\/www.facebook.com\\\/justal\\\/\",\"https:\\\/\\\/x.com\\\/justalcole\"],\"url\":\"https:\\\/\\\/www.alananna.co.uk\\\/blog\\\/author\\\/justal123\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rain - A Simple Life of Luxury","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/","og_locale":"en_GB","og_type":"article","og_title":"Rain - A Simple Life of Luxury","og_description":"The 2018 drought and heatwave continues. There was a brief respite over the past few days and that maybe partly my fault. The lack of rain prompted me to do some work on the Borth &amp; Ynyslas weather station website pages by adding a &#8216;rainfall&#8217; data page. For some reason I never added this\u00a0when I&#46;&#46;&#46;","og_url":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/","og_site_name":"A Simple Life of Luxury","article_publisher":"http:\/\/www.facebook.com\/justal\/","article_author":"http:\/\/www.facebook.com\/justal\/","article_published_time":"2018-07-18T09:26:26+00:00","og_image":[{"width":608,"height":465,"url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg","type":"image\/jpeg"}],"author":"Alan Cole","twitter_card":"summary_large_image","twitter_creator":"@justalcole","twitter_site":"@justalcole","twitter_misc":{"Written by":"Alan Cole","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#article","isPartOf":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/"},"author":{"name":"Alan Cole","@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372"},"headline":"Rain","datePublished":"2018-07-18T09:26:26+00:00","mainEntityOfPage":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/"},"wordCount":409,"commentCount":0,"publisher":{"@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372"},"image":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#primaryimage"},"thumbnailUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg","keywords":["Rain","Weather Station"],"articleSection":["Weather","Website Design"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/","url":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/","name":"Rain - A Simple Life of Luxury","isPartOf":{"@id":"https:\/\/www.alananna.co.uk\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#primaryimage"},"image":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#primaryimage"},"thumbnailUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg","datePublished":"2018-07-18T09:26:26+00:00","breadcrumb":{"@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#primaryimage","url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg","contentUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg","width":608,"height":465,"caption":"Borth Rain Data"},{"@type":"BreadcrumbList","@id":"https:\/\/www.alananna.co.uk\/blog\/2018\/07\/rain-4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.alananna.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"Rain"}]},{"@type":"WebSite","@id":"https:\/\/www.alananna.co.uk\/blog\/#website","url":"https:\/\/www.alananna.co.uk\/blog\/","name":"A Simple Life of Luxury","description":"Tales from a down-shifted family - Making the most of modest means in West Wales","publisher":{"@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.alananna.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.alananna.co.uk\/blog\/#\/schema\/person\/45ecde6c89b31a9e21f97fdde4c21372","name":"Alan Cole","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg","url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg","contentUrl":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg","width":950,"height":713,"caption":"Alan Cole"},"logo":{"@id":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2021\/06\/Selfie.jpg"},"description":"Alan is a Freelance Website Designer, Sports &amp; Exercise Science Lab Technician and full time Dad &amp; husband with far too many hobbies: Triathlete, Swimming, Cycling, Running, MTBing, Surfing, Windsurfing, SUPing, Gardening, Photography.... The list goes on.","sameAs":["https:\/\/www.pixelwave.co.uk","http:\/\/www.facebook.com\/justal\/","https:\/\/x.com\/justalcole"],"url":"https:\/\/www.alananna.co.uk\/blog\/author\/justal123\/"}]}},"jetpack_featured_media_url":"https:\/\/www.alananna.co.uk\/blog\/wp-content\/uploads\/2018\/07\/Borth-Rain-Data.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts\/26973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/users\/1312"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=26973"}],"version-history":[{"count":0,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/posts\/26973\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/media\/26974"}],"wp:attachment":[{"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=26973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=26973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alananna.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=26973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}