<jupyter_start><jupyter_text>"""SPEECh: Scalable Probabilistic Estimates of EV ChargingCode first published in October 2021.Developed by <NAME> (<EMAIL>)."""  This code produces the data set of driver group profiles that has been posted Siobhan Powell, October 2021<jupyter_code>from speech import DataSetConfigurations
from speech import SPEECh
from speech import SPEEChGeneralConfiguration
from speech import Plotting
from speech import LoadProfile

import os
os.chdir('..')
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
total_evs = 10000
weekday_option = 'weekday'

# data = DataSetConfigurations('NewData', ng=9)
data = DataSetConfigurations('Original16', ng=16)
model = SPEECh(data)
config = SPEEChGeneralConfiguration(model)
config.num_evs(total_evs)
config.groups()
results = {}
n = 10000
for i in range(data.ng):
    j = data.cluster_reorder_dendtoac[i]
    config.group_configs[j].numbers(total_drivers=n)
    config.group_configs[j].load_gmms()
    model = LoadProfile(config, config.group_configs[j], weekday=weekday_option)
    model.calculate_load()
    (pd.DataFrame(model.load_segments_dict)/n).to_csv('Output_Data/group'+str(int(i+1))+'_weekday.csv', index=None)
    results[i] = pd.DataFrame(model.load_segments_dict)/n
total_evs = 10000
weekday_option = 'weekend'

# data = DataSetConfigurations('NewData', ng=9)
data = DataSetConfigurations('Original16', ng=16)
model = SPEECh(data)
config = SPEEChGeneralConfiguration(model)
config.num_evs(total_evs)
config.groups()

results = {}
n = 10000
for i in range(data.ng):
    j = data.cluster_reorder_dendtoac[i]
    config.group_configs[j].numbers(total_drivers=n)
    config.group_configs[j].load_gmms()
    model = LoadProfile(config, config.group_configs[j], weekday=weekday_option)
    model.calculate_load()
    (pd.DataFrame(model.load_segments_dict)/n).to_csv('Output_Data/group'+str(int(i+1))+'_weekend.csv', index=None)
    results[i] = pd.DataFrame(model.load_segments_dict)/n<jupyter_output><empty_output><jupyter_text>Testing:<jupyter_code>plt.plot(results[5])
test = pd.read_csv('Output_Data/group3_weekday.csv')
test2 = pd.read_csv('Output_Data/group3_weekend.csv')
plt.plot(test.sum(axis=1), label='weekday')
plt.plot(test2.sum(axis=1), label='weekend')
plt.legend()
plt.show()
test = pd.read_csv('Output_Data/group4_weekday.csv')
test2 = pd.read_csv('Output_Data/group4_weekend.csv')
plt.plot(test.sum(axis=1), label='weekday')
plt.plot(test2.sum(axis=1), label='weekend')
plt.legend()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1334913112164297, 'fraction_numerical': 0.02093206951026856, 'mean_word_length': 6.940438871473354, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '2034', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 962, 'n_tokens_neox': 905, 'n_words': 159, 'path': 'ProcessingForPaper/7_produce_dataset.ipynb', 'repo_name': 'SiobhanPowell/speech', 'size': '2560'}