Accident Data Screen Scraping

We get the data for the Griffin Helicopters and Helicopter Safety sites by assembling data collected from all over the world by screen scraping the websites of most of the National Accident Investigation Organisations.

The example code here creates a CAccidents object and requests the last 28 days helicopter accidents from the NTSB website.

A Live Demo Can Be Seen Here.
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/samples/sample.master" CodeBehind="accidentdata.aspx.vb" Inherits="www.aviationwebdesign.co.uk.accidentdata1" AspCompat="true" %>
<%@ MasterType TypeName="www.aviationwebdesign.co.uk.sample1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<meta name="keywords" content="accident, data, screen scraping, data mining, miner, ntsb, demonstration, recent, realtime, demo" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Repeater ID="Repeater1" runat="server">
    <HeaderTemplate><table></HeaderTemplate>
    <ItemTemplate>
    <tr><td><%#Eval("Occured") %></td><td> <%#Eval("Regn") %></td></tr>
    <tr><td colspan="2"><%#Eval("Narrative")%></td></tr>
    </ItemTemplate>
    <FooterTemplate></table></FooterTemplate>
    </asp:Repeater>
</asp:Content>
Public Partial Class accidentdata1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim loaccidents As Object = Server.CreateObject("AvBrowserBusObj.CAccidents")

        Dim loDate As Date = Now.Date.AddDays(-28)

        Master.header = "NTSB Accidents Since " & loDate.ToShortDateString

        Try
            loaccidents.PopulateFromNTSBPage(loDate.ToShortDateString)
            Repeater1.DataSource = loaccidents
            Repeater1.DataBind()
        Catch ex As Exception
            Response.Write(ex.Message)
        Finally
            loaccidents = Nothing
        End Try

            
    End Sub

End Class