asi_core.real_time.meteo_data_weblog¶
Attributes¶
Classes¶
Meteo Data Logger of html string of a campbell scientific logger |
Module Contents¶
- class asi_core.real_time.meteo_data_weblog.MeteoDataWebLog(url_cs_logger_table, log_filepath, timezone, name_desired_columns_cs_table=None, log_size=pd.Timedelta(days=3), latitude=37.1, longitude=-2.36, altitude=490, min_sun_elevation=5, when_to_resize_log=datetime.strptime('00:00:00', '%H:%M:%S').time(), write_mode='w')¶
Bases:
asi_core.real_time.meteo_data_log.MeteoDataLogMeteo Data Logger of html string of a campbell scientific logger
- Parameters:
url_cs_logger_table – (str) url of table as string
log_filepath – (str) file path of the meteo data log
timezone – (str) desired time zone (e.g. “GMT+1” = UTC+1)
name_desired_columns_cs_table – (dict) List with 2 columns and n rows. First column holds the original names of channels which shall be renamed. The second column holds the new names for the channels.
log_size – (Timedelta) size of the log express as Timedelta, default is 3 days
latitude – (float) latitude of the camera position. Default is 37.1º
longitude – (float) longitude of the camera position. Default is -2.36º
altitude – (float) altitude of the camera position. Default is 490m
min_sun_elevation – (float) minimum sun elevation to log meteo data. Default is 5º
when_to_resize_log – (time) time of day when to resize log. Default is 00:00:00
write_mode – (str) meteo data log write mode, ‘w’ for write or ‘a’ for append. Default is ‘w’
- url_cs_logger_table¶
- name_desired_columns_cs_table = None¶
- log_html_meteodata()¶
Monitor the given url and log updates in the given file
- parse_logger_data(html_string)¶
Parse a html string of a campbell scientific logger
- Parameters:
html_string – (str) html string of a campbell scientific logger
- Return meteodata_df:
data frame with n columns for each channel + timestamp index as datetime
- asi_core.real_time.meteo_data_weblog.url_cs_logger_table = 'http://10.21.202.135/?command=NewestRecord&table=WattsCorrSec'¶