--- language: - en tags: - climate - policy - legal size_categories: - 1M TODO ## Field descriptions - `author`: document author (str) - `author_is_party`: whether the author is a Party (national government) or not (bool) - `block_index`: the index of a text block in a document. Starts from 0 (int) - `coords`: coordinates of the text block on the page - `date`: publication date of the document - `document_content_type`: file type. We have only parsed text from PDFs. - `document_id`: unique identifier for a document - `document_family_id`: see *data model* section above - `document_family_slug`: see *data model* section above - `document_md5_sum`: md5sum of the document's content - `document_name`: document title - `document_source_url`: URL for document - `document_variant`: used to identify translations. In `[nan, 'Translation', 'Original Language']` - `has_valid_text`: our heuristic about whether text is valid or not in the document based on the parser - `language`: language of the text block. Either `en` or `nan` - see known issues - `page_number`: page number of text block (0-indexed) - `text`: text in text block - `text_block_id`: identifier for a text block which is unique per document - `translated`: whether we have machine-translated the document to English. Where we have translated documents, both the original and translated exist. - `type`: type of text block. In `["Text", "Title", "List", "Table", "Figure","Ambiguous"]` - `type_confidence`: confidence from that the text block is of the labelled type - `types`: list of document types e.g. Nationally Determined Contribution, National Adaptation Plan (list[str]) - `version`: in `['MAIN', 'ANNEX', 'SUMMARY', 'AMENDMENT', 'SUPPORTING DOCUMENTATION', 'PREVIOUS VERSION']` ## Known issues * Author names are sometimes corrupted * Text block languages are sometimes missing or marked as `nan` ## Usage in Python The easiest way to access this data via the terminal is to run `git clone `. ### Loading metadata CSV ``` py metadata = pd.read_csv("metadata.csv") ``` ### Loading text block data Once loaded into a Huggingface Dataset or Pandas DataFrame object the parquet file can be converted to other formats, e.g. Excel, CSV or JSON. ``` py # Using huggingface (easiest) dataset = load_dataset("ClimatePolicyRadar/global-stocktake-documents") # Using pandas text_blocks = pd.read_parquet("full_text.parquet") ```