<commit_before>---
title: Development Tracker
---

<%= partial "partials/projects-header", :locals => { :project => project, :active => "summary", :has_funded_projects => has_funded_projects} %>

<div class="row">
    <div class="twelve columns">
        <% if(non_dfid_data) %>
        <div id="disclaimer" class="disclaimer grey">
            <p><strong>Disclaimer</strong>: The data for this page has been produced from IATI data published by <%= project['organisation'] || "" %>. Please contact them if you have any questions about their data.</p>
        </div>
        <% end %>
    </div>
</div>


<div class="row">
    <div class="twelve columns summary">
        <p class="project-description"><%= project['description'] %></p>

    <%if !project['allRecipients'].nil? && project['allRecipients'].length > 0 %>
        <p>
            <b>Benefitting country/region</b>:
                <%= project['allRecipients'].join(", ") %>
        </p>
    <%end%>
    </div>

</div>

<div class="row">

    <div class="six columns">
        <h3 >Funding</h3>
        <div id="funding-progress" style="height: 150px;" class="progress"></div>

        <!--[if lte IE 8]>
           <div>
                <p><strong>Budget spend to date:</strong> <%= number_to_currency(project['totalProjectSpend'], :unit=>"£", :precision => 0) || 0.00 %></p>
                <p><strong>Project budget:</strong> <%= number_to_currency(project['totalBudget'], :unit=>"£", :precision => 0) || 0.00 %> </p>
           </div>
        <![endif]-->

        <h3 >Status - <%= activity_status(project['status']) %></h3>
        <div id="time-progress" style="height: 150px;" class="progress"></div>

        <!--[if lte IE 8]>
            <div>
                 <p><strong>Start Date:</strong> <%= format_date(choose_better_date(project['start-actual'], project['start-planned'])) %></p>
                 <p><strong>End Date:</strong> <%= format_date(choose_better_date(project['end-actual'], project['end-planned'])) %> </p>
            </div>
        <![endif]-->

        <% if (!project['implementingOrgs'].nil? && !project['implementingOrgs'].empty?)  %>

            <h3>Implementing Organisation(s)</h3>
            <div id="implementing-organisations">
                <ul>
                    <% project['implementingOrgs'].each do |implementingOrgs| %>
                    <li>
                       <%= implementingOrgs %>
                    </li>
                    <% end %>
                </ul>
            </div>
        <% end %>
    </div>


    <div class="six columns" role="presentation">
        <div id="countryMap" class="countryMap"></div>

        <input type="hidden" id="countryName" value="<%= country_name(project['recipient']) %>">
        <input type="hidden" id="countryCode" value="<%= project['recipient'] %>">
        <input type="hidden" id="projectType" value="<%= project['projectType'] %>">
       
        
        <script src="/javascripts/regionBounds.js" type="text/javascript"></script>
        <script src="/javascripts/leaflet/countryBounds.js" type="text/javascript"></script>
        <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
        <link rel="stylesheet" type="text/css" href="/javascripts/leaflet/leaflet.css">
        <link rel="stylesheet" type="text/css" href="/javascripts/leaflet/MarkerCluster.css">
        <link rel="stylesheet" type="text/css" href="/javascripts/leaflet/MarkerCluster.Default.css">
        <script src="/javascripts/leaflet/leaflet.js"></script>
        <script src="/javascripts/leaflet/leaflet-googlemaps.js"></script>
        <script src="/javascripts/leaflet/leaflet.markercluster-src.js"></script>
        <script type="text/javascript">
            var mapType = "project";
            var locations = <%=locations.to_json%>
        </script>
        <script src="/javascripts/countrymap.js" type="text/javascript"></script>

        <div id="countryMapDisclaimer" class="disclaimer grey">
            <p><strong>Disclaimer</strong>: Country borders do not necessarily reflect the UK Government's official position.</p>
        </div>
    </div>

</div>


<div class="row">
    <div class="six columns">
        <h3>Sector groups as a percentage of project budget</h3>
        <div class="row">
            <div class="six columns">
                <div id="sector-breakdown" class="donut"></div>
            </div>
            <div class="six columns">
                <div id="sector-legend">
                    <ul class="legend-list">
                        <% (project_sector_groups(project['iatiId']) || []).each do |sector| %>
                            <li><span class="theme-1 legend-color"></span>
                                <div title="<%=sector[:sector] || "Other"%>" class='truncate'><%=sector[:sector]%></div>
                                <em><%= sector[:formatted] %></em>
                            </li>
                        <% end %>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="six columns">
        <h3 >Project budget vs actual spend</h3>
        <div id="budget-plan-spend-legend">
            <div class="row">
                <div class="six columns">
                    <ul class="legend-list">
                        <li><span class="theme-6 legend-color"></span>
                            <div >Budget</div>
                        </li>
                    </ul>
                </div>
                <div class="six columns">
                    <ul class="legend-list">
                        <li><span class="theme-1 legend-color" style='background-color:#2B6367'></span>
                            <div >Spend</div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div id="budget-plan-spend" style="height: 250px; width: 100%;" class="row"></div>
    </div>



    <script type="text/javascript" src="/javascripts/donut.js"></script>
    <script type="text/javascript" src="/javascripts/progress.js"></script>
    <script type="text/javascript" src="/javascripts/bar.js"></script>

    <script type="text/javascript">
        (function(){
            var sectors = <%= project_sector_groups(project['iatiId']).to_json %>;
            charts.donut("#sector-breakdown", sectors, function(d) { return d.budget; }, function(d){ return d.sector }, function(d){ return d.formatted });
            charts.donutLegend("#sector-legend", ".legend-color", 14, sectors, function(d){ return d.sector });

            var funding = [ {label: "", text: "", value: 0},
                            {label: "Budget spend to date", text: "<%= number_to_currency(project['totalProjectSpend'], :unit=>currency_symbol(project['currency']) || "£", :precision => 0) || 0.00 %>", value: <%= (project['totalProjectSpend'] || 0.00) %>},
                            {label: "Project budget", text: "<%= number_to_currency(project['totalBudget'], :unit=>currency_symbol(project['currency']) || "£", :precision => 0) || 0.00 %>", value: <%= (project['totalBudget'] || 0.00) %>}]
            charts.progressBar("#funding-progress", funding, function(d) { return d.value; }, function(d) { return d.label; }, function(d) { return d.text; });

            var time = [ {label: "Start",
                          text: "<%= format_date(choose_better_date(project['start-actual'], project['start-planned'])) %>",
                          value: <%= choose_better_date(project['start-actual'], project['start-planned']) %>},
                         {label: "Progress by time",
                          text: "",
                          value: new Date().getTime()},
                         {label: "End",
                          text: "<%= format_date(choose_better_date(project['end-actual'], project['end-planned'])) %>",
                          value: <%= choose_better_date(project['end-actual'],   project['end-planned']) %>}];
            charts.progressBar("#time-progress", time, function(d) { return d.value; }, function(d) { return d.label; }, function(d) { return d.text; });

            var budgets = <%= ([["Year" ,"Plan", "Spend"]]) + (project_budget_per_fy project['iatiId']) %>;
            charts.bar("#budget-plan-spend", budgets, ".2s", null, null, ["#D8DCBF", "#2B6367"]);
        })()
    </script>


</div>

    <div class="row">
        <div class="twelve columns download-link">
            <p>Download IATI Data for <%= project['iatiId']%>: <a href="/api/access/activities/<%=project['iatiId'] %>" class="api-link button">JSON</a></p>
        </div>
    </div>
<commit_msg>adding date<commit_after>---
title: Development Tracker
---

<%= partial "partials/projects-header", :locals => { :project => project, :active => "summary", :has_funded_projects => has_funded_projects} %>

<div class="row">
    <div class="twelve columns">
        <% if(non_dfid_data) %>
        <div id="disclaimer" class="disclaimer grey">
            <p><strong>Disclaimer</strong>: The data for this page has been produced from IATI data published by <%= project['organisation'] || "" %>. Please contact them if you have any questions about their data.</p>
        </div>
        <% end %>
    </div>
</div>


<div class="row">
    <div class="twelve columns summary">
        <p class="project-description"><%= project['description'] %></p>

    <%if !project['allRecipients'].nil? && project['allRecipients'].length > 0 %>
        <p>
            <b>Benefitting country/region</b>:
                <%= project['allRecipients'].join(", ") %>
        </p>
    <%end%>
    </div>

</div>

<div class="row">

    <div class="six columns">
        <h3 >Funding</h3>
        <div id="funding-progress" style="height: 150px;" class="progress"></div>

        <!--[if lte IE 8]>
           <div>
                <p><strong>Budget spend to date:</strong> <%= number_to_currency(project['totalProjectSpend'], :unit=>"£", :precision => 0) || 0.00 %></p>
                <p><strong>Project budget:</strong> <%= number_to_currency(project['totalBudget'], :unit=>"£", :precision => 0) || 0.00 %> </p>
           </div>
        <![endif]-->

        <h3 >Status - <%= activity_status(project['status']) %></h3>
        <div id="time-progress" style="height: 150px;" class="progress"></div>

        <!--[if lte IE 8]>
            <div>
                 <p><strong>Start Date:</strong> <%= format_date(choose_better_date(project['start-actual'], project['start-planned'])) %></p>
                 <p><strong>End Date:</strong> <%= format_date(choose_better_date(project['end-actual'], project['end-planned'])) %> </p>
            </div>
        <![endif]-->

        <% if (!project['implementingOrgs'].nil? && !project['implementingOrgs'].empty?)  %>

            <h3>Implementing Organisation(s)</h3>
            <div id="implementing-organisations">
                <ul>
                    <% project['implementingOrgs'].each do |implementingOrgs| %>
                    <li>
                       <%= implementingOrgs %>
                    </li>
                    <% end %>
                </ul>
            </div>
        <% end %>
    </div>


    <div class="six columns" role="presentation">
        <div id="countryMap" class="countryMap"></div>

        <input type="hidden" id="countryName" value="<%= country_name(project['recipient']) %>">
        <input type="hidden" id="countryCode" value="<%= project['recipient'] %>">
        <input type="hidden" id="projectType" value="<%= project['projectType'] %>">
       
        
        <script src="/javascripts/regionBounds.js" type="text/javascript"></script>
        <script src="/javascripts/leaflet/countryBounds.js" type="text/javascript"></script>
        <script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
        <link rel="stylesheet" type="text/css" href="/javascripts/leaflet/leaflet.css">
        <link rel="stylesheet" type="text/css" href="/javascripts/leaflet/MarkerCluster.css">
        <link rel="stylesheet" type="text/css" href="/javascripts/leaflet/MarkerCluster.Default.css">
        <script src="/javascripts/leaflet/leaflet.js"></script>
        <script src="/javascripts/leaflet/leaflet-googlemaps.js"></script>
        <script src="/javascripts/leaflet/leaflet.markercluster-src.js"></script>
        <script type="text/javascript">
            var mapType = "project";
            var locations = <%=locations.to_json%>
        </script>
        <script src="/javascripts/countrymap.js" type="text/javascript"></script>

        <div id="countryMapDisclaimer" class="disclaimer grey">
            <p><strong>Disclaimer</strong>: Country borders do not necessarily reflect the UK Government's official position.</p>
        </div>
    </div>

</div>


<div class="row">
    <div class="six columns">
        <h3>Sector groups as a percentage of project budget</h3>
        <div class="row">
            <div class="six columns">
                <div id="sector-breakdown" class="donut"></div>
            </div>
            <div class="six columns">
                <div id="sector-legend">
                    <ul class="legend-list">
                        <% (project_sector_groups(project['iatiId']) || []).each do |sector| %>
                            <li><span class="theme-1 legend-color"></span>
                                <div title="<%=sector[:sector] || "Other"%>" class='truncate'><%=sector[:sector]%></div>
                                <em><%= sector[:formatted] %></em>
                            </li>
                        <% end %>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="six columns">
        <h3 >Project budget vs actual spend</h3>
        <div id="budget-plan-spend-legend">
            <div class="row">
                <div class="six columns">
                    <ul class="legend-list">
                        <li><span class="theme-6 legend-color"></span>
                            <div >Budget</div>
                        </li>
                    </ul>
                </div>
                <div class="six columns">
                    <ul class="legend-list">
                        <li><span class="theme-1 legend-color" style='background-color:#2B6367'></span>
                            <div >Spend</div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div id="budget-plan-spend" style="height: 250px; width: 100%;" class="row"></div>
    </div>



    <script type="text/javascript" src="/javascripts/donut.js"></script>
    <script type="text/javascript" src="/javascripts/progress.js"></script>
    <script type="text/javascript" src="/javascripts/bar.js"></script>

    <script type="text/javascript">
        (function(){
            var sectors = <%= project_sector_groups(project['iatiId']).to_json %>;
            charts.donut("#sector-breakdown", sectors, function(d) { return d.budget; }, function(d){ return d.sector }, function(d){ return d.formatted });
            charts.donutLegend("#sector-legend", ".legend-color", 14, sectors, function(d){ return d.sector });

            var funding = [ {label: "", text: "", value: 0},
                            {label: "Budget spend to date", text: "<%= number_to_currency(project['totalProjectSpend'], :unit=>currency_symbol(project['currency']) || "£", :precision => 0) || 0.00 %>", value: <%= (project['totalProjectSpend'] || 0.00) %>},
                            {label: "Project budget", text: "<%= number_to_currency(project['totalBudget'], :unit=>currency_symbol(project['currency']) || "£", :precision => 0) || 0.00 %>", value: <%= (project['totalBudget'] || 0.00) %>}]
            charts.progressBar("#funding-progress", funding, function(d) { return d.value; }, function(d) { return d.label; }, function(d) { return d.text; });

            var time = [ {label: "Start",
                          text: "<%= format_date(choose_better_date(project['start-actual'], project['start-planned'])) %>",
                          value: <%= choose_better_date(project['start-actual'], project['start-planned']) %>},
                         {label: "Progress by time",
                          text: "",
                          value: new Date().getTime()},
                         {label: "End",
                          text: "<%= format_date(choose_better_date(project['end-actual'], project['end-planned'])) %>",
                          value: <%= choose_better_date(project['end-actual'],   project['end-planned']) %>}];
            charts.progressBar("#time-progress", time, function(d) { return d.value; }, function(d) { return d.label; }, function(d) { return d.text; });

            var budgets = <%= ([["Year" ,"Plan", "Spend"]]) + (project_budget_per_fy project['iatiId']) %>;
            charts.bar("#budget-plan-spend", budgets, ".2s", null, null, ["#D8DCBF", "#2B6367"]);
        })()
    </script>


</div>

    <div class="row">
        <div class="twelve columns download-link">
            <p>Download IATI Data for <%= project['iatiId']%>: <a href="/api/access/activities/<%=project['iatiId'] %>" class="api-link button">JSON</a></p>
        </div>
    </div>

    <div class="row">
        <div class="twelve columns download-link">
            <p>Project Last Updated on <%= project['lastUpdatedDateTime'].strftime("%d/%m/%Y")%></p>
        </div>
    </div>

{'fraction_non_alphanumeric': 0.18721096203254353, 'fraction_numerical': 0.007422209534684556, 'mean_word_length': 2.1963503649635037, 'pattern_counts': {'":': 0, '<': 424, '<?xml version=': 0, '>': 450, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1364810', 'n_tokens_mistral': 5378, 'n_tokens_neox': 4905, 'n_words': 982}