Last active
December 11, 2015 21:48
-
-
Save ferayebend/4664773 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#bideb arastirmaci destekleri | |
#yil harcama(milyon tl) | |
2003 4.9 | |
2004 5.3 | |
2005 12.3 | |
2006 24.3 | |
2007 58.1 | |
2008 69.9 | |
2009 69.2 | |
2010 65.1 | |
2011 81.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#teydeb hibe milyon tl 2011 sabit fiyatlariyla | |
#yil kobi toplam | |
2003 29.7 85.0 | |
2004 37.8 89.8 | |
2005 76.6 182.5 | |
2006 73.3 210.6 | |
2007 126.6 316.6 | |
2008 122.6 265.4 | |
2009 207.4 436.2 | |
2010 168.9 305.0 | |
2011 162.7 278.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from pylab import * | |
def loadData(inputFile): | |
data = [] | |
for line in inputFile: | |
if line.startswith("#"): | |
continue | |
data.append([str(v) for v in line.strip().split()]) | |
return data | |
def transpose(data): | |
return [[float(data[j][i]) for j in range(len(data))] for i in range(len(data[0]))] | |
if __name__ == '__main__': | |
bideb = transpose(loadData(open('bideb_ist.dat'))) | |
teydeb = transpose(loadData(open('teydeb_ist.dat'))) | |
fraction = [] | |
for i in range(len(bideb[0])): | |
fraction.append(bideb[1][i]/teydeb[2][i]) | |
print 'bideb: ', sum(bideb[1]), 'teydeb: ', sum(teydeb[2]) | |
print 'total fraction:', sum(bideb[1])/sum(teydeb[2]) | |
#print teydeb[0], len(fraction) | |
plot(teydeb[0],fraction,'ro-') | |
show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment