NREL / edv_synthetic_smart_meter_data

Other
1 stars 1 forks source link

date format parsing issue with SF data #149

Closed JanghyunJK closed 3 years ago

JanghyunJK commented 3 years ago

- issue: converting processed SF metadata to BSync causing error shown below

(disregard "DEBUGGING: ~" outputs as they are me tracking down error)

C:\Users\JKIM4\Documents\GitHub\edv-experiment-1>rake generate_xmls
C:/Ruby25-x64/bin/ruby.exe scripts/meta_to_buildingsync.rb data/processed/metadata.csv
No scenario file provided.  Using inputs/default_scenario.json
Using scenario from file: inputs/default_scenario.json
Defines the following mapping: {:Office=>"Office", :"Primary/Secondary Classroom"=>"Office", :"College Classroom"=>"Office", :Dormitory=>"Office", :"College Laboratory"=>"Office"}
###############################################
Processing building 1 from a total of 111 buildings
DEBUGGING: feature[:fuel_type] = electricity/gas
DEBUGGING: fuel = electricity
DEBUGGING: fuel = gas
DEBUGGING: feature[:measurement_start_date] = 1/2018
DEBUGGING: splitdate = ["1", "2018"]
Building 2 not converted, undefined method `split' for nil:NilClass

- findings ○ suspecting date format (or the actual date info) is not compatible with the code from my side ○ so this line is basically parsing nothing at the end: https://github.com/NREL/edv_synthetic_smart_meter_data/blob/ea25598355bbfd51a5f353f41e56d77889359d37/scripts/meta_to_buildingsync.rb#L966 ○ for SF, this line hard (in ruby_upgrade branch) codes the measurement start date: https://github.com/NREL/edv_synthetic_smart_meter_data/blob/ea25598355bbfd51a5f353f41e56d77889359d37/scripts/rawdata_to_standardized_input_SF.rb#L55 ○ so with index 0 and 1, DEBUGGING: splitdate[0] = 1 DEBUGGING: splitdate[1] = 2018 ○ @lainsworth8801 need your idea for how to best move forward.

- how to replicate error: ○ os = windows ○ start from this branch: https://github.com/NREL/edv_synthetic_smart_meter_data/tree/debugging_1 ○ start from raw SF metadata ○ then run following commands: § rake standardize_metadata_and_timeseriesdata § rake generate_xmls

lainsworth8801 commented 3 years ago

Fixed pushed to latest ruby_upgrade branch. Please verify.

JanghyunJK commented 3 years ago

@lainsworth8801

JanghyunJK commented 3 years ago

@lainsworth8801 found what is going on. guess, ruby script names in rake file should also be reflected? https://github.com/NREL/edv_synthetic_smart_meter_data/blob/8456e04d6b994553a60fa3cef14ef8f0fb3e8f1b/Rakefile#L12

lainsworth8801 commented 3 years ago

Just pushed changes