Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oatsandsugar/70958b7cfaa9ecc350b6e72e255fcb25 to your computer and use it in GitHub Desktop.
Save oatsandsugar/70958b7cfaa9ecc350b6e72e255fcb25 to your computer and use it in GitHub Desktop.
# details about data store
us_telemetry_data_store_name = "US Telemetry 5k"
us_telemetry_data_store_id = GetDatastoreID(us_telemetry_data_store_name)
us_telemetry_data_path = "5K_us_telemetry.csv"
# ontology nodes, and training data columns
us_telemetry_training_col_dict = {
"Packet Loss": "main_QOS_PacketLoss_LostPercentage",
"Jitter": "main_QOS_Jitter_Average",
"Signal Strength": "main_QOS_SignalStrength",
"Link Speed": "main_QOS_LinkSpeed",
"Latency Average": "main_QOS_Latency_Average",
"Download Throughput": "main_QOS_DownloadThroughput",
"Upload Throughput": "main_QOS_UploadThroughput",
"Wifi Frequency": "main_WifiFrequency",
"BSSID": "main_BSSID",
"Timing Advance": "main_QOS_TA",
"Channel Quality Indicator": "main_QOS_CQI",
"Reference Signal Signal to Noise Ratio": "main_QOS_RSSNR",
"Reference Signal Received Quality": "main_QOS_RSRQ",
"Reference Signal Received Power": "main_QOS_RSRP",
"Physical Cell Identifier": "main_PCI",
"Base Station Identity Code": "main_BSIC",
"Mobile Country Code": "main_MCC",
"Mobile Channel": "main_MobileChannel",
"Mobile Connection Generation": "conn_Generation_Category",
"Session Delta Received Bytes": "main_QOS_DeltaReceivedBytes",
"Session Delta Transmitted Bytes": "main_QOS_DeltaTransmittedBytes",
"QoS Timestamp": "main_QOS_QOSDate",
"Session Timezone": "main_Timezone",
"Session End": "main_ConnectionEnd",
"Session Start": "main_ConnectionStart",
"Session Connection Technology": "main_ConnectionTechnology",
"Session Connection Type": "main_ConnectionType",
"Session Country": "main_Country",
"Device Velocity Bearing": "main_QOS_Velocity_Bearing",
"Device Velocity Speed": "main_QOS_Velocity_Speed",
"Device Vertical Accuracy": "main_QOS_Location_VerticalAccuracy",
"Device Horizontal Accuracy": "main_QOS_Location_HorizontalAccuracy",
"Device Battery State": "main_QOS_DeviceBatteryState",
"Device Battery Usage": "main_QOS_DeviceBatteryLevel",
"Device CPU Usage": "main_QOS_DeviceCPU",
"Device Unused Memory": "main_QOS_DeviceFreeMemory",
"Device Used Memory": "main_QOS_DeviceUsedMemory",
"Device Unused Storage": "main_QOS_DeviceFreeStorage",
"Device Used Storage": "main_QOS_DeviceUsedStorage",
"Device System Uptime": "main_QOS_SystemUptime",
"Device Language": "main_Device_DeviceLanguage",
"Device Storage": "main_Device_Storage",
"Device Memory": "main_Device_Memory",
"Screen Resolution Height": "main_Device_ScreenResolution_Height",
"Screen Resolution Width": "main_Device_ScreenResolution_Width",
"Device Model": "main_Device_Model",
"OS": "main_Device_OS",
"Manufacturer": "main_Device_Manufacturer",
"Network Provider": "sp_ServiceProviderBrandName",
"Network Provider": "main_ServiceProvider",
"Mobile Network Code": "main_MNC",
"Geo Hash": "main_Geohash",
"Altitude": "main_QOS_Location_Altitude",
"Longitude": "main_QOS_Location_Longitude",
"Latitude": "main_QOS_Location_Latitude",
"Subscriber City": "main_City",
}
AttachTrainingDataDictionary(
us_telemetry_training_col_dict,
us_telemetry_data_path,
us_telemetry_data_store_name,
)
# Canadian Names datastore
canadian_names_data_store_name = "Canadian Names"
canadian_names_data_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/people_places/500canadians.csv"
canadian_names_col_dict = {
'First Name': 'first_name',
'Family Name': 'last_name',
'Subscriber Street': 'address',
'Subscriber Company': 'company_name',
'Subscriber City': 'city',
'Session State or Territory': 'province',
'Subscriber Zip': 'postal',
'Subscriber Phone Number': 'phone1',
'Subscriber Phone Number': 'phone2',
'Subscriber Email': 'email',
}
AttachTrainingDataDictionary(
canadian_names_col_dict,
canadian_names_data_path,
canadian_names_data_store_name,
)
# British Names datastore
british_names_data_store_name = "British Names"
british_names_data_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/people_places/500brits.csv"
british_names_col_dict = {
'First Name': 'first_name',
'Family Name': 'last_name',
'Subscriber Company': 'company_name',
'Subscriber Street': 'address',
'Subscriber City': 'city',
'Session State or Territory': 'county',
'Subscriber Zip': 'postal',
'Subscriber Phone Number': 'phone1',
'Subscriber Phone Number': 'phone2',
'Subscriber Email': 'email',
}
AttachTrainingDataDictionary(
british_names_col_dict,
british_names_data_path,
british_names_data_store_name,
)
# Australian Names datastore
australian_names_data_store_name = "Australian Names"
australian_names_data_store_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/people_places/500australians.csv"
australian_names_col_dict = {
'First Name': 'first_name',
'Family Name': 'last_name',
'Subscriber Company': 'company_name',
'Subscriber Street': 'address',
'Subscriber City': 'city',
'Session State or Territory': 'state',
'Subscriber Zip': 'post',
'Subscriber Phone Number': 'phone1',
'Subscriber Phone Number': 'phone2',
'Subscriber Email': 'email',
}
AttachTrainingDataDictionary(
australian_names_col_dict,
australian_names_data_store_path,
australian_names_data_store_name,
)
# US Names datastore
us_names_data_store_name = "US Names"
us_names_data_store_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/people_places/500americans.csv"
us_names_col_dict = {
'First Name': 'first_name',
'Family Name': 'last_name',
'Subscriber Company': 'company_name',
'Subscriber Street': 'address',
'Subscriber City': 'city',
'Session State or Territory': 'county',
'Session State or Territory': 'state',
'Subscriber Zip': 'zip',
'Subscriber Phone Number': 'phone1',
'Subscriber Phone Number': 'phone2',
'Subscriber Email': 'email',
}
AttachTrainingDataDictionary(
us_names_col_dict,
us_names_data_store_path,
us_names_data_store_name,
)
# Users datastore
users_data_store_name = "Users"
users_data_store_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/pii/users.csv"
users_col_dict = {
'First Name': "first_name",
'Family Name': "last_name",
'Subscriber Company': 'company_name',
'Subscriber Street': 'address',
'Subscriber City': 'city',
'Session State or Territory': 'county',
'Session State or Territory': 'state',
'Subscriber Zip': 'zip',
'Subscriber Phone Number': 'phone1',
'Subscriber Phone Number': 'phone',
'Subscriber Email': 'email',
}
AttachTrainingDataDictionary(
users_col_dict,
users_data_store_path,
users_data_store_name,
)
# Countries datastore
countries_data_store_name = "Countries"
countries_data_store_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/people_places/countries.csv"
countries_col_dict = {
'Session Country': 'Name',
'Session Country': 'Code'
}
AttachTrainingDataDictionary(
countries_col_dict,
countries_data_store_path,
countries_data_store_name,
)
# Some Cities datastore
some_cities_data_store_name = "Some Cities"
some_cities_data_store_path = "https://raw.githubusercontent.com/datalogue/demo-data/master/people_places/cities.csv"
some_cities_col_dict = {
'Subscriber City': 'City',
'Session State or Territory': 'State'
}
AttachTrainingDataDictionary(
some_cities_col_dict,
some_cities_data_store_path,
some_cities_data_store_name,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment