-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from oislen/dev
Dev
- Loading branch information
Showing
8 changed files
with
46 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
call python scripts\prg_preprocess_data.py |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
import time | ||
import cons | ||
import logging | ||
from PreProcessData.gen_master_data import gen_master_data | ||
from PreProcessData.gen_preaggregate_data import gen_preaggregate_data | ||
from PreProcessData.gen_counties_data import gen_counties_data | ||
from PreProcessData.gen_stations_data import gen_stations_data | ||
|
||
if __name__ == '__main__': | ||
|
||
# set up logging | ||
lgr = logging.getLogger() | ||
lgr.setLevel(logging.INFO) | ||
|
||
# start timer | ||
t0 = time.time() | ||
|
||
print('~~~~~ Generating master data file ...') | ||
logging.info('~~~~~ Generating master data file ...') | ||
# generate master data file | ||
gen_master_data(master_data_fpath = cons.master_data_fpath, return_data = False) | ||
|
||
print('~~~~~ Generating preaggregated data file ...') | ||
logging.info('~~~~~ Generating preaggregated data file ...') | ||
# generate the preaggregate data | ||
gen_preaggregate_data(preaggregate_data_fpath = cons.preaggregate_data_fpath, return_data = False) | ||
|
||
print('~~~~~ Generating geospatial counties data file ...') | ||
logging.info('~~~~~ Generating geospatial counties data file ...') | ||
# generate counties data | ||
gen_counties_data(map_data_fpath = cons.map_data_fpath, return_data = False) | ||
|
||
print('~~~~~ Generating geospatial stations data file ...') | ||
logging.info('~~~~~ Generating geospatial stations data file ...') | ||
# generate wheather station points data | ||
gen_stations_data(points_data_fpath = cons.points_data_fpath, return_data = False) | ||
|
||
# end timer and print result | ||
# end timer and log result | ||
t1 = time.time() | ||
tres = t1 - t0 | ||
eres = round(tres, 2) | ||
print(f'Total Execution Time: {eres} seconds') | ||
logging.info(f'Total Execution Time: {eres} seconds') |