<commit_before>title = "Patvirtintas biudžetas"
url = "/finansai/patvirtintas-biudzetas"
layout = "default"
is_hidden = 0
contentType = "html"
==
<?php
function onStart()
{
    
    $this->addJs('//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.js');
	$this->addJs('//cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.11/crossfilter.min.js');
    $this->addJs('assets/javascript/dc.js');
    $this->addJs('assets/javascript/biudzetas.js');
    $this->addCss('//cdnjs.cloudflare.com/ajax/libs/dc/2.0.0-alpha.2/dc.css');
    //$this->page['debtDate']=isset($_GET['date'])?date('Y-m-d', strtotime($_GET['date'])):date('Y-m-d');
    
    $this['versions']=Db::select('SELECT BIUDZETAS, SUM(I_KETV) I_KETV, SUM(II_KETV) II_KETV, SUM(III_KETV) III_KETV, SUM(IV_KETV) IV_KETV, SUM(METINE_SUMA) METINE_SUMA, COUNT(id) FROM `budget` GROUP BY BIUDZETAS ORDER BY BIUDZETAS DESC');
    $this['currentVersion']='';
    
    $this['budgetString']='Vilniaus miesto patvirtintas biudžetas per 2017 metus';
    if(isset($_GET['version'])){
        $version=Db::select('SELECT BIUDZETAS FROM `budget` WHERE BIUDZETAS=:version', ['version' => $_GET['version']]);
        if($version[0]){
            $this['budgetString']='Pasirinkta biudžeto versija "'.$version[0]->BIUDZETAS.'"';
            $this['currentVersion']=$version[0]->BIUDZETAS;
            foreach($this['versions'] as &$v){
                $v->selected=(($v->BIUDZETAS==$this['currentVersion'])?'selected="selected"':'');
            }
        }
        //var_dump($versions);
    }
    
}
?>
==
<style type="text/css">
.dc-table-row{
    font-family: Open Sans, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.428571429;
}
.dc-table-column_1{
    white-space: normal;
    text-align:left;
}
 .dc-table-column_2, .dc-table-column_3 , .dc-table-column_4 , .dc-table-column_5 , .dc-table-column_6 , .dc-table-column_7 {
    white-space: nowrap;
    font-family: monospace;
    text-align: right;
    
}
</style>
<input id="debtDateVar" type="hidden" value="{{ this.page.debtDate }}" />
<div class="container" id="contentContainer">

	    <table class="table">
    	    
    	    <tr>
    	        <th>Biudžeto versija</th>
    	        <th>I ketv. suma, &euro;</th>
    	        <th>II ketv. suma, &euro;</th>
    	        <th>III ketv. suma, &euro;</th>
    	        <th>IV ketv. suma, &euro;</th>
    	        <th>Metinė suma, &euro;</th>
    	        <th></th>
    	    </tr>
    	    {% for n in versions %}
    	    <tr>
    	        <td>{{ n.BIUDZETAS }}</td>
    	        <td>{{ n.I_KETV }}</td>
    	        <td>{{ n.II_KETV }}</td>
    	        <td>{{ n.III_KETV }}</td>
    	        <td>{{ n.IV_KETV }}</td>
    	        <td>{{ n.METINE_SUMA }}</td>
    	        <td><a href="/finansai/patvirtintas-biudzetas?version={{ n.BIUDZETAS }}">Peržiūrėti</a></td>
    	    </tr>
    	    {% endfor %}
	    </table>
	
		<div class="row">
		    <div class="col-md-12">
		    	<p>Infografike parodytos biudžete numatomos skirti sumos įvairioms programoms, tikslams ir priemonėms finansuoti.</p>
		    	
				<p>Duomenų šaltinis: <a href="https://github.com/vilnius/biudzetas" target="_blank">Vilniaus miesto savivaldybės atviri duomenys</a></p>
		    </div>
		</div>
		    
		<hr />
		
		<div class="row">
			<div class="col-md-12 text-center">
				<h2 class="red">{{ budgetString }}<br /> <span id="totalDotation" style="font-size:2em;">Skaičiuojam.</span></h2>
			</div>
		</div>
		    
		<input type="hidden" name="currentVersion" id="currentVersion" value="{{ currentVersion }}" />
		
		
	    <hr />
		
		
		<h2>Tikslas</h2>
		<div id="tikslas"></div>
		
		<h2>Programa</h2>
		<div id="programa"></div>
		
		<h2>Asignavimų valdytojas</h2>
		<div id="valdytojas"></div>
		
		
		<div class="row">
		    <div class="col-md-6">
		        <div class="dc-data-count">
		            <span class="filter-count"></span> (suma: <span class="filter-sum"></span>) rodoma iš <span class="total-count"></span> įrašų | <a
		                href="javascript:dc.filterAll(); dc.renderAll();">Atstatyti</a>
		        </div>
		    </div>
		    
		</div>
		<div class="row">
		    <div class="col-md-12">
			    <table class="table table-hover table-condensed table-bordered dc-data-table">
			    </table><commit_msg>automatic update<commit_after>title = "Patvirtintas biudžetas"
url = "/finansai/patvirtintas-biudzetas"
layout = "default"
is_hidden = 0
contentType = "html"
==
<?php
function onStart()
{
    
    $this->addJs('//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.js');
	$this->addJs('//cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.11/crossfilter.min.js');
    $this->addJs('assets/javascript/dc.js');
    $this->addJs('assets/javascript/biudzetas.js');
    $this->addCss('//cdnjs.cloudflare.com/ajax/libs/dc/2.0.0-alpha.2/dc.css');
    //$this->page['debtDate']=isset($_GET['date'])?date('Y-m-d', strtotime($_GET['date'])):date('Y-m-d');
    
    $this['versions']=Db::select('SELECT BIUDZETAS, SUM(I_KETV) I_KETV, SUM(II_KETV) II_KETV, SUM(III_KETV) III_KETV, SUM(IV_KETV) IV_KETV, SUM(METINE_SUMA) METINE_SUMA, COUNT(id) FROM `budget` GROUP BY BIUDZETAS ORDER BY BIUDZETAS DESC');
    $this['currentVersion']='';
    
    $this['budgetString']='Vilniaus miesto patvirtintas biudžetas per 2017 metus';
    if(isset($_GET['version'])){
        $version=Db::select('SELECT BIUDZETAS FROM `budget` WHERE BIUDZETAS=:version', ['version' => $_GET['version']]);
        if($version[0]){
            $this['budgetString']='Pasirinkta biudžeto versija "'.$version[0]->BIUDZETAS.'"';
            $this['currentVersion']=$version[0]->BIUDZETAS;
            foreach($this['versions'] as &$v){
                $v->selected=(($v->BIUDZETAS==$this['currentVersion'])?'selected="selected"':'');
            }
        }
        //var_dump($versions);
    }
    
}
?>
==
<style type="text/css">
.dc-table-row{
    font-family: Open Sans, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.428571429;
}
.dc-table-column_1{
    white-space: normal;
    text-align:left;
}
 .dc-table-column_2, .dc-table-column_3 , .dc-table-column_4 , .dc-table-column_5 , .dc-table-column_6 , .dc-table-column_7 {
    white-space: nowrap;
    font-family: monospace;
    text-align: right;
    
}
</style>
<input id="debtDateVar" type="hidden" value="{{ this.page.debtDate }}" />
<div class="container" id="contentContainer">

	    <table class="table">
    	    
    	    <tr>
    	        <th>Biudžeto versija</th>
    	        <th>I ketv. suma, &euro;</th>
    	        <th>II ketv. suma, &euro;</th>
    	        <th>III ketv. suma, &euro;</th>
    	        <th>IV ketv. suma, &euro;</th>
    	        <th>Metinė suma, &euro;</th>
    	        <th></th>
    	    </tr>
    	    {% for n in versions %}
    	    <tr>
    	        <td>{{ n.BIUDZETAS }}</td>
    	        <td>{{ n.I_KETV }}</td>
    	        <td>{{ n.II_KETV }}</td>
    	        <td>{{ n.III_KETV }}</td>
    	        <td>{{ n.IV_KETV }}</td>
    	        <td>{{ n.METINE_SUMA }}</td>
    	        <td><a href="/finansai/patvirtintas-biudzetas?version={{ n.BIUDZETAS }}">Peržiūrėti</a></td>
    	    </tr>
    	    {% endfor %}
	    </table>
	
		<div class="row">
		    <div class="col-md-12">
		    	<p>Infografike parodytos biudžete numatomos skirti sumos įvairioms programoms, tikslams ir priemonėms finansuoti.</p>
		    	
				<p>Duomenų šaltinis: <a href="https://github.com/vilnius/biudzetas" target="_blank">Vilniaus miesto savivaldybės atviri duomenys</a></p>
		    </div>
		</div>
		    
		<hr />
		
		<div class="row">
			<div class="col-md-12 text-center">
				<h2 class="red">{{ budgetString }}<br /> <span id="totalDotation" style="font-size:2em;">Skaičiuojam.</span></h2>
			</div>
		</div>
		    
		<input type="hidden" name="currentVersion" id="currentVersion" value="{{ currentVersion }}" />
		
		
	    <hr />
		
		
		<h2>Tikslas</h2>
		<div id="tikslas"></div>
		
		<h2>Programa</h2>
		<div id="programa"></div>
		
		<h2>Asignavimų valdytojas</h2>
		<div id="valdytojas"></div>
		
		<h2>Programų vykdytojas</h2>
		<div id="vykdytojas"></div>
		
		
		<div class="row">
		    <div class="col-md-6">
		        <div class="dc-data-count">
		            <span class="filter-count"></span> (suma: <span class="filter-sum"></span>) rodoma iš <span class="total-count"></span> įrašų | <a
		                href="javascript:dc.filterAll(); dc.renderAll();">Atstatyti</a>
		        </div>
		    </div>
		    
		</div>
		<div class="row">
		    <div class="col-md-12">
			    <table class="table table-hover table-condensed table-bordered dc-data-table">
			    </table>
{'fraction_non_alphanumeric': 0.19972050774426459, 'fraction_numerical': 0.01350879236054501, 'mean_word_length': 2.719359029883066, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 215, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5128487', 'n_tokens_mistral': 3684, 'n_tokens_neox': 3365, 'n_words': 518}