public async Task UpdateData()
        {
            //Pour le site1 source1 variable1 mettre à jour un an des valeurs
            //    Pour le site1 source1 dupliquer tous les valeurs de variable1 en variable3
            var client = await authenticator.GetAuthenticatedClient();

            var variable = await variableSelector.SelectVariable(client);

            Console.WriteLine($"Generating data for variable id {variable.Id}");
            var data = GenerateData(DateTime.Today.AddYears(-1), DateTime.Today, TimeSpan.FromMinutes(10), 100);

            await AddOrUpdateData(client, variable.Id, data);
        }
        public async Task DisplayData()
        {
            var client = await authenticator.GetAuthenticatedClient();

            var variable = await variableSelector.SelectVariable(client);

            if (variable == null)
            {
                return;
            }

            var variableTypes = await GetVariableTypes(client);

            var variableType = variableTypes.Single(x => x.Id == variable.VariableTypeId);

            Console.WriteLine();
            Console.WriteLine("1. Get RAW Data");
            Console.WriteLine("2. Get Data grouped by hour");

            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("Select how to get the data: ");
            var display = Convert.ToInt32(Console.ReadLine());

            Stopwatch sw = new Stopwatch();

            sw.Start();
            var data = await GetData(client, variable, display == 1? 0 : 2, variableType.Aggregate);

            var getDataElapsedTime = sw.Elapsed;

            sw.Restart();
            ConsoleTable
            .From(data.Select(x => new { x.VariableId, Value = x.GetValue(), x.Date }))
            .Write();
            var displayDataElapsedTime = sw.Elapsed;

            sw.Stop();
            Console.WriteLine($"Data retrieval took {getDataElapsedTime:g}");
            Console.WriteLine($"Data display took {displayDataElapsedTime:g}");
        }