Skip to content

Commit aeab7ce

Browse files
committed
move 2024_insights under cve_data_stories
1 parent e33905d commit aeab7ce

File tree

3 files changed

+11
-110
lines changed

3 files changed

+11
-110
lines changed

markdown/2024_insights/01_data_collection.md

Lines changed: 0 additions & 99 deletions
This file was deleted.

markdown/2024_insights/02_data_cleaning.md renamed to markdown/cve_data_stories/2024_insights/02_data_cleaning.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ This script processes NVD JSON data for a specified year and enriches it with CI
6565
```python
6666
def process_nvd_data(year):
6767
# Define input & output paths
68-
file_path = f'../../data/2024_insights/raw/nvdcve-1.1-{year}.json'
69-
cisa_kev_path = '../../data/2024_insights/raw/known_exploited_vulnerabilities.csv'
70-
output_path_template = '../../data/2024_insights/processed/nvd_data_{}.csv'
68+
file_path = f'../../data/cve_data_stories/raw/nvdcve-1.1-{year}.json'
69+
cisa_kev_path = '../../../data/cve_data_stories/raw/known_exploited_vulnerabilities.csv'
70+
output_path_template = '../../data/cve_data_stories/processed/nvd_data_{}.csv'
7171

7272
# Load the NVD JSON data for the given year
7373
with open(file_path, 'r') as file:

markdown/2024_insights/03_analysis.md renamed to markdown/cve_data_stories/2024_insights/03_analysis.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ print(f"Data generated on: {generated_date}")
2626
```
2727

2828
```python
29-
df_2024 = pd.read_csv('../../data/2024_insights/processed/nvd_data_2024.csv')
30-
df_2023 = pd.read_csv('../../data/2024_insights/processed/nvd_data_2023.csv')
29+
df_2024 = pd.read_csv('../../../data/2024_insights/processed/nvd_data_2024.csv')
30+
df_2023 = pd.read_csv('../../../data/2024_insights/processed/nvd_data_2023.csv')
3131

3232
df_2024.head()
3333
```
@@ -102,7 +102,7 @@ overview_metrics = {
102102
}
103103

104104
# Save the overview metrics to a JSON file
105-
output_path = "../../data/2024_insights/output/overview_metrics.json"
105+
output_path = "../../../data/2024_insights/output/overview_metrics.json"
106106
with open(output_path, "w") as f:
107107
json.dump(overview_metrics, f)
108108
```
@@ -185,7 +185,7 @@ time_series_metrics = {
185185
}
186186

187187
# Save the time_series_metrics to a JSON file
188-
with open("../../data/2024_insights/output/time_series_metrics.json", "w") as f:
188+
with open("../../../data/2024_insights/output/time_series_metrics.json", "w") as f:
189189
json.dump(time_series_metrics, f)
190190
```
191191

@@ -342,7 +342,7 @@ vendor_product = {
342342
}
343343

344344
# Save the vendor_product metrics to a JSON file
345-
with open("../../data/2024_insights/output/vendor_product_analysis.json", "w") as f:
345+
with open("../../../data/2024_insights/output/vendor_product_analysis.json", "w") as f:
346346
json.dump(vendor_product, f)
347347
```
348348

@@ -462,7 +462,7 @@ cisa_kev = {
462462
}
463463

464464
# Save JSON to File
465-
output_path = "../../data/2024_insights/output/cisa_kev_analysis.json"
465+
output_path = "../../../data/2024_insights/output/cisa_kev_analysis.json"
466466
with open(output_path, "w") as f:
467467
json.dump(cisa_kev, f)
468468
```
@@ -561,7 +561,7 @@ def handle_nan_values(obj):
561561
specific_cve_details_cleaned = handle_nan_values(specific_cve_details)
562562

563563
# Save the specific CVE details to a JSON file
564-
output_path = "../../data/2024_insights/output/cve_details.json"
564+
output_path = "../../../data/2024_insights/output/cve_details.json"
565565
with open(output_path, "w") as f:
566566
json.dump(specific_cve_details_cleaned, f)
567567
```
@@ -649,6 +649,6 @@ top_assigners = {
649649
}
650650

651651
# Save the top_assigners metrics to a JSON file
652-
with open("../../data/2024_insights/output/top_assigners.json", "w") as f:
652+
with open("../../../data/2024_insights/output/top_assigners.json", "w") as f:
653653
json.dump(top_assigners, f)
654654
```

0 commit comments

Comments
 (0)