  {"id":39,"date":"2024-12-13T11:00:28","date_gmt":"2024-12-13T11:00:28","guid":{"rendered":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/?page_id=39"},"modified":"2025-01-21T18:59:15","modified_gmt":"2025-01-21T18:59:15","slug":"page-2","status":"publish","type":"page","link":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/page-2\/","title":{"rendered":"Coding Projects"},"content":{"rendered":"\n<p><strong>RTA app<\/strong><\/p>\n\n\n\n<p>I created an R app to visualise <a href=\"https:\/\/www.data.gov.uk\/dataset\/cb7ae6f0-4be6-4935-9277-47e5ce24a11f\/road-safety-data\">UK government data<\/a> on serious and fatal road traffic accidents. All code is available on my Github. In this project I enjoyed getting the maps to interact and learned about shape files and the leaflet library. The link below will take you to shinyapps.io where the application is hosted. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/ulv3kh-malcolm.shinyapps.io\/rtaapp\/\">Road Traffic Accidents<\/a> (2019 data).<\/li>\n<\/ul>\n\n\n\n<p><strong>Sprint 1 &#8211; Dynamic programming<\/strong><\/p>\n\n\n\n<p>An interesting task in this sprint was to produce a visualisation of an optimal booking control policy for a problem with an airline theme. Consider a network of two legs. Leg 1 services Frankfurt to London with 20 seats capacity. Leg 2 services London to New York with 40 seats capacity. Passengers may book either a single leg journey or a two-leg journey. The time until departure is 100 days, the prices of each of the 3 tickets was detailed in the question, each with a different probability of booking requests being made. At any time we can accept a requested booking or reject the booking. What is the optimal policy to maximise the expected revenue?<\/p>\n\n\n\n<p>It turns out this problem can be solved exactly with the Bellman equation, and I wrote a small app to visualise the optimal policy.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/ulv3kh-malcolm.shinyapps.io\/STOR-i_DP\/\" data-type=\"link\" data-id=\"https:\/\/ulv3kh-malcolm.shinyapps.io\/STOR-i_DP\/\">Optimal policy visualiser<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>RTA app I created an R app to visualise UK government data on serious and fatal road traffic accidents. All code is available on my Github. In this project I enjoyed getting the maps to interact and learned about shape &hellip; <a href=\"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/page-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":84,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-39","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/pages\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/users\/84"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":7,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/pages\/39\/revisions"}],"predecessor-version":[{"id":165,"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/pages\/39\/revisions\/165"}],"wp:attachment":[{"href":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/malcolm-connolly\/wp-json\/wp\/v2\/media?parent=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}