This is the accompanying notebook for all data used in the ROOT ACCESS column on bulatlat.com You can modify this to analyze other part of the NEP 2015. This notebook is focused on the ICT component.

Author: Rick Bahague / rick (at) opensourceshoppe (dot) com.

Download datasets from the DBM website.


In [665]:
%matplotlib inline
#%pylab inline
import pandas as pd
import matplotlib.pyplot as plt
import mpld3
import matplotlib.pylab as pylab
import numpy as np
from pylab import *
from IPython.display import Image

pylab.rcParams['figure.figsize'] = 12, 6
pd.set_option('display.max_rows',500)

mpld3.enable_notebook()
DATA_PATH = "../data/"

#durl = 'http://datasets.flowingdata.com/crimeRatesByState2005.csv'
#rdata = genfromtxt(durl,dtype='S8,f,f,f,f,f,f,f,i',delimiter=',')

Load Data for Automatic Appropriation & Proposed Appropriation


In [632]:
#Data taken from DBM Site
auto_approp = pd.read_csv(DATA_PATH + "2015 NEP-Proposed-Automatic.csv")
auto_approp.fillna(value=0,inplace=True)
new_approp = pd.read_csv(DATA_PATH + "2015 NEP-Proposed.csv")
new_approp.fillna(value=0,inplace=True)

#rename columns for clarity
new_approp.columns = [u'uacs_dpt_id', u'Department', u'uacs_agy_id', u'Agency', 
         u'uacs_fpap_id', u'Description', u'operdiv', u'operunit', u'uacs_oper_dsc', u'fndsrc', 
         u'uacs_fundsubcat_dsc', u'uacs_exp_cd', u'Category', u'uacs_sobj_cd', 
         u'Objective', u'Amount']
auto_approp.columns = [u'uacs_dpt_id', u'Department', u'uacs_agy_id', u'Agency', 
         u'uacs_fpap_id', u'Description', u'operdiv', u'operunit', u'uacs_oper_dsc', u'fndsrc', 
         u'uacs_fundsubcat_dsc', u'uacs_exp_cd', u'Category', u'uacs_sobj_cd', 
         u'Objective', u'Amount']

#select data for analysis
auto_approp_data = auto_approp[auto_approp.Amount>0][['Department','Agency','Description','Category','Objective','Amount']]
auto_approp_data['NEP'] = 'AUTO'
new_approp_data = new_approp[new_approp.Amount>0][['Department','Agency','Description','Category','Objective','Amount']]
new_approp_data['NEP'] = 'NEW'
all_data = auto_approp_data.append(new_approp_data)
all_data[ [u'NEP',u'Department', u'Agency', u'Description', u'Category', u'Objective', u'Amount']].to_csv('data.csv')
#all_data.head()

Total New and Automatic Appropriation


In [633]:
all_data['Amount'].sum()


Out[633]:
2606000000.0

Sa kabuuan, mas malaki ng Php 341.7B ang gagastusin ng Administrasyon sa susunod na taon kung ihahambing sa budget ngayong taon.

Expense by class

Data from downloaded CSV file do not match data presented in Congress. In the Congress hearing, DBM reported a lesser amount for Capital outlays. Actual Data shows the discrepancy is more than Php 2B. Actual data shows that P2B is taken from Financial Expense and MOOE and added to Capital Outlay.


In [634]:
expense_class = all_data[['Category','Amount']].groupby(['Category']).sum()
expense_class.sort(columns='Amount',ascending=False,inplace=True)
#expense_class

In [635]:
dbm_presentation_expense = [374582000,937593000,532080000,761745000]

dbm_presentation_class = pd.DataFrame(dbm_presentation_expense)
dbm_presentation_class.index=['Financial Expenses','Maintenance and Other Operating Expenses',
                              'Capital Outlays','Personnel Services']
dbm_presentation_class.columns=['Amount']
dbm_presentation_class.sort_index()
check=dbm_presentation_class.join(expense_class,lsuffix='_DBM',how='left')
#check

In [636]:
#expense_class.sub(dbm_presentation_class)

In [637]:
check.sum()


Out[637]:
Amount_DBM    2606000000
Amount        2606000000
dtype: float64

Spending per Department


In [638]:
departments = all_data[['Department','Amount']].groupby(['Department']).sum()
departments.sort(axis=0,columns='Amount',inplace=True,ascending=False)
t = departments['Amount'].sum()
departments['% Share'] = departments['Amount']/t* 100
departments


Out[638]:
Amount % Share
Department
Internal Revenue Allotment 389860429 14.960109
Debt Interest Payments 372863000 14.307866
Department of Education (DepEd) 339288006 13.019494
Department of Public Works and Highways (DPWH) 300519120 11.531816
Pension and Gratuity Fund 140566386 5.393952
Miscellaneous Personnel Benefits Fund 118142443 4.533478
Department of Social Welfare and Development (DSWD) 108969695 4.181493
Department of the Interior and Local Government (DILG) 105734749 4.057358
Department of National Defense (DND) 99639336 3.823459
Department of Health (DOH) 88020862 3.377623
Budgetary Support to Government Corporations 62635338 2.403505
Department of Transportation and Communications (DOTC) 54537699 2.092774
Department of Agriculture (DA) 49061490 1.882636
State Universities and Colleges (SUCs) 43342336 1.663175
Special Shares of LGUs in the Proceeds of National Taxes 27904053 1.070762
Net Lending 26500000 1.016884
Customs duties and taxes, including tax expenditures 25475000 0.977552
Autonomous Region in Muslim Mindanao (ARMM) 25229264 0.968122
Department of Environment and Natural Resources (DENR) 21274446 0.816364
The Judiciary 19499422 0.748251
Department of Science and Technology (DOST) 19351916 0.742591
Commission on Elections (COMELEC) 16944100 0.650196
Department of Finance (DOF) 14346441 0.550516
National Disaster Risk Reduction and Management Fund ( Calamity Fund ) 14000000 0.537222
Department of Foreign Affairs (DFA) 12969177 0.497666
Other Executive Offices 12722911 0.488216
Department of Labor and Employment (DOLE) 12093761 0.464074
Department of Justice (DOJ) 11818194 0.453499
Congress of the Philippines 11090677 0.425582
Department of Agrarian Reform (DAR) 10586174 0.406223
Commission on Audit (COA) 8162753 0.313229
International Commitments Fund 7443963 0.285647
National Economic and Development Authority (NEDA) 6409563 0.245954
Department of Energy (DOE) 4462932 0.171256
Department of Trade and Industry (DTI) 3750260 0.143909
Local Government Support Fund 2989062 0.114699
Office of the President (OP) 2602457 0.099864
Department of Tourism (DOT) 2181924 0.083727
Contingent Fund 2000000 0.076746
Allocations to Local Government Units 1990362 0.076376
Office of the Ombudsman 1731504 0.066443
Department of Budget and Management (DBM) 1455942 0.055869
Civil Service Commission (CSC) 1175924 0.045124
Presidential Communications Operations Office (PCOO) 1021972 0.039216
Rehabilitation and Reconstruction Program 1000000 0.038373
E-Government Fund 1000000 0.038373
The Judiciary 785487 0.030141
Commission on Human Rights (CHR) 341450 0.013102
Office of the Vice-President (OVP) 226517 0.008692
Special Shares of LGUs in the Proceeds of Fire Code Fees 200000 0.007675
Barangay Officials Death Benefits Fund 50000 0.001919
BSGC - Others 28606 0.001098
Joint Legislative-Executive Councils 2897 0.000111

Mahigit 53.8% ng badyet para sa 2015 ay nakalaan sa Internal Revenue Allotment (IRA), Debt Interest Payments, Department of Education (DepEd), at Department of Public Works and Highways (DPWH). Aabot naman sa P389 B ang pondong inilaan para sa mga Local Government Units (LGUs) sa pamamagitan ng IRA, P373 B naman ang awtomatikong inilaan sa pambayad utang ng bansa, P340B ang gagamitin upang suportahan ang mga programa sa edukasyon at P 300B ang inilaan para sa mga proyekto ng DPWH.


In [669]:
Image(url='https://public.tableausoftware.com/views/ICTSpendingontheNationalExpenditureProgram2015/ProposedBudget2015')


Out[669]:

Spending per Objective


In [639]:
objectives = all_data[['Objective','Amount']].groupby(['Objective']).sum()
objectives.sort(axis=0,columns='Amount',inplace=True,ascending=False)
t = objectives['Amount'].sum()
objectives['Share %'] = objectives['Amount']/t*100
objectives


Out[639]:
Amount Share %
Objective
Internal Revenue Allotment 390460429 14.983132
Interest Expense - Others 372863000 14.307866
Basic Salary - Civilian 251253151 9.641333
Road Networks 242850463 9.318897
Subsidies - Others 121361852 4.657017
Base Pay - Military/Uniformed Personnel (MUP) 70800487 2.716826
Pension Benefits - Military/Uniformed Personnel (MUP) 58735725 2.253865
School Buildings 55742895 2.139021
Subsidy Support to Operations of GOCCs 51796355 1.987581
Flood Control Systems 48917086 1.877095
Other Infrastructure Assets 46579649 1.787400
Financial Assistance to Local Government Units 46142218 1.770615
Lump-sum for Filling of Positions 39500273 1.515743
Terminal Leave Benefits - Civilian 36953461 1.418015
Other Machinery and Equipment 34466262 1.322573
Retirement Gratuity - Civilian 33737811 1.294621
Productivity Enhancement Incentive - Civilian 30647714 1.176044
Retirement and Life Insurance Premiums 30166510 1.157579
Taxes, Duties and Licenses 27023399 1.036968
Irrigation Systems 26603488 1.020855
Loans Outlay - Government-Owned and/or Controlled Corporations 26500000 1.016884
Buildings 25781053 0.989296
PERA - Civilian 22479708 0.862614
Other Personnel Benefits 21519814 0.825780
Bonus - Civilian 20948885 0.803871
Training Expenses 18711777 0.718027
Other Professional Services 18675308 0.716627
Lump-sum for Creation of New Positions - Civilian 16699757 0.640820
Donations 15830865 0.607478
Peformance Based Bonus - Civilian 14641486 0.561838
Office Supplies Expenses 14593190 0.559984
Longevity Pay - Military/Uniformed Personnel (MUP) 14291538 0.548409
Airport Systems 13331617 0.511574
Information and Communication Technology Equipment 13244814 0.508243
Traveling Expenses - Local 12366308 0.474532
Subsistence Allowance - Military/Uniformed Personnel (MUP) 12195537 0.467979
Electricity Expenses 10253042 0.393440
Fuel, Oil and Lubricants Expenses 10074599 0.386592
Hospitals and Health Centers 10043110 0.385384
Other Maintenance and Operating Expenses 9916622 0.380530
Pension Benefits - Veterans 9897026 0.379778
Salaries and Wages - Casual/Contractual 9397415 0.360607
Drugs and Medicines Expenses 9363961 0.359323
Rents - Building and Structures 8384098 0.321723
Scholarship Grants/Expenses 8191589 0.314336
Technical and Scientific Equipment 7977281 0.306112
PERA - Military/Uniformed Personnel (MUP) 7375224 0.283009
Financial Assistance to NGAs 6450511 0.247525
Medical Equipment 6124223 0.235005
Reforestation Projects 5995908 0.230081
Bonus - Military/Uniformed Personnel (MUP) 5900045 0.226402
Other Supplies and Materials Expenses 5803883 0.222712
Aircrafts and Aircrafts Ground Equipment 5483092 0.210403
Other Structures 5388688 0.206780
Overseas Allowance - Civilian 5311566 0.203821
Watercrafts 5033298 0.193143
Cash Gift - Civilian 4690970 0.180007
Clothing/Uniform Allowance - Civilian 4687330 0.179867
Motor Vehicles 4661373 0.178871
Agricultural and Marine Supplies Expenses 4627817 0.177583
Power Supply Systems 4153745 0.159392
Water Supply Systems 4016105 0.154110
Textbooks and Instructional Materials Expenses 3887446 0.149173
Other General Services 3826999 0.146853
Military, Police and Traffic Supplies Expenses 3652790 0.140168
Food Supplies Expenses 3487091 0.133810
Representation Expenses 3481173 0.133583
Medical, Dental and Laboratory Supplies Expenses 3407045 0.130738
PhilHealth - Civilian 2754843 0.105712
Water Expenses 2636013 0.101152
Accountable Forms Expenses 2626596 0.100790
Survey Expenses 2447937 0.093935
Overtime Pay 2435292 0.093449
Security Services 2343967 0.089945
Seaport Systems 2329939 0.089407
Subsidy to NGAs 2311141 0.088685
Rents - ICT Machinery and Equipment 2287511 0.087779
Consultancy Services 2231230 0.085619
Printing and Publication Expenses 2177023 0.083539
Pension Benefits - Civilian 2166539 0.083137
Landline 2109424 0.080945
Internet Subscription Expenses 2076662 0.079688
Loans Outlay - Others 2010000 0.077130
Advertising Expenses 1977915 0.075899
Productivity Incentive Allowance - Civilian 1876328 0.072000
Traveling Expenses - Foreign 1857398 0.071274
Membership Dues and Contributions to Organizations 1685309 0.064670
Furniture and Fixtures 1680060 0.064469
Quarters Allowance - Military/Uniformed Personnel (MUP) 1625390 0.062371
Representation Allowance (RA) 1621609 0.062226
Transportation Allowance (TA) 1614014 0.061935
Cash Gift - Military/Uniformed Personnel (MUP) 1536505 0.058960
Janitorial Services 1499173 0.057528
Office Equipment 1443419 0.055388
Labor and Wages 1398859 0.053678
ICT Consultancy Services 1397622 0.053631
Machinery 1343167 0.051541
Lump-sum for Personnel Services 1298819 0.049840
Hazard Duty Pay - Civilian 1292618 0.049602
Lump-sum for Step Increments - Meritorious Performance 1249965 0.047965
Subsistence Allowance - Magna Carta for Public Health Workers under R.A. 7305 1230187 0.047206
Combat Duty Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 1184862 0.045467
Special Hardship Allowance - Civilian 1174756 0.045079
Rents - Equipment 1141733 0.043812
Pag-IBIG - Civilian 1124897 0.043166
ECIP - Civilian 1123660 0.043118
Investment in Associates 1118082 0.042904
Honoraria - Civilian 1029905 0.039521
Rents - Motor Vehicles 995605 0.038204
Insurance Expenses 986678 0.037862
Mobile 963637 0.036978
Environment/Sanitary Services 940197 0.036078
Extraordinary and Miscellaneous Expenses 937587 0.035978
Communication Networks 932498 0.035783
Military, Police and Security Equipment 930669 0.035713
Lump-sum for Step Increments - Length of Service 891025 0.034191
Police Benefits (NAPOLCOM) 835145 0.032047
Intelligence Expenses 832626 0.031950
Hazard Pay 828834 0.031805
PhilHealth - Military/Uniformed Personnel (MUP) 807041 0.030969
Clothing/Uniform Allowance - Replacement - Military/Uniformed Personnel (MUP) 806575 0.030951
Other Financial Charges 793660 0.030455
Other Property, Plant and Equipment 754943 0.028969
Clothing/Uniform Allowance - Military/Uniformed Personnel (MUP) 738155 0.028325
Bank Charges 728924 0.027971
Chalk Allowance 715854 0.027469
Welfare Goods Expenses 714794 0.027429
Other Land Improvements 710978 0.027282
Transportation and Delivery Expenses 696526 0.026728
Other General Services - ICT Services 667682 0.025621
Postage and Courier Services 658915 0.025285
Confidential Expenses 637793 0.024474
Historical Buildings 624088 0.023948
ICT Software Subscription 613650 0.023548
Productivity Incentive Allowance - Military/Uniformed Personnel (MUP) 612502 0.023504
Hazardous Duty Pay 586035 0.022488
Clothing/Uniform Allowance - Initial - Military/Uniformed Personnel 522693 0.020057
Per Diems - Civilian 513046 0.019687
Land 506019 0.019417
Transportation Equipment 480393 0.018434
Buildings and Other Structures 473041 0.018152
Flying Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 430151 0.016506
Subscription Expenses 413379 0.015863
Clothing/Uniform Allowance - Reenlistment - Military/Uniformed Personnel (MUP) 399414 0.015327
HP - Magna Carta Benefits for Science and Technology under R.A. 8439 380978 0.014619
ECIP - Military/Uniformed Personnel (MUP) 368765 0.014151
Pag-IBIG - Military/Uniformed Personnel (MUP) 368765 0.014151
HP - Magna Carta Benefits for Public Health Workers under R.A. 7305 344010 0.013201
Other Transportation Equipment 337339 0.012945
Communication Equipment 323253 0.012404
Awards/Rewards Expenses 317373 0.012179
Lump-sum for Equivalent-Record Form 299289 0.011485
Instructor's Duty Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 290511 0.011148
Longevity Pay - Civilian 289856 0.011123
Repairs and Maintenance - Furniture and Fixtures 288996 0.011090
Clothing/Uniform Allowance - Special - Military/Uniformed Personnel (MUP) 284732 0.010926
Sea Duty Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 279414 0.010722
Legal Services 270130 0.010366
Training Subsistence Allowance - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 256000 0.009823
Reservist's Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 249021 0.009556
Fidelity Bond Premiums 248064 0.009519
Overseas Allowance - Military/Uniformed Personnel (MUP) 229205 0.008795
Repairs and Maintenance - Investment Property 211509 0.008116
Longevity Pay - Magna Carta Benefits for Science and Technology under R.A. 8439 205354 0.007880
Non-Accountable Forms Expenses 202844 0.007784
Financial Assistance to NGOs/POs 199802 0.007667
Research, Exploration and Development Expenses 192378 0.007382
Lump-sum for Master Teachers 184214 0.007069
Parachutist Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 184201 0.007068
Cable, Satellite, Telegraph and Radio Expenses 180310 0.006919
ICT Office Supplies 175386 0.006730
Subsistence Allowance - Magna Carta Benefits for Science and Technology under R.A. 8439 168159 0.006453
Livestock 164069 0.006296
Interest Paid to other General Government Units 157796 0.006055
Machinery and Equipment 153256 0.005881
Animal/Zoological Supplies Expenses 151872 0.005828
Laundry Allowance - Military/Uniformed Personnel (MUP) 120566 0.004626
Lump-sum for Reclassification of Positions 118393 0.004543
Incentive Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 118302 0.004540
Hospitalization Expenses - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 113298 0.004348
Civil Disturbance Control Subsistence Allowance - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 111524 0.004280
Hazard Duty Pay - Military/Uniformed Personnel (MUP) 110829 0.004253
Hostels and Dormitories 100975 0.003875
Sewer Systems 100000 0.003837
Inquest Allowance - Civilian 97065 0.003725
Marine and Fishery Equipment 85670 0.003287
ICT Training Expenses 84425 0.003240
Disaster Response and Rescue Equipment 83466 0.003203
Prizes 81203 0.003116
Special Duty Allowance - Military/Uniformed Personnel (MUP) 78612 0.003017
ICT Software 76413 0.002932
Auditing Services 71268 0.002735
Investment Property - Buildings 70386 0.002701
Laundry Allowance - Magna Carta Benefits for Public Health Workers under R.A. 7305 64526 0.002476
Aquaculture Structures 63157 0.002424
Operating Lease 57048 0.002189
Rents - Land 52762 0.002025
Agricultural and Forestry Equipment 52352 0.002009
Demolition and Relocation Expenses 43741 0.001678
Rents - Living Quarters 42849 0.001644
Investment Property - Land 36050 0.001383
Laundry Allowance - Magna Carta Benefits for Science and Technology under R.A. 8439 35987 0.001381
Construction and Heavy Equipment 27812 0.001067
Rewards and Incentives 25929 0.000995
Books 24575 0.000943
Specialist's Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 24306 0.000933
Clothing/Uniform Allowance - Cold Weather - Military/Uniformed Personnel (MUP) 24131 0.000926
Special Group Term Insurance - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 22125 0.000849
Laundry Allowance - Civilian 21192 0.000813
Quarters Allowance - Civilian 20886 0.000801
Chemical and Filtering Supplies Expenses 19434 0.000746
Reenlistment Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 19010 0.000729
Hardship Allowance - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 18831 0.000723
Other Lump-sum 17747 0.000681
Night-shift Differential Pay 14351 0.000551
Cloud Computing Service 13832 0.000531
Sports Equipment 11879 0.000456
Honoraria - Magna Carta Benefits for Public Health Social Workers under R.A.7305 10175 0.000390
Investment in Government-Owned and/or Controlled Corporations 10000 0.000384
Desilting and Dredging Expenses 10000 0.000384
Combat Incentive Pay - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 10000 0.000384
Printing Equipment 9933 0.000381
Breeding Stocks 9578 0.000368
ICT Machinery and Equipment 9402 0.000361
HP - Magna Carta Benefits for Public Social Workers under R.A. 9432 9205 0.000353
Medal of Valor Award - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 8520 0.000327
Repairs and Maintenance - Leased Assets 8466 0.000325
Subsistence Allowance - Magna Carta for Public Social Workers under R.A. 9432 8028 0.000308
Subsistence of Detainees - Duty Based Allowance - Military/Uniformed Personnel ( DBA-MUP ) 7998 0.000307
Ground Water Monitoring Stations 7250 0.000278
Lump-sum for NBC No. 308 6041 0.000232
Computer Software 5573 0.000214
RATA of Sectoral/Alternate Sectoral Representatives 4170 0.000160
Other Subscription Expenses 4152 0.000159
Website Maintenance 3008 0.000115
Litigation/Acquired Assets Expenses 2975 0.000114
Trees, Plants and Crops 2100 0.000081
Clothing/Uniform Allowance - Winter - Military/Uniformed Personnel (MUP) 1825 0.000070
Longevity Pay - Magna Carta Benefits fo Public Health Workers under R.A. 7305 1507 0.000058
Repairs and Maintenance - Furniture and Fixtures 1206 0.000046
Parks, Plazas, and Monuments 1000 0.000038
High Risk Duty Pay 893 0.000034
Allowance of PAO Lawyers and Employees Assigned in Night Courts - Civilian 576 0.000022
Generation, Transmission and Distribution Expenses 527 0.000020
Other Leased Assets Improvements 443 0.000017
Airport Equipment 434 0.000017
Work/Zoo Animals 380 0.000015
Hotels and Dormitories 350 0.000013
ICT Generation, Transmission and Distribution Expenses 300 0.000012
Financial Lease 114 0.000004
Patents/Copyrights 15 0.000001
Allowance of Attorney's de Officio - Civilian 13 0.000000
Other Leased Assets 9 0.000000
ICT Research, Exploration and Development Expenses 5 0.000000

ICT Budget Items Per Department

The following lists budget items that can be categorized as ICT spending. Note that there are budget items that are actually almost the same but are treated separately and given separate budgets. Example: ICT Software and Computer Software, Information and Communication Technology Equipment and ICT Machinery and Equipment


In [640]:
ICT_items = [
"Information and Communication Technology Equipment",
"Communication Equipment",
"ICT Office Supplies",
"ICT Software",
"Cloud Computing Service",
"ICT Training Expenses",
"Rents - ICT Machinery and Equipment",
"Internet Subscription Expenses",
"ICT Consultancy Services",
"Communication Networks",
"Other General Services - ICT Services",
"ICT Software Subscription",
"Cable, Satellite, Telegraph and Radio Expenses",
"ICT Machinery and Equipment",
"Computer Software",
"Website Maintenance",
"ICT Generation, Transmission and Distribution Expenses",
"ICT Research, Exploration and Development Expenses"]

In [641]:
search = 'Mobile|ICT|Software|Website|Database|Landline|Internet|Cloud|Information and Communication|Communication Equipment|Communication Network|Cable|MITHI|Internet|Computer'
ict_budget_items=all_data[all_data.Objective.str.contains(search,na=0)]
ict_item_department = ict_budget_items.groupby(['Department']).sum()
#ict_item_objectives = ict_budget_items.groupby(['Category','Objective']).sum()
ict_item_objectives = ict_budget_items.groupby(['Objective']).sum()
ict_item_objectives.sort(columns='Amount',ascending=False,inplace=True)
ict_item_department.sort(columns='Amount',ascending=False,inplace=True)
ict_item_objectives['Share %'] = ict_item_objectives['Amount']/ict_item_objectives['Amount'].sum()*100
ict_item_department['Share %'] = ict_item_department['Amount']/ict_item_department['Amount'].sum()*100

#ict_budget_items.to_csv('ICT Budget Items.csv')
#ict_item_department
ict_item_objectives


Out[641]:
Amount Share %
Objective
Information and Communication Technology Equipment 13244814 52.631034
Rents - ICT Machinery and Equipment 2287511 9.089903
Landline 2109424 8.382237
Internet Subscription Expenses 2076662 8.252050
ICT Consultancy Services 1397622 5.553743
Mobile 963637 3.829213
Communication Networks 932498 3.705476
Other General Services - ICT Services 667682 2.653174
ICT Software Subscription 613650 2.438466
Communication Equipment 323253 1.284513
Cable, Satellite, Telegraph and Radio Expenses 180310 0.716499
ICT Office Supplies 175386 0.696933
ICT Training Expenses 84425 0.335480
ICT Software 76413 0.303643
Cloud Computing Service 13832 0.054964
ICT Machinery and Equipment 9402 0.037361
Computer Software 5573 0.022145
Website Maintenance 3008 0.011953
ICT Generation, Transmission and Distribution Expenses 300 0.001192
ICT Research, Exploration and Development Expenses 5 0.000020

We also looked at programmed ICT projects in the NEP. This differ from above. Project implementation costs will include administrative costs and not only ICT services costs.


In [642]:
search_data = 'BalinkBayan Portal|Digitization|Software System|Information System|Data banking|Data Management|Knowledge Management|Information Management|Computerization|Information technology'
ict_project_details = all_data[all_data.Description.str.contains(search_data,na=0)]
a=ict_project_details[ict_project_details.NEP=='NEW'][['Department','Description','Amount']].groupby(['Department','Description']).sum()
ict_projects = a.groupby(level=0).agg(['sum','count'])

#ict_project_details.to_csv('ICT Project Details.csv')
ict_descriptions = a.groupby(level=1).agg(['sum','count'])
ict_descriptions.sort([('Amount','sum')],ascending=False,inplace=True)
ict_descriptions


Out[642]:
Amount
sum count
Description
Department of Education Computerization Program 8530763 1
Digitization Empowerment Program 2670154 1
Revenue Information Systems Development and Maintenance 1187427 1
Digitization Empowerment for Basic Education 453436 1
Planning , Monitoring, Information Management and Systems Development 358070 1
Data Management including Systems Development and Maintenance 323754 1
Information System Strategic Plan 296813 2
Enterprise Information Systems Plan (EISP) 175000 1
Health Information Systems and Technology Development 117897 1
Planning and Management Information Systems 94016 1
Data Processing, Updating including Resource Information Management and Statistical Services 36202 1
Planning, Monitoring and Knowledge Management 35961 1
Information Technology and Data Management Services 34896 1
Climate Data Management, Agrometeorological and Weather Modification Research and Development 31782 1
Computerization of licensure examination processes and regulations 29823 1
Management of Information Systems 28197 1
Computerization Program 18873 1
Provision of Capacity Building, Knowledge Management Services, Legal Services and Information Systems and Technology Development and Maintenance 17518 1
Information System Strategic Plan (ISSP) 17440 1
Higher Education Management Information System (HEMIS) 12040 1
Information Systems Development and Maintenance 11413 2
BalinkBayan Portal 11361 1
Development Planning and Knowledge Management 11333 1
Information System Development and Maintenance 10914 2
Implementation of the Management Information System 10413 1
Planning, Research, Monitoring and Information Systems Management 10315 1
Operation and Maintenance of Computerized Management Information System 7857 1
Evaluation, Coordination and Monitoring of Industrial Programs/Projects and Management Information System 5828 1
Planning, Policy Formulation and Management Information System 5800 1
Geographical Information System (GIS) Building (Completion) - Northern LA Union Campus 4975 1
Development of a crime reporting and recording system and establishment, coordination and maintenance of the National Crime Information System (NCIS) 4940 1
Computerization - GIFMIS 4838 1
Operation of the Nutrition Management Information System 4674 1
Information System Strategic Plan (Instructional Support) - College of Agribusiness, Fisheries and Marine Sciences ( CAFMS - Malita Campus) 3573 1
Development of Shelter Monitoring Information System 2152 1
Development of Front-line Services Information Systems 1101 1
Unified College Information System 1016 1
Development and Maintenance of the Information System 900 1
Development and maintenance of NCAA Information System which includes Cultural Data Banking and Public Information Services 600 1
Internal Project 4: JRMSU Higher Education Services Management Information System (JRMSU-HESMIS) 586 1
National Museum's Customized Information System 100 1

Show Projects


In [643]:
ict_project_details.head()


Out[643]:
Department Agency Description Category Objective Amount NEP
193 Department of Agrarian Reform (DAR) Office of the Secretary Planning , Monitoring, Information Management ... Personnel Services Retirement and Life Insurance Premiums 2767 AUTO
194 Department of Agrarian Reform (DAR) Office of the Secretary Planning , Monitoring, Information Management ... Personnel Services Retirement and Life Insurance Premiums 179 AUTO
195 Department of Agrarian Reform (DAR) Office of the Secretary Planning , Monitoring, Information Management ... Personnel Services Retirement and Life Insurance Premiums 191 AUTO
196 Department of Agrarian Reform (DAR) Office of the Secretary Planning , Monitoring, Information Management ... Personnel Services Retirement and Life Insurance Premiums 159 AUTO
197 Department of Agrarian Reform (DAR) Office of the Secretary Planning , Monitoring, Information Management ... Personnel Services Retirement and Life Insurance Premiums 3234 AUTO

ICT Expenditure (Auto and New Proposed)


In [644]:
ict_budget = ict_projects.join(ict_item_department['Amount'],how='right')
ict_budget.fillna(0,inplace=True)
ict_budget.columns = ['Amount of New Project','Count of New Projects','Amount ICT Budget Items']
ict_budget.sort(columns='Amount ICT Budget Items',ascending=False,inplace=True)

#test_spending = ict_budget.join(departments,how='right')
#test_spending.fillna(0)
#percentage = test_spending['Amount ICT Budget Items']/test_spending['Amount']*100
#percentage.fillna(0).sort(ascending=False,inplace=True)
#percentage.sort(axis=0,ascending=False)
#percentage
ict_budget


Out[644]:
Amount of New Project Count of New Projects Amount ICT Budget Items
Department
Department of Education (DepEd) 9078315 4 8897669
Department of Science and Technology (DOST) 2707764 3 4920646
Department of Transportation and Communications (DOTC) 0 0 2215389
Department of Finance (DOF) 1215624 2 1353362
E-Government Fund 0 0 1000000
Budgetary Support to Government Corporations 0 0 901414
Department of National Defense (DND) 0 0 771073
Commission on Elections (COMELEC) 295793 1 540776
Department of the Interior and Local Government (DILG) 4940 1 502947
Department of Environment and Natural Resources (DENR) 365756 3 482475
Department of Budget and Management (DBM) 0 0 435520
The Judiciary 175000 1 398156
Department of Agriculture (DA) 35961 1 290155
National Economic and Development Authority (NEDA) 29769 3 263255
Other Executive Offices 58878 9 262507
State Universities and Colleges (SUCs) 14988 5 261737
Department of Agrarian Reform (DAR) 358070 1 258860
Department of Social Welfare and Development (DSWD) 0 0 232827
Congress of the Philippines 0 0 179696
Department of Labor and Employment (DOLE) 49716 3 124146
Department of Foreign Affairs (DFA) 0 0 123636
Department of Health (DOH) 122571 2 120803
Department of Public Works and Highways (DPWH) 0 0 114388
Department of Trade and Industry (DTI) 0 0 84628
Department of Justice (DOJ) 1721 1 84271
Civil Service Commission (CSC) 0 0 76022
Presidential Communications Operations Office (PCOO) 9692 1 52160
Autonomous Region in Muslim Mindanao (ARMM) 0 0 43535
Office of the Ombudsman 25297 2 38412
Office of the President (OP) 0 0 36371
Department of Tourism (DOT) 0 0 34884
Department of Energy (DOE) 34896 1 22166
Commission on Audit (COA) 0 0 15658
Allocations to Local Government Units 0 0 13038
Commission on Human Rights (CHR) 0 0 6585
Office of the Vice-President (OVP) 0 0 6190
Joint Legislative-Executive Councils 0 0 50

The total ICT spending for NEP amounts to the following (in '000' PhP):


In [645]:
ict_budget.sum()


Out[645]:
Amount of New Project      14584751
Count of New Projects            44
Amount ICT Budget Items    25165407
dtype: float64

Get Details of Interesting Projects


In [646]:
inc = ['Other Executive Offices','Department of Science and Technology (DOST)']
department = 'Other Executive Offices'
ict_project_details[ict_project_details.Department==department].groupby(['Agency','Description']).sum()


Out[646]:
Amount
Agency Description
Commission on Filipinos Overseas BalinkBayan Portal 11361
Commission on Higher Education Higher Education Management Information System (HEMIS) 12040
Energy Regulatory Commission Information System Development and Maintenance 9499
Housing and Urban Development Coordinating Council Development of Shelter Monitoring Information System 2152
Mindanao Development Authority Development Planning and Knowledge Management 11955
National Commission for Culture and the Arts-Proper Development and maintenance of NCAA Information System which includes Cultural Data Banking and Public Information Services 5821
National Commission on Muslim Filipinos (Office on Muslim Affairs) Planning, Research, Monitoring and Information Systems Management 11078
National Historical Commission of the Philippines Development and Maintenance of the Information System 968
Philippine Commission on Women (National Commission on the Role of Filipino Women) Development of Front-line Services Information Systems 1101

In [647]:
descr = 'Information System Development and Maintenance'
ict_project_details[ict_project_details.Description == descr]


Out[647]:
Department Agency Description Category Objective Amount NEP
37136 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Retirement and Life Insurance Premiums 103 AUTO
37504 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Retirement and Life Insurance Premiums 423 AUTO
347834 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Basic Salary - Civilian 862 NEW
347835 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services PERA - Civilian 72 NEW
347836 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Clothing/Uniform Allowance - Civilian 15 NEW
347837 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Productivity Incentive Allowance - Civilian 6 NEW
347838 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Bonus - Civilian 72 NEW
347839 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Cash Gift - Civilian 15 NEW
347840 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Pag-IBIG - Civilian 4 NEW
347841 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services PhilHealth - Civilian 9 NEW
347842 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services ECIP - Civilian 4 NEW
347843 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Personnel Services Lump-sum for Step Increments - Length of Service 2 NEW
347844 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Traveling Expenses - Local 2 NEW
347845 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Traveling Expenses - Foreign 20 NEW
347846 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Training Expenses 5 NEW
347847 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Office Supplies Expenses 54 NEW
347848 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Accountable Forms Expenses 1 NEW
347849 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Fuel, Oil and Lubricants Expenses 5 NEW
347850 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Other Supplies and Materials Expenses 1 NEW
347851 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Water Expenses 4 NEW
347852 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Electricity Expenses 46 NEW
347853 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Mobile 6 NEW
347854 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Landline 12 NEW
347855 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Internet Subscription Expenses 4 NEW
347856 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Machinery 4 NEW
347857 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Office Equipment 54 NEW
347858 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Motor Vehicles 47 NEW
347859 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Repairs and Maintenance - Furniture and Fixtures 5 NEW
347860 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Rents - Building and Structures 502 NEW
347861 National Economic and Development Authority (N... Tariff Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Subscription Expenses 5 NEW
352082 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Basic Salary - Civilian 3529 NEW
352083 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services PERA - Civilian 108 NEW
352084 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Representation Allowance (RA) 120 NEW
352085 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Transportation Allowance (TA) 120 NEW
352086 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Clothing/Uniform Allowance - Civilian 45 NEW
352087 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Productivity Incentive Allowance - Civilian 18 NEW
352088 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Bonus - Civilian 294 NEW
352089 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Cash Gift - Civilian 45 NEW
352090 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Pag-IBIG - Civilian 11 NEW
352091 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services PhilHealth - Civilian 34 NEW
352092 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services ECIP - Civilian 11 NEW
352093 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Personnel Services Lump-sum for Step Increments - Length of Service 9 NEW
352094 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Traveling Expenses - Local 216 NEW
352095 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses ICT Training Expenses 377 NEW
352096 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Office Supplies Expenses 505 NEW
352097 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Fuel, Oil and Lubricants Expenses 36 NEW
352098 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Water Expenses 106 NEW
352099 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Electricity Expenses 795 NEW
352100 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Postage and Courier Services 20 NEW
352101 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Mobile 24 NEW
352102 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Landline 50 NEW
352103 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Internet Subscription Expenses 949 NEW
352104 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Other General Services - ICT Services 900 NEW
352105 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Advertising Expenses 68 NEW
352106 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Printing and Publication Expenses 30 NEW
352107 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses Subscription Expenses 27 NEW
352108 Other Executive Offices Energy Regulatory Commission Information System Development and Maintenance Maintenance and Other Operating Expenses ICT Software Subscription 629 NEW

In [648]:
descr = 'Information System Development and Maintenance'
descr = 'Information System'
d=ict_project_details[ict_project_details.Description.str.contains(descr)]
d.groupby(['Agency','Objective']).sum()
#e=d.groupby(['Objective']).sum()
#d.groupby(['Agency']).sum()
#e.sort(columns='Amount',ascending=False)
d['Amount'].sum()


Out[648]:
2063237.0

Telco will get at least the following amount from the government


In [649]:
ppp = [
"Internet Subscription Expenses",
"Landline","Mobile","Cable, Satellite, Telegraph and Radio Expenses"]

c=all_data[all_data.Objective.isin(ppp)]
#c['Amount'].sum()/ict_budget['Amount ICT Budget Items'].sum()*100
c['Amount'].sum()


Out[649]:
5330033.0

Proprietary Software Expenses


In [650]:
proprietary = [
    'ICT Software Subscription',
    'ICT Software',
    'Computer Software',"Cloud Computing Service",]

proprietary_expenses = all_data[(all_data.Objective.isin(proprietary))]

In [651]:
proprietary_expenses['Amount'].sum()/ict_budget['Amount ICT Budget Items'].sum()*100
proprietary_expenses['Amount'].sum()


Out[651]:
709468.0

To Outsource or In-house IT for new projects


In [652]:
benefits = [
       'Basic Salary - Civilian',
       'Retirement and Life Insurance Premiums','Bonus - Civilian',
       'PERA - Civilian',
       'Cash Gift - Civilian', 'Clothing/Uniform Allowance - Civilian',
       'PhilHealth - Civilian',
       'Productivity Incentive Allowance - Civilian',
       'ECIP - Civilian','Pag-IBIG - Civilian',
       'Honoraria - Civilian', 
       'Salaries and Wages - Casual/Contractual']

personnel_benefits = ict_project_details[ict_project_details.Objective.isin(benefits)] 

outsourced = [
       'Other General Services - ICT Services',
       'Consultancy Services',
       'ICT Consultancy Services',
       'Cloud Computing Service','Website Maintenance']

outsourced_expenses = ict_project_details[ict_project_details.Objective.isin(outsourced)]

In [653]:
#personnel_benefits['Amount'].sum()/ict_budget['Amount of New Project'].sum()
personnel_benefits['Amount'].sum()


Out[653]:
463820.0

In [654]:
#outsourced_expenses['Amount'].sum()/ict_budget['Amount of New Project'].sum()
outsourced_expenses['Amount'].sum()


Out[654]:
794160.0

Website Maintenance


In [655]:
Web_Maintenance = all_data[all_data.Objective=='Website Maintenance']
temp=Web_Maintenance[['Department','Agency','Amount']].groupby(['Department','Agency']).sum()
temp.sort(columns='Amount',ascending=False,inplace=True)
temp


Out[655]:
Amount
Department Agency
Department of National Defense (DND) Office of Civil Defense 1500
Department of Environment and Natural Resources (DENR) Office of the Secretary 567
Other Executive Offices National Commission for Culture and the Arts-Proper 550
Department of Budget and Management (DBM) Government Procurement Policy Board-Technical Support Office 150
Autonomous Region in Muslim Mindanao (ARMM) Autonomous Regional Government in Muslim Mindanao 107
Department of the Interior and Local Government (DILG) National Police Commission 66
Department of National Defense (DND) Armed Forces of the Philippines - General Headquarters, AFP and AFP-Wide Service Support Units (AFPWSSUS) 43
Department of Foreign Affairs (DFA) UNESCO National Commission of the Philippines 25

Rents - ICT Machinery and Equipment


In [656]:
#Description, Agency, Department, Category
query_str = 'Rents - ICT Machinery and Equipment'
temp = all_data[all_data.Objective==query_str].groupby(['Department','Agency','Description']).sum()
temp.sort(columns='Amount',ascending=False,inplace=True)
temp


Out[656]:
Amount
Department Agency Description
Department of Science and Technology (DOST) Information and Communications Technology Office Digitization Empowerment Program 1882738
Department of Finance (DOF) Bureau of Internal Revenue Revenue Information Systems Development and Maintenance 363243
Enforcement of Internal Revenue Laws 21118
Department of National Defense (DND) Office of the Secretary - Proper Development, implementation and monitoring of the Defense System of Management (DSOM) 14441
General Management and Supervision 2027
Office of the President (OP) The President's Offices Oversight management on national security concerns 1620
National Economic and Development Authority (NEDA) Philippine Statistics Authority Processing and archiving of civil registry documents 597
Department of Agrarian Reform (DAR) Office of the Secretary Human Resource Development 346
Other Executive Offices Dangerous Drug Board General Management and Supervision 300
Department of Agrarian Reform (DAR) Office of the Secretary Subdivision of Collective CLOA 286
Department of Science and Technology (DOST) Information and Communications Technology Office Provision of technical assistance in the professionalization of Information Technology Personnel 220
Philippine Council for Industry, Energy and Emerging Technology Research and Development (PCIEERD) Formulation of National Policies, Plans, Programs and Strategies for Advance Science, Industry and Energy Sectors 200
Department of Labor and Employment (DOLE) National Maritime Polytechnic Research Services 150
National Economic and Development Authority (NEDA) Philippine National Volunteer Service Coordinating Agency General Management and Supervision 85
Department of Finance (DOF) Bureau of Internal Revenue General Management and Supervision 60
Civil Service Commission (CSC) Civil Service Commission General Management and Supervision 50
State Universities and Colleges (SUCs) Southern Leyte State University Provision of Higher Education Services Including P8,908,000 for Scholarships of Poor and Deserving Students (Expanded Students' Grants-In-Aid Program for Poverty Alleviation-ESGP-PA) and P8,269,000 for Tulong Dunong 20
Conduct of Research Services 10

Percentage change of ICT spending


In [657]:
ict_budget_items['Amount'].sum()/all_data['Amount'].sum()*100
ict_budget_items['Amount'].sum()


Out[657]:
25165407.0

In [658]:
(25165407-10493789)/10493789.


Out[658]:
1.3981239760014232

In [659]:
25165407000/11546000000000.


Out[659]:
0.002179577949073272

DPWH spending compared (2014 vs 2015)


In [660]:
300519120-219341196


Out[660]:
81177924

IRA spending compared (2014 vs 2015)


In [661]:
389860429-341544726


Out[661]:
48315703

total budget


In [662]:
2606000000-2264628503


Out[662]:
341371497

Road Networks (2014 vs 2015)


In [663]:
242850463-180311094


Out[663]:
62539369

Loading 2014 Data, instead.


In [664]:
#Data taken from DBM Site
auto_approp = pd.read_csv(DATA_PATH + "2015 NEP-Adjusted-Automatic.csv")
auto_approp.fillna(value=0,inplace=True)
new_approp = pd.read_csv(DATA_PATH + "2015 NEP-Adjusted.csv")
new_approp.fillna(value=0,inplace=True)

#rename columns for clarity
new_approp.columns = [u'uacs_dpt_id', u'Department', u'uacs_agy_id', u'Agency', 
         u'uacs_fpap_id', u'Description', u'operdiv', u'operunit', u'uacs_oper_dsc', u'fndsrc', 
         u'uacs_fundsubcat_dsc', u'uacs_exp_cd', u'Category', u'uacs_sobj_cd', 
         u'Objective', u'Amount']
auto_approp.columns = [u'uacs_dpt_id', u'Department', u'uacs_agy_id', u'Agency', 
         u'uacs_fpap_id', u'Description', u'operdiv', u'operunit', u'uacs_oper_dsc', u'fndsrc', 
         u'uacs_fundsubcat_dsc', u'uacs_exp_cd', u'Category', u'uacs_sobj_cd', 
         u'Objective', u'Amount']

#select data for analysis
auto_approp_data = auto_approp[auto_approp.Amount>0][['Department','Agency','Description','Category','Objective','Amount']]
auto_approp_data['NEP'] = 'AUTO'
new_approp_data = new_approp[new_approp.Amount>0][['Department','Agency','Description','Category','Objective','Amount']]
new_approp_data['NEP'] = 'NEW'
all_data = auto_approp_data.append(new_approp_data)
#all_data[ [u'NEP',u'Department', u'Agency', u'Description', u'Category', u'Objective', u'Amount']].to_csv('data.csv')
#all_data.head()