示例#1
0
    #     fieldnameList_t = ['std_residual']
    fieldnameList_t = []
    fieldnameList_est = []

    for fieldname in fieldnameList:
        fieldname_t = "t_" + fieldname
        fieldname_est = "est_" + fieldname
        fieldnameList_t.append(fieldname_t)
        fieldnameList_est.append(fieldname_est)

    # change fieldnameList
    for indx, fieldname in enumerate(fieldnameList_t):

        filename = filename1 + filename2

        lstFlds, dicAttr = pyFileIO.read_CSV(filename + ".csv")

        # print(dicAttr)
        # print(lstFlds)

        fieldIndex = lstFlds.index(fieldname)

        xCoord = []
        yCoord = []
        attr1 = []

        for values in dicAttr.itervalues():
            # print(values)
            xCoord.append(values[2])
            yCoord.append(values[3])
            attr1.append(float(values[fieldIndex + 1]))
示例#2
0
'''
Created on Nov 24, 2015

@author: Bumsub
'''
import glob
import os
import PyGWR.FileIO as fileio
import PyGWR.M_GWGLM as gwr

if __name__ == '__main__':
    
    ## 1. Reading name of csv files in a directory
    dir = os.path.dirname(os.path.realpath(__file__))
    fileList = glob.glob(dir+"\\data_rawData/*.csv")
    
    ## 2. Reading csv files
    #lstFlds - list type
    #dicAttr - dict type
    
    lstFlds, dicAttr = fileio.read_CSV(fileList[0])
    
    gwr