From ea52f92f31e71ef41e492a41f342b9a0ed5f8bfe Mon Sep 17 00:00:00 2001 From: Pascal Michaillat <85443660+pmichaillat@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:07:46 -0700 Subject: [PATCH] Improve table example --- content/data/data1.md | 4 +-- public/data/data1/index.html | 68 ++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/content/data/data1.md b/content/data/data1.md index c61c0f472..3e376c7d4 100644 --- a/content/data/data1.md +++ b/content/data/data1.md @@ -42,8 +42,8 @@ proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ## Description of variables -| Variable | Range | Description | Reference | -| --------- | --------- | ----------- | ------------------------------------------------------------------ | +| Variable | Time period | Description | Reference | +| :--------- | :---------: | :-----------: | :-----------------------------------------------------------------: | | $\alpha$ | 1930–1954 | Tempor | [Michaillat (2012)](https://pascalmichaillat.org/1.pdf) | | $\lambda$ | 1930–1954 | Fugiat | [Michaillat (2014)](https://pascalmichaillat.org/2.pdf) | | $\gamma$ | 1833–1954 | Duis | [Landais et al (2018)](https://pascalmichaillat.org/4.pdf) | diff --git a/public/data/data1/index.html b/public/data/data1/index.html index b6bc51437..e3b72d80e 100644 --- a/public/data/data1/index.html +++ b/public/data/data1/index.html @@ -68,8 +68,8 @@ "keywords": [ "Romance languages", "philology", "irregular verbs", "Portuguese", "Italian", "French", "Spanish", "dataset", "python" ], - "articleBody": "Overview This dataset contains all irregular verbs in all known Romance languages —including Portugese, Spanish, French, and Italian. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nView datasets Irregular verbs in Portugese Irregular verbs in Italian Irregular verbs in French Irregular verbs in Spanish Source of data Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nDescription of variables Variable Range Description Reference $\\alpha$ 1930–1954 Tempor Michaillat (2012) $\\lambda$ 1930–1954 Fugiat Michaillat (2014) $\\gamma$ 1833–1954 Duis Landais et al (2018) $\\omega$ 1930–1994 Excepteur Michaillat \u0026 Saez (2021) $\\sigma$ 1990–2023 Lorem Akerlof \u0026 Michaillat (2018) $\\chi^2$ 1990–2023 Labore Michaillat (2023) $c(t)$ 1890–1900 Pariatur Landais et al (2018) Using data with Python Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nStart Python: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nimport numpy as np import pandas as pd Open the file: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nfile_path = 'data.csv' with open(file_path, 'r') as file: Read data: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nlines = file.readlines() Parse and process data: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\ndata = [] for line in lines: line_data = line.strip().split(',') # Split the line into a list of values line_data = [float(value) for value in line_data] # Convert values to floats data.extend(line_data) # Extend the main list with values from the line Compute summary statistics using NumPy: Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\ndata_array = np.array(data) # Convert the list to a NumPy array mean = np.mean(data_array) median = np.median(data_array) std_dev = np.std(data_array) min_value = np.min(data_array) max_value = np.max(data_array) Display summary statistics: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nprint(f\"Mean: {mean}\") print(f\"Median: {median}\") print(f\"Standard Deviation: {std_dev}\") print(f\"Minimum Value: {min_value}\") print(f\"Maximum Value: {max_value}\") ", - "wordCount" : "540", + "articleBody": "Overview This dataset contains all irregular verbs in all known Romance languages —including Portugese, Spanish, French, and Italian. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nView datasets Irregular verbs in Portugese Irregular verbs in Italian Irregular verbs in French Irregular verbs in Spanish Source of data Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nDescription of variables Variable Time period Description Reference $\\alpha$ 1930–1954 Tempor Michaillat (2012) $\\lambda$ 1930–1954 Fugiat Michaillat (2014) $\\gamma$ 1833–1954 Duis Landais et al (2018) $\\omega$ 1930–1994 Excepteur Michaillat \u0026 Saez (2021) $\\sigma$ 1990–2023 Lorem Akerlof \u0026 Michaillat (2018) $\\chi^2$ 1990–2023 Labore Michaillat (2023) $c(t)$ 1890–1900 Pariatur Landais et al (2018) Using data with Python Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\nStart Python: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nimport numpy as np import pandas as pd Open the file: Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nfile_path = 'data.csv' with open(file_path, 'r') as file: Read data: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\nlines = file.readlines() Parse and process data: Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\ndata = [] for line in lines: line_data = line.strip().split(',') # Split the line into a list of values line_data = [float(value) for value in line_data] # Convert values to floats data.extend(line_data) # Extend the main list with values from the line Compute summary statistics using NumPy: Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\ndata_array = np.array(data) # Convert the list to a NumPy array mean = np.mean(data_array) median = np.median(data_array) std_dev = np.std(data_array) min_value = np.min(data_array) max_value = np.max(data_array) Display summary statistics: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nprint(f\"Mean: {mean}\") print(f\"Median: {median}\") print(f\"Standard Deviation: {std_dev}\") print(f\"Minimum Value: {min_value}\") print(f\"Maximum Value: {max_value}\") ", + "wordCount" : "541", "inLanguage": "en", "datePublished": "2013-03-07T00:00:00Z", "dateModified": "2024-05-08T00:00:00Z", @@ -243,60 +243,60 @@

Description of variablesMichaillat (2012) +$\alpha$ +1930–1954 +Tempor +Michaillat (2012) -$\lambda$ -1930–1954 -Fugiat -Michaillat (2014) +$\lambda$ +1930–1954 +Fugiat +Michaillat (2014) -$\gamma$ -1833–1954 -Duis -Landais et al (2018) +$\gamma$ +1833–1954 +Duis +Landais et al (2018) -$\omega$ -1930–1994 -Excepteur -Michaillat & Saez (2021) +$\omega$ +1930–1994 +Excepteur +Michaillat & Saez (2021) -$\sigma$ -1990–2023 -Lorem -Akerlof & Michaillat (2018) +$\sigma$ +1990–2023 +Lorem +Akerlof & Michaillat (2018) -$\chi^2$ -1990–2023 -Labore -Michaillat (2023) +$\chi^2$ +1990–2023 +Labore +Michaillat (2023) -$c(t)$ -1890–1900 -Pariatur -Landais et al (2018) +$c(t)$ +1890–1900 +Pariatur +Landais et al (2018)