Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
English
DOI:
Libraries:
Datasets
pandas
License:
kdutia commited on
Commit
c84a10b
·
1 Parent(s): a2018aa

add field descriptions and loading instructions to readme

Browse files
Files changed (1) hide show
  1. README.md +33 -9
README.md CHANGED
@@ -22,13 +22,24 @@ A research tool you can use to view this data and the results of some classifier
22
 
23
  **[View our methodology](https://labs.climatepolicyradar.org/global-stocktake/)**.
24
 
 
 
 
 
 
 
 
 
 
 
 
25
  ## Citing this data
26
 
27
  ```
28
  @misc{Climate Policy Radar, title={Dataset for the first Global Stocktake}, url={http://gst1.org/}, author={Climate Policy Radar}}
29
  ```
30
 
31
- ## Fields
32
 
33
  - `author`: document author (str)
34
  - `author_is_party`: whether the author is a Party (national government) or not (bool)
@@ -42,19 +53,16 @@ A research tool you can use to view this data and the results of some classifier
42
  - `document_source_url`: URL for document
43
  - `document_variant`: used to identify translations. In `[nan, 'Translation', 'Original Language']`
44
  - `has_valid_text`: our heuristic about whether text is valid or not in the document based on the parser
45
- - `language`: **FIXME**
46
- - `languages`: **FIXME**
47
- - `link`: **FIXME**
48
  - `page_number`: page number of text block (0-indexed)
49
  - `text`: text in text block
50
  - `text_block_id`: identifier for a text block which is unique per document
51
  - `translated`: whether we have machine-translated the document to English. Where we have translated documents, both the original and translated exist.
52
- - `type`: **TODO**
53
- - `type_confidence`: confidence from our parser that the text block is of the labelled type
54
- - `types`: document types
55
  - `version`: in `['MAIN', 'ANNEX', 'SUMMARY', 'AMENDMENT', 'SUPPORTING DOCUMENTATION', 'PREVIOUS VERSION']`
56
 
57
- -
58
  ## Known issues
59
 
60
  * Author names are sometimes corrupted
@@ -62,4 +70,20 @@ A research tool you can use to view this data and the results of some classifier
62
 
63
  ## Usage in Python
64
 
65
- TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  **[View our methodology](https://labs.climatepolicyradar.org/global-stocktake/)**.
24
 
25
+ **Contents**
26
+
27
+ - [Citing this data](#citing-this-data)
28
+ - [Fields](#fields)
29
+ - [Known issues](#known-issues)
30
+ - [Usage in Python](#usage-in-python)
31
+ - [Loading metadata CSV](#loading-metadata-csv)
32
+ - [Loading text block data](#loading-text-block-data)
33
+
34
+ ---
35
+
36
  ## Citing this data
37
 
38
  ```
39
  @misc{Climate Policy Radar, title={Dataset for the first Global Stocktake}, url={http://gst1.org/}, author={Climate Policy Radar}}
40
  ```
41
 
42
+ ## Field descriptions
43
 
44
  - `author`: document author (str)
45
  - `author_is_party`: whether the author is a Party (national government) or not (bool)
 
53
  - `document_source_url`: URL for document
54
  - `document_variant`: used to identify translations. In `[nan, 'Translation', 'Original Language']`
55
  - `has_valid_text`: our heuristic about whether text is valid or not in the document based on the parser
56
+ - `language`: language of the text block. Either `en` or `nan` - see known issues
 
 
57
  - `page_number`: page number of text block (0-indexed)
58
  - `text`: text in text block
59
  - `text_block_id`: identifier for a text block which is unique per document
60
  - `translated`: whether we have machine-translated the document to English. Where we have translated documents, both the original and translated exist.
61
+ - `type`: type of text block. In `["Text", "Title", "List", "Table", "Figure","Ambiguous"]`
62
+ - `type_confidence`: confidence from that the text block is of the labelled type
63
+ - `types`: list of document types e.g. Nationally Determined Contribution, National Adaptation Plan (list[str])
64
  - `version`: in `['MAIN', 'ANNEX', 'SUMMARY', 'AMENDMENT', 'SUPPORTING DOCUMENTATION', 'PREVIOUS VERSION']`
65
 
 
66
  ## Known issues
67
 
68
  * Author names are sometimes corrupted
 
70
 
71
  ## Usage in Python
72
 
73
+ ### Loading metadata CSV
74
+
75
+ ``` py
76
+ metadata = pd.read_csv("metadata.csv")
77
+ ```
78
+
79
+ ### Loading text block data
80
+
81
+ **The parquet file is recommended** as it stores the data much more (10x) more efficiently, meaning lower load on your system's memory requirements.
82
+
83
+ ``` py
84
+ # Reading from parquet
85
+ text_blocks = pd.read_parquet("full_text.parquet")
86
+
87
+ # Reading from jsonl
88
+ text_blocks = pd.read_json("full_text.jsonl", lines=True)
89
+ ```