예제 #1
0
# --------------------------------------------------

release_path = request['release_path']

# make sure dataset path given in request exists
if not os.path.isdir(release_path):
    quit("release path specified not found: " + release_path)


# =============================================================================
# =============================================================================

# -------------------------------------

# create instance of CoreMSR class
core = CoreMSR()

# full script start time
core.times['start'] = int(time.time())

if job.rank == 0:
    print '\n'
    print (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
           ' ('+ str(int(time.time())) +')')
    print 'Starting MSR'
    print '\n'


# --------------------------------------------------
# load shapefiles
예제 #2
0
# --------------------------------------------------

release_path = request['release_path']

# make sure dataset path given in request exists
if not os.path.isdir(release_path):
    quit("release path specified not found: " + release_path)

# =============================================================================
# =============================================================================

# -------------------------------------

# create instance of CoreMSR class
core = CoreMSR()

# full script start time
core.times['start'] = int(time.time())

if job.rank == 0:
    print '\n'
    print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + ' (' +
          str(int(time.time())) + ')')
    print 'Starting MSR'
    print '\n'

# --------------------------------------------------
# load shapefiles

# must start at and inlcude ADM0
예제 #3
0

# make sure release path exists
if not os.path.isdir(release_path):
    quit("release path specified not found: " + release_path)

if release_preamble not in config.release_iso3:
    quit("release premable not found in config: " + release_preamble)

iso3 = config.release_iso3[release_preamble]


# -------------------------------------

# create instance of CoreMSR class
core = CoreMSR(config)

# full script start time
core.times['start'] = int(time.time())

if job.rank == 0:
    print '\n'
    print (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
           ' ('+ str(int(time.time())) +')')
    print 'Starting MSR'
    print '\n'


# set pixel size
if not 'resolution' in request['options']:
    quit("missing pixel size input from request")
예제 #4
0

# make sure release path exists
if not os.path.isdir(release_path):
    quit("release path specified not found: " + release_path)

if release_preamble not in config.release_iso3:
    quit("release premable not found in config: " + release_preamble)

iso3 = config.release_iso3[release_preamble]


# -------------------------------------

# create instance of CoreMSR class
core = CoreMSR(config)

# full script start time
core.times['start'] = int(time.time())

if job.rank == 0:
    print '\n'
    print (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
           ' ('+ str(int(time.time())) +')')
    print 'Starting MSR'
    print '\n'


# set pixel size
if not 'resolution' in request['options']:
    quit("missing pixel size input from request")
예제 #5
0
    # print sum(1 for j in dataset_info[ix]['iter'])

    # for j in dataset_info[ix]['iter']:
    #     print j


    # =========================================================================


    # print dataset_info[ix]

    print 'Generating jobs...'


    # create instance of CoreMSR class
    core = CoreMSR(config)

    # --------------------------------------------------
    # load project data

    dir_data = (dataset_info[ix]['base'] +'/data')

    df_merged = core.merge_data(dir_data, "project_id")

    df_prep = core.prep_data(df_merged)

    tmp_total_aid = sum(df_prep['split_dollars_pp'])


    total_count = 0
    accept_count = 0
예제 #6
0
            itertools.combinations(dataset_info[ix]['donors'], j[1]))
        for j in ratio_list)

    # print sum(1 for j in dataset_info[ix]['iter'])

    # for j in dataset_info[ix]['iter']:
    #     print j

    # =========================================================================

    # print dataset_info[ix]

    print 'Generating jobs...'

    # create instance of CoreMSR class
    core = CoreMSR(config)

    # --------------------------------------------------
    # load project data

    dir_data = (dataset_info[ix]['base'] + '/data')

    df_merged = core.merge_data(dir_data, "project_id")

    df_prep = core.prep_data(df_merged)

    tmp_total_aid = sum(df_prep['split_dollars_pp'])

    total_count = 0
    accept_count = 0
    add_count = 0