id
int64
0
843k
repository_name
stringlengths
7
55
file_path
stringlengths
9
332
class_name
stringlengths
3
290
human_written_code
stringlengths
12
4.36M
class_skeleton
stringlengths
19
2.2M
total_program_units
int64
1
9.57k
total_doc_str
int64
0
4.2k
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
300
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
176
CountClassBase
float64
0
48
CountClassCoupled
float64
0
589
CountClassCoupledModified
float64
0
581
CountClassDerived
float64
0
5.37k
CountDeclInstanceMethod
float64
0
4.2k
CountDeclInstanceVariable
float64
0
299
CountDeclMethod
float64
0
4.2k
CountDeclMethodAll
float64
0
4.2k
CountLine
float64
1
115k
CountLineBlank
float64
0
9.01k
CountLineCode
float64
0
94.4k
CountLineCodeDecl
float64
0
46.1k
CountLineCodeExe
float64
0
91.3k
CountLineComment
float64
0
27k
CountStmt
float64
1
93.2k
CountStmtDecl
float64
0
46.1k
CountStmtExe
float64
0
90.2k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
6k
143,048
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/kwd.py
pynmea2.types.proprietary.kwd.KLD
class KLD(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(KLD, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(KLD, self).__init__(manufacturer, data)
class KLD(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
1
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,049
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/mgn.py
pynmea2.types.proprietary.mgn.MGN
class MGN(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(MGN, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(MGN, self).__init__(manufacturer, data)
class MGN(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
1
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,050
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/grm.py
pynmea2.types.proprietary.grm.GRMZ
class GRMZ(GRM): """ GARMIN Altitude Information """ fields = ( ("Subtype", "subtype"), ("Altitude", "altitude", Decimal), ("Altitude Units (Feet)", "altitude_unit"), ("Positional Fix Dimension (2=user, 3=GPS)", "pos_fix_dim"), )
class GRMZ(GRM): ''' GARMIN Altitude Information ''' pass
1
1
0
0
0
0
0
0.29
1
0
0
0
0
0
0
12
9
0
7
2
6
2
2
2
1
0
4
0
0
143,051
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/grm.py
pynmea2.types.proprietary.grm.GRMM
class GRMM(GRM): """ GARMIN Map Datum """ fields = ( ("Subtype", "subtype"), ('Currently Active Datum', 'datum'), )
class GRMM(GRM): ''' GARMIN Map Datum ''' pass
1
1
0
0
0
0
0
0.4
1
0
0
0
0
0
0
12
7
0
5
2
4
2
2
2
1
0
4
0
0
143,052
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/grm.py
pynmea2.types.proprietary.grm.GRME
class GRME(GRM): """ GARMIN Estimated position error """ fields = ( ("Subtype", "subtype"), ("Estimated Horiz. Position Error", "hpe", Decimal), ("Estimated Horiz. Position Error Unit (M)", "hpe_unit"), ("Estimated Vert. Position Error", "vpe", Decimal), ("Estimated Vert. Position Error Unit (M)", "vpe_unit"), ("Estimated Horiz. Position Error", "osepe", Decimal), ("Overall Spherical Equiv. Position Error", "osepe_unit"), )
class GRME(GRM): ''' GARMIN Estimated position error ''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
12
12
0
10
2
9
2
2
2
1
0
4
0
0
143,053
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/grm.py
pynmea2.types.proprietary.grm.GRM
class GRM(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[0] cls = _cls.sentence_types.get(name, _cls) return super(GRM, cls).__new__(cls) def __init__(self, manufacturer, data): self.sentence_type = manufacturer + data[0] super(GRM, self).__init__(manufacturer, data)
class GRM(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass def __init__(self, manufacturer, data): pass
3
0
4
0
4
0
1
0
1
1
0
4
2
1
2
12
11
2
9
7
6
0
9
7
6
1
3
0
2
143,054
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.AAM
class AAM(TalkerSentence): """ Waypoint Arrival Alarm """ fields = ( ("Arrival Circle Entered", "arrival_circ_entered"), ("Perpendicular Passed", "perp_passed"), ("Circle Radius", "circle_rad"), ("Nautical Miles", "circle_rad_unit"), ("Waypoint ID", "waypoint_id"), )
class AAM(TalkerSentence): ''' Waypoint Arrival Alarm ''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
10
10
0
8
2
7
2
2
2
1
0
3
0
0
143,055
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/fec.py
pynmea2.types.proprietary.fec.FECGPatt
class FECGPatt(FEC): """ Furuno GPatt Message $PFEC,GPatt,aaa.a,bb.b,cc.c,*hh<CR><LF> $PFEC: Talker identifier + sentence formatter* GPatt: Global positioning attitude, sentence formatter aaa.a: Yaw (degrees)* bb.b: Pitch (degrees)* cc.c: Roll (degrees)* *hh: Checksum* """ fields = ( ('R', '_r'), ('Subtype', 'subtype'), ('Yaw', 'yaw', float), ('Pitch', 'pitch', float), ('Roll', 'roll', float), )
class FECGPatt(FEC): ''' Furuno GPatt Message $PFEC,GPatt,aaa.a,bb.b,cc.c,*hh<CR><LF> $PFEC: Talker identifier + sentence formatter* GPatt: Global positioning attitude, sentence formatter aaa.a: Yaw (degrees)* bb.b: Pitch (degrees)* cc.c: Roll (degrees)* *hh: Checksum* ''' pass
1
1
0
0
0
0
0
1.25
1
0
0
0
0
0
0
11
19
1
8
2
7
10
2
2
1
0
4
0
0
143,056
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/fec.py
pynmea2.types.proprietary.fec.FEC
class FEC(nmea.ProprietarySentence): sentence_types = {} def __new__(_cls, manufacturer, data): name = manufacturer + data[1] cls = _cls.sentence_types.get(name, _cls) return super(FEC, cls).__new__(cls)
class FEC(nmea.ProprietarySentence): def __new__(_cls, manufacturer, data): pass
2
0
4
0
4
0
1
0
1
1
0
2
1
0
1
11
7
1
6
5
4
0
6
5
4
1
3
0
1
143,057
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ash.py
pynmea2.types.proprietary.ash.ASHRVEL
class ASHRVEL(ASH): ''' Ashtech VEL Message ''' fields = ( ('R', '_r'), ('Subtype', 'subtype'), ('ENU', 'enu', int), ('Timestamp', 'timestamp', timestamp), ('Easting', 'easting', Decimal), ('Northing', 'northing', Decimal), ('Vertical Velocity', 'vertical', Decimal), ('Easting RMS', 'easting_rms', Decimal), ('Northing RMS', 'northing_rms', Decimal), ('Vertical RMS', 'vertical_rms', Decimal), ('Applied effective velocity smoothing interval (ms)', 'smoothing', Decimal), )
class ASHRVEL(ASH): ''' Ashtech VEL Message ''' pass
1
1
0
0
0
0
0
0.21
1
0
0
0
0
0
0
11
17
0
14
2
13
3
2
2
1
0
4
0
0
143,058
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ash.py
pynmea2.types.proprietary.ash.ASHRPOS
class ASHRPOS(ASH, LatLonFix): ''' Ashtech POS Message ''' fields = ( ('R', '_r'), ('Subtype', 'subtype'), ('Solution Type', 'mode', int), ('Satellites used in Solution', 'sat_count', int), ('Timestamp', 'timestamp', timestamp), ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('Altitude above WGS84 ellipsoid, meters', 'altitude'), ('Empty', '__'), ("True Track/Course Over Ground", "course", float), ("Speed Over Ground", "spd_over_grnd", float), ('Vertical Velocity', 'vertical_velocity', Decimal), ('PDOP', 'pdop', float), ('HDOP', 'hdop', float), ('VDOP', 'vdop', float), ('TDOP', 'tdop', float), ('Base station ID', 'station_id', int) )
class ASHRPOS(ASH, LatLonFix): ''' Ashtech POS Message ''' pass
1
1
0
0
0
0
0
0.14
2
0
0
0
0
0
0
19
25
0
22
2
21
3
2
2
1
0
4
0
0
143,059
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/ash.py
pynmea2.types.proprietary.ash.ASHRLTN
class ASHRLTN(ASH): ''' Ashtech LTN Message ''' fields = ( ('R', '_r'), ('Subtype', 'subtype'), ('Latency (ms)', 'latency', int), )
class ASHRLTN(ASH): ''' Ashtech LTN Message ''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
11
9
0
6
2
5
3
2
2
1
0
4
0
0
143,060
Knio/pynmea2
Knio_pynmea2/pynmea2/types/proprietary/grm.py
pynmea2.types.proprietary.grm.GRMW
class GRMW(GRM): """ GARMIN Waypoint Information https://www8.garmin.com/support/pdf/NMEA_0183.pdf https://github.com/wb2osz/direwolf/blob/master/waypoint.c $PGRMW,wname,alt,symbol,comment*99 Where, wname is waypoint name. Must match existing waypoint. alt is altitude in meters. symbol is symbol code. Hexadecimal up to FFFF. See Garmin Device Interface Specification 001-0063-00 for values of "symbol_type." comment is comment for the waypoint. *99 is checksum """ fields = ( ("Subtype", "subtype"), ("Waypoint Name", "wname"), ("Altitude", "altitude", Decimal), ("Symbol", "symbol"), ("Comment", "comment"), )
class GRMW(GRM): ''' GARMIN Waypoint Information https://www8.garmin.com/support/pdf/NMEA_0183.pdf https://github.com/wb2osz/direwolf/blob/master/waypoint.c $PGRMW,wname,alt,symbol,comment*99 Where, wname is waypoint name. Must match existing waypoint. alt is altitude in meters. symbol is symbol code. Hexadecimal up to FFFF. See Garmin Device Interface Specification 001-0063-00 for values of "symbol_type." comment is comment for the waypoint. *99 is checksum ''' pass
1
1
0
0
0
0
0
1.63
1
0
0
0
0
0
0
12
23
2
8
2
7
13
2
2
1
0
4
0
0
143,061
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.ALK
class ALK(TalkerSentence,SeaTalk): fields = ( ("Command", "cmd"), ("Data Byte 1", "data_byte1"), ("Data Byte 2", "data_byte2"), ("Data Byte 3", "data_byte3"), ("Data Byte 4", "data_byte4"), ("Data Byte 5", "data_byte5"), ("Data Byte 6", "data_byte6"), ("Data Byte 7", "data_byte7"), ("Data Byte 8", "data_byte8"), ("Data Byte 9", "data_byte9") )
class ALK(TalkerSentence,SeaTalk): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
11
13
0
13
2
12
0
2
2
1
0
3
0
0
143,062
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.HEV
class HEV(TalkerSentence): """ Heave """ fields = (("Heave", "heave", float),)
class HEV(TalkerSentence): ''' Heave ''' pass
1
1
0
0
0
0
0
1.5
1
0
0
0
0
0
0
10
5
0
2
2
1
3
2
2
1
0
3
0
0
143,063
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.STN
class STN(TalkerSentence): """ NOTE: No real data could be found for examples of the actual spec so it is a guess that there may be a checksum on the end """ fields = ( ("Talker ID Number", "talker_id_num"), )
class STN(TalkerSentence): ''' NOTE: No real data could be found for examples of the actual spec so it is a guess that there may be a checksum on the end ''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
10
7
0
4
2
3
4
2
2
1
0
3
0
0
143,064
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.RSA
class RSA(TalkerSentence): """ Rudder Sensor Angle """ fields = ( ("Starboard rudder sensor", "rsa_starboard", Decimal), ("Starboard rudder sensor status", "rsa_starboard_status"), ("Port rudder sensor", "rsa_port", Decimal), ("Port rudder sensor status", "rsa_port_status"), )
class RSA(TalkerSentence): ''' Rudder Sensor Angle ''' pass
1
1
0
0
0
0
0
0.29
1
0
0
0
0
0
0
10
9
0
7
2
6
2
2
2
1
0
3
0
0
143,065
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.RPM
class RPM(TalkerSentence, ValidStatusFix): """ Revolutions """ # 1 2 3 4 5 6 # | | | | | | # $--RPM,a,x,x.x,x.x,A*hh<CR><LF> # Field Number: # 1) Sourse, S = Shaft, E = Engine # 2) Engine or shaft number # 3) Speed, Revolutions per minute # 4) Propeller pitch, % of maximum, "-" means astern # 5) Status, A means data is valid # 6) Checksum fields = ( ("Source", "source"), #S = Shaft, E = Engine ("Engine or shaft number", "engine_no", int), ("Speed", "speed", float), #RPM ("Propeller pitch", "pitch"), #- means astern ("Status", "status"), #A means valid )
class RPM(TalkerSentence, ValidStatusFix): ''' Revolutions ''' pass
1
1
0
0
0
0
0
2
2
0
0
0
0
0
0
11
22
2
8
2
7
16
2
2
1
0
3
0
0
143,066
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.ROT
class ROT(TalkerSentence, ValidStatusFix): """ Rate of Turn """ fields = ( ("Rate of turn", "rate_of_turn"), #- indicates bow turn to port ('Status', 'status'), # contains the 'A' or 'B' flag )
class ROT(TalkerSentence, ValidStatusFix): ''' Rate of Turn ''' pass
1
1
0
0
0
0
0
0.8
2
0
0
0
0
0
0
11
7
0
5
2
4
4
2
2
1
0
3
0
0
143,067
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.RMC
class RMC(TalkerSentence, ValidRMCStatusFix, LatLonFix, DatetimeFix): """ Recommended Minimum Specific GPS/TRANSIT Data """ fields = ( ("Timestamp", "timestamp", timestamp), ('Status', 'status'), # contains the 'A' or 'V' flag ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Speed Over Ground", "spd_over_grnd", float), ("True Course", "true_course", float), ("Datestamp", "datestamp", datestamp), ("Magnetic Variation", "mag_variation"), ("Magnetic Variation Direction", "mag_var_dir"), ("Mode Indicator", "mode_indicator"), ("Navigational Status", "nav_status"), )
class RMC(TalkerSentence, ValidRMCStatusFix, LatLonFix, DatetimeFix): ''' Recommended Minimum Specific GPS/TRANSIT Data ''' pass
1
1
0
0
0
0
0
0.19
4
0
0
0
0
0
0
21
18
0
16
2
15
3
2
2
1
0
3
0
0
143,068
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.RMB
class RMB(TalkerSentence, ValidStatusFix): """ Recommended Minimum Navigation Information """ fields = ( ('Status', 'status'), # contains the 'A' or 'V' flag ("Cross Track Error", "cross_track_error"), # nautical miles, 9.9 max ("Cross Track Error, direction to corrent", "cte_correction_dir"), ("Origin Waypoint ID", "origin_waypoint_id"), ("Destination Waypoint ID", "dest_waypoint_id"), ("Destination Waypoint Latitude", "dest_lat"), ("Destination Waypoint Lat Direction", "dest_lat_dir"), ("Destination Waypoint Longitude", "dest_lon"), ("Destination Waypoint Lon Direction", "dest_lon_dir"), ("Range to Destination", "dest_range"), # Nautical Miles ("True Bearing to Destination", "dest_true_bearing"), ("Velocity Towards Destination", "dest_velocity"), # Knots ("Arrival Alarm", "arrival_alarm"), )
class RMB(TalkerSentence, ValidStatusFix): ''' Recommended Minimum Navigation Information ''' pass
1
1
0
0
0
0
0
0.44
2
0
0
0
0
0
0
11
18
0
16
2
15
7
2
2
1
0
3
0
0
143,069
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.RMA
class RMA(TalkerSentence): fields = ( ("Data status", "data_status"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Not Used 1", "not_used_1"), ("Not Used 2", "not_used_2"), ("Speed over ground", "spd_over_grnd"), # Knots ("Course over ground", "crse_over_grnd"), ("Variation", "variation"), ("Variation Direction", "var_dir"), )
class RMA(TalkerSentence): pass
1
0
0
0
0
0
0
0.07
1
0
0
0
0
0
0
10
14
0
14
2
13
1
2
2
1
0
3
0
0
143,070
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.RTE
class RTE(TalkerSentence): """ Routes """ fields = ( ("Number of sentences in sequence", "num_in_seq"), ("Sentence Number", "sen_num"), ("Start Type", "start_type"), # The first in the list is either current route or waypoint ("Name or Number of Active Route", "active_route_id"), ) @property def waypoint_list(self): return self.data[4:] @waypoint_list.setter def waypoint_list(self, val): self.data[4:] = val
class RTE(TalkerSentence): ''' Routes ''' @property def waypoint_list(self): pass @waypoint_list.setter def waypoint_list(self): pass
5
1
2
0
2
0
1
0.23
1
0
0
0
2
0
2
12
17
2
13
6
8
3
6
4
3
1
3
0
2
143,071
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.R00
class R00(TalkerSentence): fields = () @property def waypoint_list(self): return self.data[:] @waypoint_list.setter def waypoint_list(self, val): self.data[:] = val
class R00(TalkerSentence): @property def waypoint_list(self): pass @waypoint_list.setter def waypoint_list(self): pass
5
0
2
0
2
0
1
0
1
0
0
0
2
0
2
12
9
1
8
6
3
0
6
4
3
1
3
0
2
143,072
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.MWV
class MWV(TalkerSentence, ValidStatusFix): """ Wind Speed and Angle NMEA 0183 standard Wind Speed and Angle, in relation to the vessel's bow/centerline. """ fields = ( ("Wind angle", "wind_angle", Decimal), # in relation to vessel's centerline ("Reference", "reference"), # relative (R)/true(T) ("Wind speed", "wind_speed", Decimal), ("Wind speed units", "wind_speed_units"), # K/M/N ("Status", "status"), )
class MWV(TalkerSentence, ValidStatusFix): ''' Wind Speed and Angle NMEA 0183 standard Wind Speed and Angle, in relation to the vessel's bow/centerline. ''' pass
1
1
0
0
0
0
0
0.88
2
0
0
0
0
0
0
11
12
0
8
2
7
7
2
2
1
0
3
0
0
143,073
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.MWD
class MWD(TalkerSentence): """ Wind Direction NMEA 0183 standard Wind Direction and Speed, with respect to north. """ fields = ( ("Wind direction true", "direction_true", Decimal), ("True", "true"), ("Wind direction magnetic", "direction_magnetic", Decimal), ("Magnetic", "magnetic"), ("Wind speed knots", "wind_speed_knots", Decimal), ("Knots", "knots"), ("Wind speed meters/second", "wind_speed_meters", Decimal), ("Wind speed", "meters"), )
class MWD(TalkerSentence): ''' Wind Direction NMEA 0183 standard Wind Direction and Speed, with respect to north. ''' pass
1
1
0
0
0
0
0
0.27
1
0
0
0
0
0
0
10
14
0
11
2
10
3
2
2
1
0
3
0
0
143,074
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.MTW
class MTW(TalkerSentence): """ Water Temperature """ fields = ( ('Water temperature', 'temperature', Decimal), ('Unit of measurement', 'units'), )
class MTW(TalkerSentence): ''' Water Temperature ''' pass
1
1
0
0
0
0
0
0.4
1
0
0
0
0
0
0
10
7
0
5
2
4
2
2
2
1
0
3
0
0
143,075
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.MTA
class MTA(TalkerSentence): """ Air Temperature (to be phased out) """ fields = ( ("Air temperature", "temperature", Decimal), ("Units of measurement", "units"), )
class MTA(TalkerSentence): ''' Air Temperature (to be phased out) ''' pass
1
1
0
0
0
0
0
0.4
1
0
0
0
0
0
0
10
7
0
5
2
4
2
2
2
1
0
3
0
0
143,076
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.LAU
class LAU(TalkerSentence): fields = ( ("RX","RX"), ("TX","TX"), ("GPS","GPS"), ("Power","Power"), ("AlarmLevel","AlarmLevel"), ("RelativeBearing","RelativeBearing"), ("AlarmType","AlarmType"), ("RelativeVertial","RelativeVertical"), ("RelativeDistance","RelativeDistance"), )
class LAU(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
13
1
12
2
11
0
2
2
1
0
3
0
0
143,077
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.LAA
class LAA(TalkerSentence): fields = ( ("AlarmLevel","AlarmLevel"), ("RelativeNorth","RelativeNorth"), ("RelativeEast","RelativeEast"), ("RelativeVertical","RelativeVertical"), ("ID-Type","ID-Type"), ("ID","ID"), ("Track","Track"), ("TurnRate","TurnRate"), ("GroundSpeed","GroundSpeed"), ("ClimbRate","ClimbRate"), ("Type","Type"), )
class LAA(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
14
0
14
2
13
0
2
2
1
0
3
0
0
143,078
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.OSD
class OSD(TalkerSentence, ValidStatusFix): """ Own Ship Data """ fields = ( ("True Heading", "heading", Decimal), ("Status", "status"), # A / V ("Vessel Course true degrees", "course", Decimal), ("Course True", "course_true"), # T / R (True / Relative) ("Vessel Speed", "speed", Decimal), ("Speed Reference", "speed_ref"), ("Vessel Set true degrees", "set", Decimal), ("Vessel Drift(speed)", "drift", Decimal), ("Speed Units", "speed_unit"), )
class OSD(TalkerSentence, ValidStatusFix): ''' Own Ship Data ''' pass
1
1
0
0
0
0
0
0.33
2
0
0
0
0
0
0
11
14
0
12
2
11
4
2
2
1
0
3
0
0
143,079
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.TLL
class TLL(TalkerSentence, LatLonFix): """ Target Latitude & Longitude """ fields = ( ("Target Number", "target_number", int), ("Target Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Target Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Target Name", "target_name"), ("Timestamp (UTC)", "timestamp", timestamp), ("Target Status", "target_status"), ("Reference Target", "reference"), )
class TLL(TalkerSentence, LatLonFix): ''' Target Latitude & Longitude ''' pass
1
1
0
0
0
0
0
0.17
2
0
0
0
0
0
0
18
14
0
12
2
11
2
2
2
1
0
3
0
0
143,080
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.TRF
class TRF(TalkerSentence): """ Transit Fix Data """ fields = ( ("Timestamp (UTC)", "timestamp", timestamp), ("Date (DD/MM/YY", "date"), ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Elevation Angle", "ele_angle"), ("Number of Iterations", "num_iterations"), ("Number of Doppler Intervals", "num_doppler_intervals"), ("Update Distance", "update_dist"), # Nautical Miles ("Satellite ID", "sat_id"), )
class TRF(TalkerSentence): ''' Transit Fix Data ''' pass
1
1
0
0
0
0
0
0.21
1
0
0
0
0
0
0
10
16
0
14
2
13
3
2
2
1
0
3
0
0
143,081
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.TTM
class TTM(TalkerSentence): """ Tracked Target Message """ fields = ( ("Target Number", "target_number", int), ("Target Distance", "distance", Decimal), ("Bearing from Own Ship", "bearing", Decimal), ("Bearing Reference", "brg_ref"), # T / R (True / Relative) ("Target Speed", "speed", Decimal), ("Target Course over Ground", "cog", Decimal), ("Course Units", "cog_unit"), # T / R (True / Relative) ("Distance of CPA", "dist_cpa", Decimal), ("Time until CPA", "time_cpa", Decimal), ("Distance Units", "dist_unit"), # K / N / S (Kilometers / Knots / Statute miles) ("Target Name", "name"), ("Target Status", "status"), # L / Q / T (Lost from tracking process / Query - in process of acquisition / Tracking at the present time) ("Target Reference", "reference"), # R, null otherwise ("Timestamp (UTC)", "timestamp", timestamp), ("Acquisition Type", "acquisition"), # A / M (Automatic / Manual) )
class TTM(TalkerSentence): ''' Tracked Target Message ''' pass
1
1
0
0
0
0
0
0.44
1
0
0
0
0
0
0
10
20
0
18
2
17
8
2
2
1
0
3
0
0
143,082
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.ZDA
class ZDA(TalkerSentence, DatetimeFix): fields = ( ("Timestamp", "timestamp", timestamp), # hhmmss.ss = UTC ("Day", "day", int), # 01 to 31 ("Month", "month", int), # 01 to 12 ("Year", "year", int), # Year = YYYY ("Local Zone Description", "local_zone", int), # 00 to +/- 13 hours ("Local Zone Minutes Description", "local_zone_minutes", int), # same sign as hours ) @property def datestamp(self): return datetime.date(year=self.year, month=self.month, day=self.day) @property def tzinfo(self): return TZInfo(self.local_zone, self.local_zone_minutes) @property def localdatetime(self): d = datetime.datetime.combine(self.datestamp, self.timestamp) return d.astimezone(self.tzinfo)
class ZDA(TalkerSentence, DatetimeFix): @property def datestamp(self): pass @property def tzinfo(self): pass @property def localdatetime(self): pass
7
0
2
0
2
0
1
0.32
2
3
1
0
3
2
3
14
22
3
19
10
12
6
9
6
5
1
3
0
3
143,083
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.XTE
class XTE(TalkerSentence): """ Cross-Track Error, Measured """ fields = ( ("General Warning Flag", "warning_flag"), ("Lock flag (Not Used)", "lock_flag"), ("Cross Track Error Distance", "cross_track_err_dist"), ("Correction Direction (L or R)", "correction_dir"), ("Distance Units", "dist_units"), )
class XTE(TalkerSentence): ''' Cross-Track Error, Measured ''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
10
10
0
8
2
7
2
2
2
1
0
3
0
0
143,084
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.XDR
class XDR(TalkerSentence): fields = ( ("Transducer type", "type"), ("Transducer data value", "value"), ("Transducer data units", "units"), ("Transducer ID", "id"), ) @property def num_transducers(self): return len(self.data) // 4 def get_transducer(self, i): return Transducer(*self.data[i*4:i*4+4])
class XDR(TalkerSentence): @property def num_transducers(self): pass def get_transducer(self, i): pass
4
0
2
0
2
0
1
0
1
0
0
0
2
0
2
12
14
2
12
5
8
0
6
4
3
1
3
0
2
143,085
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.WPL
class WPL(TalkerSentence): """ Waypoint Location """ fields = ( ("Latitude", "lat"), ("Latitude Direction", "lat_dir"), ("Longitude", "lon"), ("Longitude Direction", "lon_dir"), ("Waypoint ID", "waypoint_id"), )
class WPL(TalkerSentence): ''' Waypoint Location ''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
10
10
0
8
2
7
2
2
2
1
0
3
0
0
143,086
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.WNC
class WNC(TalkerSentence): """ Distance, Waypoint to Waypoint """ fields = ( ("Distance, Nautical Miles", "dist_nautical_miles"), ("Distance Nautical Miles Unit", "dist_naut_unit"), ("Distance, Kilometers", "dist_km"), ("Distance, Kilometers Unit", "dist_km_unit"), ("Origin Waypoint ID", "waypoint_origin_id"), ("Destination Waypoint ID", "waypoint_dest_id"), )
class WNC(TalkerSentence): ''' Distance, Waypoint to Waypoint ''' pass
1
1
0
0
0
0
0
0.22
1
0
0
0
0
0
0
10
11
0
9
2
8
2
2
2
1
0
3
0
0
143,087
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.WCV
class WCV(TalkerSentence): """ Waypoint Closure Velocity """ fields = ( ("Velocity", "velocity"), ("Velocity Units", "vel_units"), # Knots ("Waypoint ID", "waypoint_id"), )
class WCV(TalkerSentence): ''' Waypoint Closure Velocity ''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
10
8
0
6
2
5
3
2
2
1
0
3
0
0
143,088
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VWT
class VWT(TalkerSentence): fields = ( ('Wind angle relative to the vessel', 'wind_angle_vessel', Decimal), ('Direction, L=Left, R=Right, relative to the vessel head', 'direction'), ('Wind speed knots', 'wind_speed_knots', Decimal), ('Knots', 'knots'), # N = Knots ('Wind speed meters/second', 'wind_speed_meters', Decimal), ('Meters', 'meters'), # M = Meters/second ('Wind speed km/h', 'wind_speed_km', Decimal), ('Km', 'km'), # K = km/h )
class VWT(TalkerSentence): pass
1
0
0
0
0
0
0
0.27
1
0
0
0
0
0
0
10
11
0
11
2
10
3
2
2
1
0
3
0
0
143,089
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VWR
class VWR(TalkerSentence): fields = ( ("Degrees Rel", "deg_r", float), ("Left/Right", "l_r"),#R means right ("Wind speed kn", "wind_speed_kn", float), ("Knots", "unit_knots"),#N means knots ("Wind Speed m/s", "wind_speed_ms", float), ("m/s", "unit_ms"),#M means m/s ("Wind Speed Km/h", "wind_speed_km", float), ("Knots", "unit_km"), #K means Km )
class VWR(TalkerSentence): pass
1
0
0
0
0
0
0
0.36
1
0
0
0
0
0
0
10
11
0
11
2
10
4
2
2
1
0
3
0
0
143,090
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VTG
class VTG(TalkerSentence): """ Track Made Good and Ground Speed """ fields = ( ("True Track made good", "true_track", float), ("True Track made good symbol", "true_track_sym"), ("Magnetic Track made good", "mag_track", Decimal), ("Magnetic Track symbol", "mag_track_sym"), ("Speed over ground knots", "spd_over_grnd_kts", Decimal), ("Speed over ground symbol", "spd_over_grnd_kts_sym"), ("Speed over ground kmph", "spd_over_grnd_kmph", float), ("Speed over ground kmph symbol", "spd_over_grnd_kmph_sym"), ("FAA mode indicator", "faa_mode"), )
class VTG(TalkerSentence): ''' Track Made Good and Ground Speed ''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
10
15
0
12
2
11
3
2
2
1
0
3
0
0
143,091
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VPW
class VPW(TalkerSentence): """ Speed, Measured Parallel to Wind """ fields = ( ("Speed knots", "speed_kn", float),#- means downwind ("Unit knots", "unit_knots"),#N means knots ("Speed m/s", "speed_ms", float), ("Unit m/s", "unit_ms"),#M means m/s )
class VPW(TalkerSentence): ''' Speed, Measured Parallel to Wind ''' pass
1
1
0
0
0
0
0
0.71
1
0
0
0
0
0
0
10
9
0
7
2
6
5
2
2
1
0
3
0
0
143,092
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VLW
class VLW(TalkerSentence): """ Distance Traveled through the Water """ fields = ( ('Water trip distance', 'trip_distance', Decimal), ('Trip distance nautical miles', 'trip_distance_miles'), ('Water trip distance since reset', 'trip_distance_reset', Decimal), ('Trip distance nautical miles since reset', 'trip_distance_reset_miles'), )
class VLW(TalkerSentence): ''' Distance Traveled through the Water ''' pass
1
1
0
0
0
0
0
0.29
1
0
0
0
0
0
0
10
9
0
7
2
6
2
2
2
1
0
3
0
0
143,093
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VHW
class VHW(TalkerSentence): """ Water Speed and Heading """ fields = ( ('Heading true degrees', 'heading_true', Decimal), ('heading true', 'true'), ('Heading Magnetic degrees', 'heading_magnetic', Decimal), ('Magnetic', 'magnetic'), ('Water speed knots', 'water_speed_knots', Decimal), ('Knots', 'knots'), ('Water speed kilometers', 'water_speed_km', Decimal), ('Kilometers', 'kilometers'), )
class VHW(TalkerSentence): ''' Water Speed and Heading ''' pass
1
1
0
0
0
0
0
0.18
1
0
0
0
0
0
0
10
13
0
11
2
10
2
2
2
1
0
3
0
0
143,094
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VDR
class VDR(TalkerSentence): fields = ( ("Degrees True", "deg_t", float), ("TRUE", "true"),#T means true ("Degrees Magnetic", "deg_m", float), ("Magnetic", "magnetic"),#M means magnetic ("Speed of Current", "current", float), ("Unit", "unit_kn"), #N means knots )
class VDR(TalkerSentence): pass
1
0
0
0
0
0
0
0.33
1
0
0
0
0
0
0
10
9
0
9
2
8
3
2
2
1
0
3
0
0
143,095
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.VBW
class VBW(TalkerSentence, ValidVBWFix): """ Dual Ground/Water Speed """ fields = ( ("Longitudinal Water Speed", "lon_water_spd", Decimal), # Knots ("Transverse Water Speed", "trans_water_spd", Decimal), # Knots ("Water Speed Data Validity", "data_validity_water_spd"), ("Longitudinal Ground Speed", "lon_grnd_spd", Decimal), # Knots ("Transverse Ground Speed", "trans_grnd_spd", Decimal), # Knots ("Ground Speed Data Validity", "data_validity_grnd_spd"), )
class VBW(TalkerSentence, ValidVBWFix): ''' Dual Ground/Water Speed ''' pass
1
1
0
0
0
0
0
0.67
2
0
0
0
0
0
0
11
11
0
9
2
8
6
2
2
1
0
3
0
0
143,096
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.TXT
class TXT(TalkerSentence): """ Text Transmission """ fields = ( ("Number of Messages", "num_msg"), ("Message Number", "msg_num"), ("Type of Message", "msg_type"), ("Text", "text"), )
class TXT(TalkerSentence): ''' Text Transmission ''' pass
1
1
0
0
0
0
0
0.29
1
0
0
0
0
0
0
10
9
0
7
2
6
2
2
2
1
0
3
0
0
143,097
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.HSC
class HSC(TalkerSentence): """ Heading Steering Command """ fields = ( ("Heading", "heading_true", Decimal), ("True", "true"), ("Heading Magnetic", "heading_magnetic", Decimal), ("Magnetic", "magnetic"), )
class HSC(TalkerSentence): ''' Heading Steering Command ''' pass
1
1
0
0
0
0
0
0.29
1
0
0
0
0
0
0
10
10
1
7
2
6
2
2
2
1
0
3
0
0
143,098
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.HDT
class HDT(TalkerSentence): fields = ( ("Heading", "heading", Decimal), ("True", "hdg_true"), )
class HDT(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
5
0
5
2
4
0
2
2
1
0
3
0
0
143,099
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.MDA
class MDA(TalkerSentence): # Example: # $WIMDA,30.2269,I,1.0236,B,17.7,C,,,43.3,,5.0,C,131.5,T,128.6,M,0.8,N,0.4,M*54 fields = ( ('Barometric pressure, inches of mercury', 'b_pressure_inch', Decimal), ('Inches', 'inches'), # I = Inches ('Barometric pressure, bars', 'b_pressure_bar', Decimal), ('Bars', 'bars'), # B = bars ('Air temperature, degrees C', 'air_temp', Decimal), ('Celsius', 'a_celsius'), # C = Celsius ('Water temperature, degrees C', 'water_temp', Decimal), ('Celsius', 'w_celsius'), # C = Celsius ('Relative humidity, percent', 'rel_humidity', Decimal), ('Absolute humidity, percent', 'abs_humidity', Decimal), ('Dew point, degrees C', 'dew_point', Decimal), ('Celsius', 'd_celsius'), # C = Celsius ('Wind direction true', 'direction_true', Decimal), ('True', 'true'), # T = True ('Wind direction magnetic', 'direction_magnetic', Decimal), ('Magnetic', 'magnetic'), # M = Magnetic ('Wind speed knots', 'wind_speed_knots', Decimal), ('Knots', 'knots'), # N = Knots ('Wind speed meters/second', 'wind_speed_meters', Decimal), ('Meters', 'meters'), # M = Meters/second )
class MDA(TalkerSentence): pass
1
0
0
0
0
0
0
0.48
1
0
0
0
0
0
0
10
25
0
23
2
22
11
2
2
1
0
3
0
0
143,100
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.HDG
class HDG(TalkerSentence): """ NMEA 0183 standard Heading, Deviation and Variation Format: $HCHDG,<1>,<2>,<3>,<4>,<5>*hh<CR><LF> <1> Magnetic sensor heading, degrees, to the nearest 0.1 degree. <2> Magnetic deviation, degrees east or west, to the nearest 0.1 degree. <3> E if field <2> is degrees East W if field <2> is degrees West <4> Magnetic variation, degrees east or west, to the nearest 0.1 degree. <5> E if field <4> is degrees East W if field <4> is degrees West """ fields = ( ("Heading", "heading", Decimal), ("Deviation", "deviation", Decimal), ("Deviation Direction", "dev_dir"), ("Variation", "variation", Decimal), ("Variation Direction", "var_dir"), )
class HDG(TalkerSentence): ''' NMEA 0183 standard Heading, Deviation and Variation Format: $HCHDG,<1>,<2>,<3>,<4>,<5>*hh<CR><LF> <1> Magnetic sensor heading, degrees, to the nearest 0.1 degree. <2> Magnetic deviation, degrees east or west, to the nearest 0.1 degree. <3> E if field <2> is degrees East W if field <2> is degrees West <4> Magnetic variation, degrees east or west, to the nearest 0.1 degree. <5> E if field <4> is degrees East W if field <4> is degrees West ''' pass
1
1
0
0
0
0
0
1.25
1
0
0
0
0
0
0
10
18
0
8
2
7
10
2
2
1
0
3
0
0
143,101
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.ALM
class ALM(TalkerSentence): """ GPS Almanac data """ fields = ( ("Total number of messages", "total_num_msgs"), ("Message number", "msg_num"), ("Satellite PRN number", "sat_prn_num"), # 01 - 32 ("GPS week number", "gps_week_num"), # Week since Jan 6 1980 ("SV Health, bits 17-24 of each almanac page", "sv_health"), ("Eccentricity", "eccentricity"), ("Almanac Reference Time", "alamanac_ref_time"), ("Inclination Angle", "inc_angle"), ("Rate of right ascension", "rate_right_asc"), ("Root of semi-major axis", "root_semi_major_axis"), ("Argument of perigee", "arg_perigee"), ("Longitude of ascension node", "lat_asc_node"), ("Mean anomaly", "mean_anom"), ("F0 Clock parameter", "f0_clock_param"), ("F1 Clock parameter", "f1_clock_param"), )
class ALM(TalkerSentence): ''' GPS Almanac data ''' pass
1
1
0
0
0
0
0
0.22
1
0
0
0
0
0
0
10
20
0
18
2
17
4
2
2
1
0
3
0
0
143,102
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.HDM
class HDM(TalkerSentence): """ Heading, Magnetic """ fields = ( ("Heading degrees", "heading", Decimal), ("Magnetic", "magnetic"), )
class HDM(TalkerSentence): ''' Heading, Magnetic ''' pass
1
1
0
0
0
0
0
0.6
1
0
0
0
0
0
0
10
8
0
5
2
4
3
2
2
1
0
3
0
0
143,103
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.APA
class APA(TalkerSentence): """ Autopilot Sentence "A" """ fields = ( ("General Status", "status_gen"), ("Cycle lock Status", "status_cycle_lock"), ("Cross Track Error Magnitude", "cross_track_err_mag"), ("Direction to Steer (L or R)", "dir_steer"), ("Cross Track Units (Nautical Miles or KM)", "cross_track_unit"), ("Arrival Circle Entered", "arr_circle_entered"), # A = True ("Perpendicular passed at waypoint", "perp_passed"), # A = True ("Bearing origin to destination", "bearing_to_dest"), ("Bearing type", "bearing_type"), # M = Magnetic, T = True ("Destination waypoint ID", "dest_waypoint_id"), )
class APA(TalkerSentence): ''' Autopilot Sentence "A" ''' pass
1
1
0
0
0
0
0
0.38
1
0
0
0
0
0
0
10
16
1
13
2
12
5
2
2
1
0
3
0
0
143,104
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.APB
class APB(TalkerSentence): """ Autopilot Sentence "B" """ fields = ( ("General Status", "status_gen"), ("Cycle lock Status", "status_cycle_lock"), ("Cross Track Error Magnitude", "cross_track_err_mag"), ("Direction to Steer (L or R)", "dir_steer"), ("Cross Track Units (Nautical Miles or KM)", "cross_track_unit"), ("Arrival Circle Entered", "arr_circle_entered"), # A = True ("Perpendicular passed at waypoint", "perp_passed"), # A = True ("Bearing origin to destination", "bearing_to_dest"), ("Bearing type", "bearing_type"), # M = Magnetic, T = True ("Destination waypoint ID", "dest_waypoint_id"), ("Bearing, present position to dest", "bearing_pres_dest"), ("Bearing to destination, type", "bearing_pres_dest_type"), # M = Magnetic, T = True ("Heading to steer to destination", "heading_to_dest"), ("Heading to steer to destination type", "heading_to_dest_type"), )
class APB(TalkerSentence): ''' Autopilot Sentence "B" ''' pass
1
1
0
0
0
0
0
0.41
1
0
0
0
0
0
0
10
20
1
17
2
16
7
2
2
1
0
3
0
0
143,105
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.BEC
class BEC(TalkerSentence): """ Bearing & Distance to Waypoint, Dead Reckoning """ fields = ( ("Timestamp", "timestamp", timestamp), ("Waypoint Latitude", "waypoint_lat"), ("Waypoint Latitude direction", "waypoint_lat_dir"), ("Waypoint Longitude", "waypoint_lon"), ("Waypoint Longitude direction", "waypoint_lon_dir"), ("Bearing, true", "bearing_true"), ("Bearing True symbol", "bearing_true_sym"), # T = true ("Bearing Magnetic", "bearing_mag"), ("Bearing Magnetic symbol", "bearing_mag_sym"), ("Nautical Miles", "nautical_miles"), ("Nautical Miles symbol", "nautical_miles_sym"), ("Waypoint ID", "waypoint_id"), ("FAA mode indicator", "faa_mode"), )
class BEC(TalkerSentence): ''' Bearing & Distance to Waypoint, Dead Reckoning ''' pass
1
1
0
0
0
0
0
0.19
1
0
0
0
0
0
0
10
18
0
16
2
15
3
2
2
1
0
3
0
0
143,106
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.BOD
class BOD(TalkerSentence): # 045.,T,023.,M,DEST,START fields = ( ('Bearing True', 'bearing_t', Decimal), ('Bearing True Type', 'bearing_t_type'), ('Bearing Magnetic', 'bearing_mag', Decimal), ('Bearing Magnetic Type', 'bearing_mag_type'), ('Destination', 'dest'), ('Start', 'start'), )
class BOD(TalkerSentence): pass
1
0
0
0
0
0
0
0.11
1
0
0
0
0
0
0
10
10
0
9
2
8
1
2
2
1
0
3
0
0
143,107
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.BWC
class BWC(TalkerSentence): fields = ( ('Timestamp', 'timestamp', timestamp), ('Latitude of next Waypoint', 'lat_next'), ('Latitude of next Waypoint Direction', 'lat_next_direction'), ('Longitude of next Waypoint', 'lon_next'), ('Longitude of next Waypoint Direction', 'lon_next_direction'), ('True track to waypoint', 'true_track'), ('True Track Symbol', 'true_track_sym'), ('Magnetic track to waypoint', 'mag_track'), ('Magnetic Symbol', 'mag_sym'), ('Range to waypoint', 'range_next'), ('Unit of range', 'range_unit'), ('Waypoint Name', 'waypoint_name'), )
class BWC(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
15
0
15
2
14
0
2
2
1
0
3
0
0
143,108
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.BWR
class BWR(TalkerSentence): fields = ( ('Timestamp', 'timestamp', timestamp), ('Latitude of next Waypoint', 'lat_next'), ('Latitude of next Waypoint Direction', 'lat_next_direction'), ('Longitude of next Waypoint', 'lon_next'), ('Longitude of next Waypoint Direction', 'lon_next_direction'), ('True track to waypoint', 'true_track'), ('True Track Symbol', 'true_track_sym'), ('Magnetic track to waypoint', 'mag_track'), ('Magnetic Symbol', 'mag_sym'), ('Range to waypoint', 'range_next'), ('Unit of range', 'range_unit'), ('Waypoint Name', 'waypoint_name'), )
class BWR(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
15
0
15
2
14
0
2
2
1
0
3
0
0
143,109
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.BWW
class BWW(TalkerSentence): """ Bearing, Waypoint to Waypoint """ fields = ( ("Bearing degrees True", "bearing_deg_true"), ("Bearing degrees True Symbol", "bearing_deg_true_sym"), ("Bearing degrees Magnitude", "bearing_deg_mag"), ("Bearing degrees Magnitude Symbol", "bearing_deg_mag_sym"), ("Destination Waypoint ID", "waypoint_id_dest"), ("Origin Waypoint ID", "waypoint_id_orig"), )
class BWW(TalkerSentence): ''' Bearing, Waypoint to Waypoint ''' pass
1
1
0
0
0
0
0
0.22
1
0
0
0
0
0
0
10
11
0
9
2
8
2
2
2
1
0
3
0
0
143,110
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.DBS
class DBS(TalkerSentence): fields = ( ('Depth below surface, feet', 'depth_feet', Decimal), ('Feets', 'feets'), ('Depth below surface, meters', 'depth_meter', Decimal), ('Meters', 'meters'), ('Depth below surface, fathoms', 'depth_ fathoms', Decimal), ('Fathoms', 'fathoms'), )
class DBS(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
9
0
9
2
8
0
2
2
1
0
3
0
0
143,111
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.DBT
class DBT(TalkerSentence): """ Depth Below Transducer """ fields = ( ("Depth below surface, feet", "depth_feet", Decimal), ("Feet", "unit_feet"), ("Depth below surface, meters", "depth_meters", Decimal), ("Meters", "unit_meters"), ("Depth below surface, fathoms", "depth_fathoms", Decimal), ("fathoms", "unit_fathoms"), )
class DBT(TalkerSentence): ''' Depth Below Transducer ''' pass
1
1
0
0
0
0
0
0.22
1
0
0
0
0
0
0
10
11
0
9
2
8
2
2
2
1
0
3
0
0
143,112
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.DPT
class DPT(TalkerSentence): fields = ( ('Water depth, in meters', 'depth', Decimal), ('Offset from the trasducer, in meters', 'offset', Decimal), ('Maximum range scale in use', 'range', Decimal), )
class DPT(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
6
0
6
2
5
0
2
2
1
0
3
0
0
143,113
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.ALR
class ALR(TalkerSentence): """ Set alarm state $--ALR,hhmmss.ss,xxx,A,A,c--c*hh<CR><LF> """ fields = ( ('Time of alarm condition change, UTC', 'timestamp', timestamp), ('Unique alarm number (identifier) at alarm source', 'alarm_num'), ('Alarm condition (A=threshold exceeded, V=not exceeded)', 'alarm_con'), ('Alarm\'s acknowledge state (A=acknowledged, V=unacknowledged)', 'alarm_state'), ('Alarm\'s description text', 'description'), )
class ALR(TalkerSentence): ''' Set alarm state $--ALR,hhmmss.ss,xxx,A,A,c--c*hh<CR><LF> ''' pass
1
1
0
0
0
0
0
0.38
1
0
0
0
0
0
0
10
11
0
8
2
7
3
2
2
1
0
3
0
0
143,114
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GBS
class GBS(TalkerSentence): fields = ( ('Timestamp','timestamp', timestamp), ('Expected error in latitude', 'lat_err'), ('Expected error in longitude', 'lon_err'), ('Expected error in altitude', 'alt_err'), ('PRN of most likely failed satellite','sat_prn_num_f'), ('Probability of missed detection for most likely failed satellite','pro_miss', Decimal), ('Estimate of bias in meters on most likely failed satellite','est_bias'), ('Standard deviation of bias estimate','est_bias_dev'), )
class GBS(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
11
0
11
2
10
0
2
2
1
0
3
0
0
143,115
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.DTM
class DTM(TalkerSentence): fields = ( ('Local datum', 'datum'), ('Subdivision datum', 'subd_datum'), ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('Signed altitude', 'altitude'), ('Datum code', 'datum_code'), )
class DTM(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
11
0
11
2
10
0
2
2
1
0
3
0
0
143,116
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GSV
class GSV(TalkerSentence): fields = ( ('Number of messages of type in cycle', 'num_messages'), ('Message Number', 'msg_num'), ('Total number of SVs in view', 'num_sv_in_view'), ('SV PRN number 1', 'sv_prn_num_1'), ('Elevation in degrees 1', 'elevation_deg_1'), # 90 max ('Azimuth, deg from true north 1', 'azimuth_1'), # 000 to 159 ('SNR 1', 'snr_1'), # 00-99 dB ('SV PRN number 2', 'sv_prn_num_2'), ('Elevation in degrees 2', 'elevation_deg_2'), # 90 max ('Azimuth, deg from true north 2', 'azimuth_2'), # 000 to 159 ('SNR 2', 'snr_2'), # 00-99 dB ('SV PRN number 3', 'sv_prn_num_3'), ('Elevation in degrees 3', 'elevation_deg_3'), # 90 max ('Azimuth, deg from true north 3', 'azimuth_3'), # 000 to 159 ('SNR 3', 'snr_3'), # 00-99 dB ('SV PRN number 4', 'sv_prn_num_4'), ('Elevation in degrees 4', 'elevation_deg_4'), # 90 max ('Azimuth, deg from true north 4', 'azimuth_4'), # 000 to 159 ('SNR 4', 'snr_4'), )
class GSV(TalkerSentence): pass
1
0
0
0
0
0
0
0.55
1
0
0
0
0
0
0
10
22
0
22
2
21
12
2
2
1
0
3
0
0
143,117
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GST
class GST(TalkerSentence): fields = ( ('UTC time of the GGA or GNS fix associated with this sentence.', 'timestamp', timestamp), ('RMS value of the standard deviation of the range inputs to the navigation process. Range inputs include preudoranges & DGNSS corrections.', 'rms', float), ('Standard deviation of semi-major axis of error ellipse (meters)', 'std_dev_major', float), ('Standard deviation of semi-minor axis of error ellipse (meters)', 'std_dev_minor', float), ('Orientation of semi-major axis of error ellipse (degrees from true north)', 'orientation', float), ('Standard deviation of latitude error (meters)', 'std_dev_latitude', float), ('Standard deviation of longitude error (meters)', 'std_dev_longitude', float), ('Standard deviation of altitude error (meters)', 'std_dev_altitude', float), )
class GST(TalkerSentence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
11
0
11
2
10
0
2
2
1
0
3
0
0
143,118
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GSA
class GSA(TalkerSentence, ValidGSAFix): fields = ( ('Mode', 'mode'), ('Mode fix type', 'mode_fix_type'), ('SV ID01', 'sv_id01'), ('SV ID02', 'sv_id02'), ('SV ID03', 'sv_id03'), ('SV ID04', 'sv_id04'), ('SV ID05', 'sv_id05'), ('SV ID06', 'sv_id06'), ('SV ID07', 'sv_id07'), ('SV ID08', 'sv_id08'), ('SV ID09', 'sv_id09'), ('SV ID10', 'sv_id10'), ('SV ID11', 'sv_id11'), ('SV ID12', 'sv_id12'), ('PDOP (Dilution of precision)', 'pdop'), ('HDOP (Horizontal DOP)', 'hdop'), ('VDOP (Vertical DOP)', 'vdop'), )
class GSA(TalkerSentence, ValidGSAFix): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
11
20
0
20
2
19
0
2
2
1
0
3
0
0
143,119
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.HBT
class HBT(TalkerSentence): """ Heartbeat supervision sentence Format: $--HBT,<1>,<2>,<3>*hh<CR><LF> e.g. $AIHBT,30,A,5*0D <1> Configured repeat interval <2> Equipment status <3> Sequential sentence identifier """ fields = ( ("Configured repeat interval", "interval", float), ("Equipment status", "eq_status"), ("Sequential sentence identifier", "seq_sent_iden", int), )
class HBT(TalkerSentence): ''' Heartbeat supervision sentence Format: $--HBT,<1>,<2>,<3>*hh<CR><LF> e.g. $AIHBT,30,A,5*0D <1> Configured repeat interval <2> Equipment status <3> Sequential sentence identifier ''' pass
1
1
0
0
0
0
0
1.17
1
0
0
0
0
0
0
10
13
0
6
2
5
7
2
2
1
0
3
0
0
143,120
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GRS
class GRS(TalkerSentence): """ Order of satellites will match those in the last GSA """ fields = ( ('Timestamp', 'timestamp', timestamp), ('Residuals mode', 'residuals_mode', int), ('SV 01 Residual (m)', 'sv_res_01', float), ('SV 02 Residual (m)', 'sv_res_02', float), ('SV 03 Residual (m)', 'sv_res_03', float), ('SV 04 Residual (m)', 'sv_res_04', float), ('SV 05 Residual (m)', 'sv_res_05', float), ('SV 06 Residual (m)', 'sv_res_06', float), ('SV 07 Residual (m)', 'sv_res_07', float), ('SV 08 Residual (m)', 'sv_res_08', float), ('SV 09 Residual (m)', 'sv_res_09', float), ('SV 10 Residual (m)', 'sv_res_10', float), ('SV 11 Residual (m)', 'sv_res_11', float), ('SV 12 Residual (m)', 'sv_res_12', float), )
class GRS(TalkerSentence): ''' Order of satellites will match those in the last GSA ''' pass
1
1
0
0
0
0
0
0.12
1
0
0
0
0
0
0
10
19
0
17
2
16
2
2
2
1
0
3
0
0
143,121
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GNS
class GNS(TalkerSentence, LatLonFix): fields = ( ('Timestamp', 'timestamp', timestamp), ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('Mode indicator', 'mode_indicator'), ('Total number of satelites in use', 'num_sats'), ('HDROP', 'hdop'), ('Antenna altitude, meters', 'altitude'), ('Goeidal separation meters', 'geo_sep'), ('Age of diferential data', 'age_gps_data'), ('Differential reference station ID', 'diferential'), )
class GNS(TalkerSentence, LatLonFix): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
18
15
0
15
2
14
0
2
2
1
0
3
0
0
143,122
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GLL
class GLL(TalkerSentence, ValidStatusFix, LatLonFix): fields = ( ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('Timestamp', 'timestamp', timestamp), ('Status', 'status'), # contains the 'A' or 'V' flag ("FAA mode indicator", "faa_mode"), )
class GLL(TalkerSentence, ValidStatusFix, LatLonFix): pass
1
0
0
0
0
0
0
0.1
3
0
0
0
0
0
0
19
10
0
10
2
9
1
2
2
1
0
3
0
0
143,123
Knio/pynmea2
Knio_pynmea2/pynmea2/types/talker.py
pynmea2.types.talker.GGA
class GGA(TalkerSentence, ValidGGAFix, LatLonFix): fields = ( ('Timestamp', 'timestamp', timestamp), ('Latitude', 'lat'), ('Latitude Direction', 'lat_dir'), ('Longitude', 'lon'), ('Longitude Direction', 'lon_dir'), ('GPS Quality Indicator', 'gps_qual', int), ('Number of Satellites in use', 'num_sats'), ('Horizontal Dilution of Precision', 'horizontal_dil'), ('Antenna Alt above sea level (mean)', 'altitude', float), ('Units of altitude (meters)', 'altitude_units'), ('Geoidal Separation', 'geo_sep'), ('Units of Geoidal Separation (meters)', 'geo_sep_units'), ('Age of Differential GPS Data (secs)', 'age_gps_data'), ('Differential Reference Station ID', 'ref_station_id'), )
class GGA(TalkerSentence, ValidGGAFix, LatLonFix): pass
1
0
0
0
0
0
0
0
3
0
0
0
0
0
0
19
17
0
17
2
16
0
2
2
1
0
3
0
0
143,124
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions.py
knoema.api_definitions.UploadDatasetDetails
class UploadDatasetDetails(object): """The class contains dataset details from verify result response""" def __init__(self, data): self.dataset_id = data['DatasetId'] self.dataset_name = data['DatasetName'] self.source = data['Source'] self.description = data['Description'] self.dataset_ref = data['DatasetRef'] self.publication_date = data['PublicationDate'] if 'PublicationDate' in data else None self.accessed_on = data['AccessedOn'] if 'AccessedOn' in data else None
class UploadDatasetDetails(object): '''The class contains dataset details from verify result response''' def __init__(self, data): pass
2
1
8
0
8
0
3
0.11
1
0
0
0
1
7
1
1
11
1
9
9
7
1
9
9
7
3
1
0
3
143,125
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/data_reader.py
knoema.data_reader.DimensionMetadataReader
class DimensionMetadataReader: def __init__(self, client, dataset, dimension): self.client = client self.dataset = dataset self.dimension = dimension def get(self): dim_info = self.client.get_dimension(self.dataset, self.dimension) view_model = view_definition.Dimension() view_model.key = dim_info.key view_model.id = dim_info.id view_model.name = dim_info.name view_model.isGeo = dim_info.is_geo view_model.datasetId = self.dataset for fields in dim_info.fields: view_model.fields.append(view_definition.Field(fields)) frame_data = [] headers = ['key', 'name', 'level', 'parent key', 'parent id', 'parent name', 'hasdata'] header_filled = False parents = {} for item in dim_info.items: parents[item.level] = { 'id': item.fields['id'] if 'id' in item.fields else None, 'key': item.key, 'name': item.name } parent = {'id': None, 'key': -1, 'name': None} if item.level > 0: parent = parents[item.level - 1] row = [item.key, item.name, item.level, parent['key'], parent['id'], parent['name'], item.hasdata] for field in dim_info.fields: if not header_filled: headers.append(field['name']) if field['name'] in item.fields: row.append(item.fields[field['name']]) else: row.append(None) if not header_filled: header_filled = True frame_data.append(row) view_model.members = pandas.DataFrame(frame_data, columns=headers) return view_model
class DimensionMetadataReader: def __init__(self, client, dataset, dimension): pass def get(self): pass
3
0
25
5
20
0
5
0
0
2
2
0
2
3
2
2
52
11
41
17
38
0
36
17
33
9
0
3
10
143,126
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions.py
knoema.api_definitions.UploadPostResponse
class UploadPostResponse(object): """The class contains response from upload post request""" def __init__(self, data): self.successful = data['Successful'] if 'Successful' in data else False self.error = data['Error'] if 'Error' in data else None self.properties = FileProperties(data['Properties'])
class UploadPostResponse(object): '''The class contains response from upload post request''' def __init__(self, data): pass
2
1
4
0
4
0
3
0.2
1
1
1
0
1
3
1
1
7
1
5
5
3
1
5
5
3
3
1
0
3
143,127
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.CompanyResult
class CompanyResult(SearchResult): def __init__(self, company): super().__init__(company) self.name = company.name self.id = company.id self.company = None
class CompanyResult(SearchResult): def __init__(self, company): pass
2
0
6
1
5
0
1
0
1
1
0
0
1
3
1
2
8
2
6
5
4
0
6
5
4
1
2
0
1
143,128
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.CompanyResultInt
class CompanyResultInt(SearchResultInt): def __init__(self, data): super().__init__(data) self.name = data['concepts'][0]['title'] self.id = data['concepts'][0]['id']
class CompanyResultInt(SearchResultInt): def __init__(self, data): pass
2
0
5
1
4
0
1
0
1
1
0
0
1
2
1
2
7
2
5
4
3
0
5
4
3
1
2
0
1
143,129
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.Dimension
class Dimension(object): def __init__(self, data): self.name = data['dimension'] self.key = data['key'] self.value = data['name']
class Dimension(object): def __init__(self, data): pass
2
0
4
0
4
0
1
0
1
0
0
0
1
3
1
1
6
1
5
5
3
0
5
5
3
1
1
0
1
143,130
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.SearchConfig
class SearchConfig(object): def __init__(self, data): self.host = data['host'] self.search_host = data['searchHost'] self.lang = data['lang'] self.access_token = data['accessToken'] self.session_id = data['sessionId'] self.community_id = data['communityId'] def build_search_url(self, query): quoted_query = urllib.parse.quote(query) url = 'https://{}/api/1.0/search?query={}&scope=instant,semantic&count=8&version=4&host={}&lang={}&sessionId={}&access_token={}' url = url.format(self.search_host, quoted_query, self.host, self.lang, self.session_id, self.access_token or "") if self.community_id: url += '&communityId={}'.format(self.community_id) return url
class SearchConfig(object): def __init__(self, data): pass def build_search_url(self, query): pass
3
0
8
1
7
0
2
0
1
0
0
0
2
6
2
2
19
4
15
11
12
0
15
11
12
2
1
1
3
143,131
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.SearchResult
class SearchResult(object): def __init__(self, result): self.type = result.type
class SearchResult(object): def __init__(self, result): pass
2
0
2
0
2
0
1
0
1
0
0
2
1
1
1
1
4
1
3
3
1
0
3
3
1
1
1
0
1
143,132
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/data_reader.py
knoema.data_reader.KnoemaSeries
class KnoemaSeries(object): """This class combines values and index points for one time series""" def __init__(self, name, values=[], index=[], detail_columns=None): self.name = name self.values = values self.index = index self.column_count = len(detail_columns) if detail_columns is not None else 0 self.column_values = [] if self.column_count > 0 else None for _ in range(0, self.column_count): self.column_values.append([]) def add_value(self, value, index_point, columns=None): """The function is addeing new value to provied index. If index does not exist""" if index_point not in self.index: self.values.append(value) self.index.append(index_point) if self.column_count > 0: for i in range(0, self.column_count): self.column_values[i].append(None if columns is None else columns[i]) def creates_pandas_series(self, pandas_series, detail_columns): """The function creates pandas series based on index and values""" if detail_columns is None: pandas_series[self.name] = pandas.Series(self.values, self.index, name=self.name) else: series_name = self.name + ('Value',) pandas_series[series_name] = pandas.Series(self.values, self.index, name=series_name) for i in range(0, self.column_count): column_name = detail_columns[i] series_name = self.name + (column_name,) pandas_series[series_name] = pandas.Series(self.column_values[i], self.index, name=series_name)
class KnoemaSeries(object): '''This class combines values and index points for one time series''' def __init__(self, name, values=[], index=[], detail_columns=None): pass def add_value(self, value, index_point, columns=None): '''The function is addeing new value to provied index. If index does not exist''' pass def creates_pandas_series(self, pandas_series, detail_columns): '''The function creates pandas series based on index and values''' pass
4
3
9
0
8
1
4
0.12
1
2
0
0
3
5
3
3
32
3
26
14
22
3
25
14
21
5
1
3
12
143,133
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions.py
knoema.api_definitions.TimeSeriesAttribute
class TimeSeriesAttribute(object): """This class contains information about dataset' s timeseries attributes""" def __init__(self, data): self.name = data['name'] self.type = data['type'] self.allowed_values = data['allowedValues']
class TimeSeriesAttribute(object): '''This class contains information about dataset' s timeseries attributes''' def __init__(self, data): pass
2
1
4
0
4
0
1
0.2
1
0
0
0
1
3
1
1
6
0
5
5
3
1
5
5
3
1
1
0
1
143,134
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/data_reader.py
knoema.data_reader.DetailsResponseReader
class DetailsResponseReader(ResponseReader): def __init__(self, reader, data_resp): self.data_resp = data_resp super().__init__(reader) def get_pandasframe(self): records = self.convert_pandasframe() if not self.include_metadata: return records return records, None def convert_pandasframe(self): titles = [] columns = [] indexes = [] for col in self.data_resp.columns: indexes.append(col['index']) if col['dimensionId'] != None: if 'detailColumns' in col: titles.append(col['name']) columns.append([col['id'], 'name']) for detail in col['detailColumns']: indexes.append(detail['index']) titles.append(detail['name']) columns.append([col['id'], detail['id']]) else: titles.append(col['name']) columns.append(col['id']) else: if col['type'] == 'Date': titles.append(col['name']) columns.append([col['id'], 'value']) continue if col['type'] == 'Currency': titles.append(col['name']) columns.append([col['id'], 'value']) continue titles.append(col['name']) columns.append(col['id']) #sort both array by indexes titles, columns = zip(*[x for _,x in sorted(zip(indexes, zip(titles, columns)))]) records = [] for tuple in self.data_resp.tuples: record = [] for col in columns: if isinstance(col, str): val = tuple[col] record.append(val) else: val = tuple[col[0]] record.append(val[col[1]] if val != None else None) records.append(record) return pandas.DataFrame(data=records, columns=titles)
class DetailsResponseReader(ResponseReader): def __init__(self, reader, data_resp): pass def get_pandasframe(self): pass def convert_pandasframe(self): pass
4
0
19
2
16
0
5
0.02
1
3
0
0
3
1
3
5
59
8
50
16
46
1
47
15
43
11
2
4
14
143,135
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_sema.py
knoema.api_definitions_sema.CompanyIndicatorInt
class CompanyIndicatorInt(object): def __init__(self, data): self._id = data['id'] self._full_id = data['full_id'] self.name = data['name'] self.count = data['count']
class CompanyIndicatorInt(object): def __init__(self, data): pass
2
0
5
0
5
0
1
0
1
0
0
0
1
4
1
1
7
1
6
6
4
0
6
6
4
1
1
0
1
143,136
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_sema.py
knoema.api_definitions_sema.CompanyInt
class CompanyInt(object): def __init__(self, data): self.name = data['title'] self.groups = [] for group in data['groupHierarchies']: self.groups.append(CompanyIndicatorsGroupInt(group))
class CompanyInt(object): def __init__(self, data): pass
2
0
6
1
5
0
2
0
1
1
1
0
1
2
1
1
8
2
6
5
4
0
6
5
4
2
1
1
2
143,137
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_sema.py
knoema.api_definitions_sema.CompanyIndicatorsGroupInt
class CompanyIndicatorsGroupInt(object): def __init__(self, data): self.name = data['topParent']['name'] hierarchy = data['hierarchy'] item_data = data['itemData'] self.indicators = [] for _, indicators_list in hierarchy.items(): for ind in indicators_list: indicator = { 'id': ind['id'], 'name': ind['name'] } ind_key = str(ind['key']) if ind_key in item_data: indicator['full_id'] = item_data[ind_key]['conceptsQuery'] indicator['count'] = item_data[ind_key]['count'] self.indicators.append(CompanyIndicatorInt(indicator))
class CompanyIndicatorsGroupInt(object): def __init__(self, data): pass
2
0
19
3
16
0
4
0
1
2
1
0
1
2
1
1
21
4
17
10
15
0
14
10
12
4
1
3
4
143,138
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_sema.py
knoema.api_definitions_sema.CompanyIndicatorsGroup
class CompanyIndicatorsGroup(object): """"The class contains information about named group of indicator""" def __init__(self, group, client): self.name = group.name self.indicators = [] for indicator in group.indicators: self.indicators.append(CompanyIndicator(indicator, client))
class CompanyIndicatorsGroup(object): '''"The class contains information about named group of indicator''' def __init__(self, group, client): pass
2
1
6
1
5
0
2
0.17
1
1
1
0
1
2
1
1
9
2
6
5
4
1
6
5
4
2
1
1
2
143,139
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_sema.py
knoema.api_definitions_sema.CompanyIndicator
class CompanyIndicator(object): """The class contains information about company indicator""" def __init__(self, indicator, client): self._client = client self._id = indicator._id self._full_id = indicator._full_id self.name = indicator.name self.count = indicator.count def get(self, transform = None): ind_info = self._client.get_indicator_info(self._full_id) if len(ind_info['groups']) < 1: return None first_group = ind_info['groups'][0] dataset = first_group['id'] ds = self._client.get_dataset(dataset) if dataset else None desc = first_group['batchDesctiptor'] pivot = self._client.get_data_by_json(desc) tr_reader = TransformationDataReader(self._client, None, transform, None) tr_reader.dataset = ds pivot_reader = PivotResponseReader(tr_reader, pivot) frame = pivot_reader.get_pandasframe() return frame
class CompanyIndicator(object): '''The class contains information about company indicator''' def __init__(self, indicator, client): pass def get(self, transform = None): pass
3
1
13
3
10
0
2
0.05
1
2
2
0
2
5
2
2
30
8
21
17
18
1
21
17
18
3
1
1
4
143,140
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_sema.py
knoema.api_definitions_sema.Company
class Company(object): """"The class contains data related to a company like name and groups of indicators""" def __init__(self, company, client): self.name = company.name self.groups = [] for group in company.groups: self.groups.append(CompanyIndicatorsGroup(group, client)) def get_indicator(self, name, group = None): for grp in self.groups: if group != None and grp.name != group: continue for indicator in grp.indicators: if indicator.name == name: return indicator return None
class Company(object): '''"The class contains data related to a company like name and groups of indicators''' def __init__(self, company, client): pass def get_indicator(self, name, group = None): pass
3
1
9
2
7
0
4
0.07
1
1
1
0
2
2
2
2
21
6
14
8
11
1
14
8
11
5
1
3
7
143,141
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.TimeseriesSearchResultInt
class TimeseriesSearchResultInt(SearchResultInt): def __init__(self, data): super().__init__(data) self.title = data['title'] self.dataset = data['dataset']['id'] self.frequency = data['frequency'] self.start_date = data['startDate'] self.end_date = data['endDate'] self.dimensions = [] self._dim_values = {} for dim in data['dimensions']: dimension = Dimension(dim) self._dim_values[dimension.name] = dimension.value self.dimensions.append(dimension)
class TimeseriesSearchResultInt(SearchResultInt): def __init__(self, data): pass
2
0
14
1
13
0
2
0
1
2
1
0
1
7
1
2
16
2
14
11
12
0
14
11
12
2
2
1
2
143,142
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.SearchResultInt
class SearchResultInt(object): def __init__(self, data): self.type = data['type']
class SearchResultInt(object): def __init__(self, data): pass
2
0
2
0
2
0
1
0
1
0
0
2
1
1
1
1
4
1
3
3
1
0
3
3
1
1
1
0
1
143,143
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.TimeseriesSearchResult
class TimeseriesSearchResult(SearchResult): def __init__(self, result, client): super().__init__(result) self._client = client self.title = result.title self.dataset = result.dataset self.frequency = result.frequency self.start_date = result.start_date self.end_date = result.end_date self.dimensions = [] self._dim_values = {} for dim in result.dimensions: self._dim_values[dim.name] = dim.value self.dimensions.append(dim) def get(self, transform = None): ds = self._client.get_dataset(self.dataset) reader = TransformationDataReader(self._client, self._dim_values, transform, self.frequency) reader.dataset = ds return reader.get_pandasframe()
class TimeseriesSearchResult(SearchResult): def __init__(self, result, client): pass def get(self, transform = None): pass
3
0
11
2
9
0
2
0
1
2
1
0
2
8
2
3
25
6
19
14
16
0
19
14
16
2
2
1
3
143,144
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.SearchResultsInt
class SearchResultsInt(object): def __init__(self, data): self.instant = None self.series = [] if data['totalItems'] == 0: return items = data['items'] for item in items: if item['type'] == 'ConceptBind': if item['concepts'][0]['conceptType'] == 'Company': self.instant = CompanyResultInt(item) if item['type'] == 'TimeSeries': self.series.append(TimeseriesSearchResultInt(item))
class SearchResultsInt(object): def __init__(self, data): pass
2
0
16
4
12
0
6
0
1
2
2
0
1
2
1
1
18
5
13
6
11
0
13
6
11
6
1
3
6
143,145
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions.py
knoema.api_definitions.RawDataResponse
class RawDataResponse(object): """The class contains raw data response""" def __init__(self, data): self.continuation_token = data['continuationToken'] self.series = data['data'] self.descriptor = data['descriptor'] if 'descriptor' in data else None self.dimensionFields = data['dimensionFields'] if 'dimensionFields' in data else None
class RawDataResponse(object): '''The class contains raw data response''' def __init__(self, data): pass
2
1
6
1
5
0
3
0.17
1
0
0
0
1
4
1
1
9
2
6
6
4
1
6
6
4
3
1
0
3
143,146
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/api_definitions_search.py
knoema.api_definitions_search.SearchResults
class SearchResults(object): def __init__(self, results, client): self.instant = None if results.instant != None: if results.instant.type == 'ConceptBind': self.instant = CompanyResult(results.instant) self.series = [] for series in results.series: self.series.append(TimeseriesSearchResult(series, client))
class SearchResults(object): def __init__(self, results, client): pass
2
0
9
1
8
0
4
0
1
2
2
0
1
2
1
1
11
2
9
5
7
0
9
5
7
4
1
2
4
143,147
Knoema/knoema-python-driver
Knoema_knoema-python-driver/knoema/data_reader.py
knoema.data_reader.DataReader
class DataReader(object): """This class read data from Knoema and transform it to pandas frame""" def __init__(self, client): self.client = client self.dataset = None self.include_metadata = False self.columns = None self.dimensions = [] self.separator = ';' def _get_series_name(self, series_point): names = [] for dim in self.dimensions: names.append(series_point[dim.id]) names.append(series_point['Frequency']) return tuple(names) def _get_series_with_metadata(self, series_point): names = [] for dim in self.dimensions: for item in dim.items: if item.name == series_point[dim.id]: dim_attrs = item.fields break for attr in dim.fields: if not attr['isSystemField']: value_empty = True for key, value in dim_attrs.items(): if definition.is_equal_strings_ignore_case(key, attr['name']): names.append(value) value_empty = False if value_empty: names.append(float("NaN")) names.append(series_point.get('Unit')) names.append(series_point.get('Scale')) names.append(series_point.get('Mnemonics')) for attr in self.dataset.timeseries_attributes: names.append(series_point.get(attr.name)) return tuple(names) def _get_attribute_names(self): names = [] for dim in self.dimensions: for attr in dim.fields: if not attr['isSystemField']: names.append(dim.name +' '+ attr['displayName']) names.append('Unit') names.append('Scale') names.append('Mnemonics') for attr in self.dataset.timeseries_attributes: names.append(attr.name) return names def _get_dimension_names(self): names = [] for dim in self.dataset.dimensions: names.append(dim.name) if self.dataset.has_time: names.append('Frequency') return names def _get_metadata_series(self, resp, names_of_attributes): series = {} for series_point in resp.tuples: val = series_point['Value'] if val is None: continue serie_name = self._get_series_name(series_point) if serie_name not in series: serie_attrs = self._get_series_with_metadata(series_point) series[serie_name] = KnoemaSeries(serie_name, serie_attrs, names_of_attributes, None) return series def _load_dimensions(self): for dim in self.dataset.dimensions: self.dimensions.append(self.client.get_dimension(self.dataset.id, dim.id))
class DataReader(object): '''This class read data from Knoema and transform it to pandas frame''' def __init__(self, client): pass def _get_series_name(self, series_point): pass def _get_series_with_metadata(self, series_point): pass def _get_attribute_names(self): pass def _get_dimension_names(self): pass def _get_metadata_series(self, resp, names_of_attributes): pass def _load_dimensions(self): pass
8
1
10
0
10
0
4
0.01
1
3
1
2
7
6
7
7
77
7
69
34
61
1
69
34
61
10
1
5
27