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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b07d24d
 
 
 
 
 
 
 
 
 
 
 
 
 
87308e5
b07d24d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
---
license: apache-2.0
language:
- en
tags:
- NASA
- Earth
- Satellite
- Knowledge Graph
- Machine Learning
---

# NASA Knowledge Graph Dataset

## Dataset Summary

The **NASA Knowledge Graph Dataset** is an expansive graph-based dataset designed to integrate and interconnect information about satellite datasets, scientific publications, instruments, platforms, projects, data centers, and science keywords. This knowledge graph is particularly focused on datasets managed by NASA's Distributed Active Archive Centers (DAACs), which are NASA's data repositories responsible for archiving and distributing scientific data. In addition to NASA DAACs, the graph includes datasets from 184 data providers worldwide, including various government agencies and academic institutions.

The primary goal of the NASA Knowledge Graph is to bridge scientific publications with the datasets they reference, facilitating deeper insights and research opportunities within NASA's scientific and data ecosystem. By organizing these interconnections within a graph structure, this dataset enables advanced analyses, such as discovering influential datasets, understanding research trends, and exploring scientific collaborations.

## Data Integrity

Each file in the dataset has a SHA-256 checksum to verify its integrity:

| File Name                  | SHA-256 Checksum                                                          |
|----------------------------|---------------------------------------------------------------------------|
| `graph.cypher`             | `d78f7b166a86be3ceec16db75a1575dac95249af188b1d2e2adab7388a8e654a`        |
| `graph.graphml`            | `a781e358b338a181db5081a50127325febab67dcb283cb4124c877bf06de439e`        |
| `graph.json`               | `4794fd070953b3544ba3c841f13155f1cf8a1ca9abd1b240bbfaf482ce2cde32`        |

### Verification

To verify the integrity of each file, calculate its SHA-256 checksum and compare it with the hashes provided above.

You can use the following Python code to calculate the SHA-256 checksum:
```python
import hashlib

def calculate_sha256(filepath):
    sha256_hash = hashlib.sha256()
    with open(filepath, "rb") as f:
        for byte_block in iter(lambda: f.read(4096), b""):
            sha256_hash.update(byte_block)
    return sha256_hash.hexdigest()
```


## Dataset Structure

### Nodes and Properties

The knowledge graph consists of seven main node types, each representing a different entity within NASA's ecosystem:

#### 1. Dataset

- **Description**: Represents satellite datasets, particularly those managed by NASA DAACs, along with datasets from other governmental and academic data providers. These nodes contain metadata and attributes specific to each dataset.
- **Properties**:
  - `globalId` (String): Unique identifier for the dataset.
  - `doi` (String): Digital Object Identifier.
  - `shortName` (String): Abbreviated name of the dataset.
  - `longName` (String): Full name of the dataset.
  - `abstract` (String): Brief summary of the dataset.
  - `cmrId` (String): Common Metadata Repository ID.
  - `daac` (String): Distributed Active Archive Center associated with the dataset.
  - `temporalFrequency` (String): Frequency of data collection (e.g., daily, monthly).
  - `temporalExtentStart` (Date): Start date of the dataset's temporal coverage.
  - `temporalExtentEnd` (Date): End date of the dataset's temporal coverage.
  - `nwCorner` (Geo-Coordinate): Northwest corner coordinate of spatial coverage.
  - `seCorner` (Geo-Coordinate): Southeast corner coordinate of spatial coverage.
  - `landingPageUrl` (URL): Webpage link to the dataset.
  - `pagerank_global` (Float): PageRank score calculated using the natural graph direction.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector considering node labels.

#### 2. Publication

- **Description**: This node type captures publications that reference or use datasets, particularly those from NASA DAACs and other included data providers. By linking datasets and publications, this node type enables analysis of scientific impact and research usage of NASA’s datasets.
- **Properties**:
  - `globalId` (String): Unique identifier for the publication.
  - `DOI` (String): Digital Object Identifier.
  - `title` (String): Title of the publication.
  - `abstract` (String): Summary of the publication's content.
  - `authors` (List<String>): List of authors.
  - `year` (Integer): Year of publication.
  - `pagerank_global` (Float): PageRank score.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector.

#### 3. ScienceKeyword

- **Description**: Represents scientific keywords used to classify datasets and publications. Keywords provide topical context and aid in identifying research trends and related areas.
- **Properties**:
  - `globalId` (String): Unique identifier.
  - `name` (String): Name of the science keyword.
  - `pagerank_global` (Float): PageRank score.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector.

#### 4. Instrument

- **Description**: Instruments used in data collection, often mounted on platforms like satellites. Instruments are linked to the datasets they help generate.
- **Properties**:
  - `globalId` (String): Unique identifier.
  - `shortName` (String): Abbreviated name.
  - `longName` (String): Full name.
  - `pagerank_global` (Float): PageRank score.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector.

#### 5. Platform

- **Description**: Platforms, such as satellites or airborne vehicles, that host instruments for data collection.
- **Properties**:
  - `globalId` (String): Unique identifier.
  - `shortName` (String): Abbreviated name.
  - `longName` (String): Full name.
  - `Type` (String): Type of platform.
  - `pagerank_global` (Float): PageRank score.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector.

#### 6. Project

- **Description**: NASA projects associated with datasets, often indicating a funding source or collaborative initiative for data collection and research.
- **Properties**:
  - `globalId` (String): Unique identifier.
  - `shortName` (String): Abbreviated name.
  - `longName` (String): Full name.
  - `pagerank_global` (Float): PageRank score.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector.

#### 7. DataCenter

- **Description**: Represents data centers, primarily NASA DAACs, as well as other data providers in academia and government who manage and distribute datasets.
- **Properties**:
  - `globalId` (String): Unique identifier.
  - `shortName` (String): Abbreviated name.
  - `longName` (String): Full name.
  - `url` (URL): Website of the data center.
  - `pagerank_global` (Float): PageRank score.
  - `fastrp_embedding_with_labels` (List<Float>): FastRP embedding vector.

### Relationships

The knowledge graph includes several relationship types that define how nodes are interconnected.

#### 1. HAS_DATASET

- **Description**: Connects a `DataCenter` to its `Dataset(s)`.
- **Properties**: None.

#### 2. OF_PROJECT

- **Description**: Links a `Dataset` to a `Project`.
- **Properties**: None.

#### 3. HAS_PLATFORM

- **Description**: Associates a `Dataset` with a `Platform`.
- **Properties**: None.

#### 4. HAS_INSTRUMENT

- **Description**: Connects a `Platform` to an `Instrument`.
- **Properties**: None.

#### 5. HAS_SCIENCEKEYWORD

- **Description**: Links a `Dataset` to a `ScienceKeyword`.
- **Properties**: None.

#### 6. HAS_SUBCATEGORY

- **Description**: Defines hierarchical relationships between `ScienceKeyword` nodes.
- **Properties**: None.

#### 7. CITES

- **Description**: Represents citation relationships between `Publication` nodes, indicating how research builds on previous work.
- **Properties**: None.

#### 8. HAS_APPLIED_RESEARCH_AREA

- **Description**: Associates a `Publication` with a `ScienceKeyword`.
- **Properties**: None.

## Statistics

# Data Statistics

## Total Counts
| Type                 | Count   |
|----------------------|---------|
| **Total Nodes**      | 135,764 |
| **Total Relationships** | 365,857 |

## Node Label Counts
| Node Label        | Count    |
|-------------------|----------|
| Dataset           | 6,390    |
| DataCenter        | 184      |
| Project           | 333      |
| Platform          | 442      |
| Instrument        | 867      |
| ScienceKeyword    | 1,609    |
| Publication       | 125,939  |

## Relationship Label Counts
| Relationship Label        | Count     |
|---------------------------|-----------|
| HAS_DATASET              | 9,017     |
| OF_PROJECT               | 6,049     |
| HAS_PLATFORM             | 9,884     |
| HAS_INSTRUMENT           | 2,469     |
| HAS_SUBCATEGORY          | 1,823     |
| HAS_SCIENCEKEYWORD       | 20,436    |
| CITES                    | 208,670   |
| HAS_APPLIED_RESEARCH_AREA| 89,039    |
| USES_DATASET             | 18,470    |


## Data Formats

The Knowledge Graph Dataset is available in three formats:

### 1. JSON

- **File**: `graph.json`
- **Description**: A hierarchical data format representing nodes and relationships. Each node includes its properties, such as `globalId`, `doi`, and `pagerank_global`.
- **Usage**: Suitable for web applications and APIs, and for use cases where hierarchical data structures are preferred.

#### Loading the JSON Format

To load the JSON file into a graph database using Python and multiprocessing you can using the following script:

```python
import json
from tqdm import tqdm
from collections import defaultdict
from multiprocessing import Pool, cpu_count
from neo4j import GraphDatabase

# Batch size for processing
BATCH_SIZE = 100

# Neo4j credentials (replace with environment variables or placeholders)
NEO4J_URI = "bolt://<your-neo4j-host>:<port>"  # e.g., "bolt://localhost:7687"
NEO4J_USER = "<your-username>"
NEO4J_PASSWORD = "<your-password>"


def ingest_data(file_path):
    # Initialize counters and label trackers
    node_label_counts = defaultdict(int)
    relationship_label_counts = defaultdict(int)
    node_count = 0
    relationship_count = 0

    with open(file_path, "r") as f:
        nodes = []
        relationships = []

        # Read and categorize nodes and relationships, and count labels
        for line in tqdm(f, desc="Reading JSON Lines"):
            obj = json.loads(line.strip())
            if obj["type"] == "node":
                nodes.append(obj)
                node_count += 1
                for label in obj["labels"]:
                    node_label_counts[label] += 1
            elif obj["type"] == "relationship":
                relationships.append(obj)
                relationship_count += 1
                relationship_label_counts[obj["label"]] += 1

    # Print statistics
    print("\n=== Data Statistics ===")
    print(f"Total Nodes: {node_count}")
    print(f"Total Relationships: {relationship_count}")
    print("\nNode Label Counts:")
    for label, count in node_label_counts.items():
        print(f"  {label}: {count}")
    print("\nRelationship Label Counts:")
    for label, count in relationship_label_counts.items():
        print(f"  {label}: {count}")
    print("=======================")

    # Multiprocess node ingestion
    print("Starting Node Ingestion...")
    node_batches = [nodes[i : i + BATCH_SIZE] for i in range(0, len(nodes), BATCH_SIZE)]
    with Pool(processes=cpu_count()) as pool:
        list(
            tqdm(
                pool.imap(ingest_nodes_batch, node_batches),
                total=len(node_batches),
                desc="Ingesting Nodes",
            )
        )

    # Multiprocess relationship ingestion
    print("Starting Relationship Ingestion...")
    relationship_batches = [
        relationships[i : i + BATCH_SIZE]
        for i in range(0, len(relationships), BATCH_SIZE)
    ]
    with Pool(processes=cpu_count()) as pool:
        list(
            tqdm(
                pool.imap(ingest_relationships_batch, relationship_batches),
                total=len(relationship_batches),
                desc="Ingesting Relationships",
            )
        )


def ingest_nodes_batch(batch):
    with GraphDatabase.driver(NEO4J_URI, auth=(NEO4J_USER, NEO4J_PASSWORD)) as driver:
        with driver.session() as session:
            for node in batch:
                try:
                    label = node["labels"][0]  # Assumes a single label per node
                    query = f"""
                    MERGE (n:{label} {{globalId: $globalId}})
                    SET n += $properties
                    """
                    session.run(
                        query,
                        globalId=node["properties"]["globalId"],
                        properties=node["properties"],
                    )
                except Exception as e:
                    print(
                        f"Error ingesting node with globalId {node['properties']['globalId']}: {e}"
                    )


def ingest_relationships_batch(batch):
    with GraphDatabase.driver(NEO4J_URI, auth=(NEO4J_USER, NEO4J_PASSWORD)) as driver:
        with driver.session() as session:
            for relationship in batch:
                try:
                    rel_type = relationship[
                        "label"
                    ]  # Use the label for the relationship
                    query = f"""
                    MATCH (start {{globalId: $start_globalId}})
                    MATCH (end {{globalId: $end_globalId}})
                    MERGE (start)-[r:{rel_type}]->(end)
                    """
                    session.run(
                        query,
                        start_globalId=relationship["start"]["properties"]["globalId"],
                        end_globalId=relationship["end"]["properties"]["globalId"],
                    )
                except Exception as e:
                    print(
                        f"Error ingesting relationship with label {relationship['label']}: {e}"
                    )


if __name__ == "__main__":
    # Path to the JSON file
    JSON_FILE_PATH = "<path-to-your-graph.json>"

    # Run the ingestion process
    ingest_data(JSON_FILE_PATH)

```

### 2. GraphML

- **File**: `graph.graphml`
- **Description**: An XML-based format well-suited for complex graph structures and metadata-rich representations.
- **Usage**: Compatible with graph visualization and analysis tools, including Gephi, Cytoscape, and databases that support GraphML import.

#### Loading the GraphML Format

To import the GraphML file into a graph database with APOC support, use the following command:

```cypher
CALL apoc.import.graphml("path/to/graph.graphml", {readLabels: true})
```

### 3. Cypher

- **File**: `graph.cypher`
- **Description**: A series of Cypher commands to recreate the knowledge graph structure.
- **Usage**: Useful for recreating the graph in any Cypher-compatible graph database.

#### Loading the Cypher Format

To load the Cypher script, execute it directly using a command-line interface for your graph database:

```bash
neo4j-shell -file path/to/graph.cypher
```

### 4. Loading the Knowledge Graph into PyTorch Geometric (PyG)

This knowledge graph can be loaded into PyG (PyTorch Geometric) for further processing, analysis, or model training. Below is an example script that shows how to load the JSON data into a PyG-compatible `HeteroData` object.

The script first reads the JSON data, processes nodes and relationships, and then loads everything into a `HeteroData` object for use with PyG.

```python
import json
import torch
from torch_geometric.data import HeteroData
from collections import defaultdict

# Load JSON data from file
file_path = "path/to/graph.json"  # Replace with your actual file path
graph_data = []
with open(file_path, "r") as f:
    for line in f:
        try:
            graph_data.append(json.loads(line))
        except json.JSONDecodeError as e:
            print(f"Error decoding JSON line: {e}")
            continue

# Initialize HeteroData object
data = HeteroData()

# Mapping for node indices per node type
node_mappings = defaultdict(dict)

# Temporary storage for properties to reduce concatenation cost
node_properties = defaultdict(lambda: defaultdict(list))
edge_indices = defaultdict(lambda: defaultdict(list))

# Process each item in the loaded JSON data
for item in graph_data:
    if item['type'] == 'node':
        node_type = item['labels'][0]  # Assuming first label is the node type
        node_id = item['id']
        properties = item['properties']

        # Store the node index mapping
        node_index = len(node_mappings[node_type])
        node_mappings[node_type][node_id] = node_index

        # Store properties temporarily by type
        for key, value in properties.items():
            if isinstance(value, list) and all(isinstance(v, (int, float)) for v in value):
                node_properties[node_type][key].append(torch.tensor(value, dtype=torch.float))
            elif isinstance(value, (int, float)):
                node_properties[node_type][key].append(torch.tensor([value], dtype=torch.float))
            else:
                node_properties[node_type][key].append(value)  # non-numeric properties as lists

    elif item['type'] == 'relationship':
        start_type = item['start']['labels'][0]
        end_type = item['end']['labels'][0]
        start_id = item['start']['id']
        end_id = item['end']['id']
        edge_type = item['label']

        # Map start and end node indices
        start_idx = node_mappings[start_type][start_id]
        end_idx = node_mappings[end_type][end_id]

        # Append to edge list
        edge_indices[(start_type, edge_type, end_type)]['start'].append(start_idx)
        edge_indices[(start_type, edge_type, end_type)]['end'].append(end_idx)

# Finalize node properties by batch processing
for node_type, properties in node_properties.items():
    data[node_type].num_nodes = len(node_mappings[node_type])
    for key, values in properties.items():
        if isinstance(values[0], torch.Tensor):
            data[node_type][key] = torch.stack(values)
        else:
            data[node_type][key] = values  # Keep non-tensor properties as lists

# Finalize edge indices in bulk
for (start_type, edge_type, end_type), indices in edge_indices.items():
    edge_index = torch.tensor([indices['start'], indices['end']], dtype=torch.long)
    data[start_type, edge_type, end_type].edge_index = edge_index

# Display statistics for verification
print("Nodes and Properties:")
for node_type in data.node_types:
    print(f"\nNode Type: {node_type}")
    print(f"Number of Nodes: {data[node_type].num_nodes}")
    for key, value in data[node_type].items():
        if key != 'num_nodes':
            if isinstance(value, torch.Tensor):
                print(f"  - {key}: {value.shape}")
            else:
                print(f"  - {key}: {len(value)} items (non-numeric)")

print("\nEdges and Types:")
for edge_type in data.edge_types:
    edge_index = data[edge_type].edge_index
    print(f"Edge Type: {edge_type} - Number of Edges: {edge_index.size(1)} - Shape: {edge_index.shape}")

```

---

## Citation

Please cite the dataset as follows:

**NASA Goddard Earth Sciences Data and Information Services Center (GES-DISC).** (2024). *Knowledge Graph of NASA Earth Observations Satellite Datasets and Related Research Publications* [Data set]. DOI: [10.57967/hf/3463](https://doi.org/10.57967/hf/3463)

### BibTeX
```bibtex
@misc {nasa_goddard_earth_sciences_data_and_information_services_center__(ges-disc)_2024,
    author       = { {NASA Goddard Earth Sciences Data and Information Services Center (GES-DISC)} },
    title        = { nasa-eo-knowledge-graph },
    year         = 2024,
    url          = { https://huggingface.co/datasets/nasa-gesdisc/nasa-eo-knowledge-graph },
    doi          = { 10.57967/hf/3463 },
    publisher    = { Hugging Face }
}
```

## References
For details on the process of collecting these publications, please refer to:

Gerasimov, I., Savtchenko, A., Alfred, J., Acker, J., Wei, J., & KC, B. (2024). *Bridging the Gap: Enhancing Prominence and Provenance of NASA Datasets in Research Publications.* Data Science Journal, 23(1). DOI: [10.5334/dsj-2024-001](https://doi.org/10.5334/dsj-2024-001)


For any questions or further information, please contact:

- Armin Mehrabian: [[email protected]](mailto:[email protected])
- Irina Gerasimov: [[email protected]](mailto:[email protected])
- Kendall Gilbert: [[email protected]](mailto:[email protected])