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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UN Security Council Voting Data with Draft Resolutions
|
| 2 |
+
|
| 3 |
+
## Overview
|
| 4 |
+
|
| 5 |
+
This dataset combines UN Security Council voting records with the full text of draft resolutions extracted from PDF documents. Each record represents a unique Security Council vote, including detailed member state votes, voting summaries, and the machine-readable text of the draft resolution document.
|
| 6 |
+
|
| 7 |
+
**File:** `sc_voting_with_drafts.jsonl`
|
| 8 |
+
**Format:** JSON Lines (one JSON object per line)
|
| 9 |
+
**Size:** 11 MB
|
| 10 |
+
**Records:** 2,787 unique Security Council votes
|
| 11 |
+
**Time Period:** 1946-2025 (79 years)
|
| 12 |
+
|
| 13 |
+
## Data Sources
|
| 14 |
+
|
| 15 |
+
1. **Voting Data:** `2025_7_21_sc_voting.csv`
|
| 16 |
+
- 40,929 rows (15 member states × 2,787 votes)
|
| 17 |
+
- Source: UN Digital Library voting records
|
| 18 |
+
|
| 19 |
+
2. **Draft PDFs:** `pdf_draft/` directory
|
| 20 |
+
- 488 draft resolution PDFs
|
| 21 |
+
- All PDFs contain machine-readable text (99.6% extraction success rate)
|
| 22 |
+
- 5.68 million characters extracted
|
| 23 |
+
- Average: 11,640 characters per draft
|
| 24 |
+
|
| 25 |
+
## Dataset Statistics
|
| 26 |
+
|
| 27 |
+
### Coverage
|
| 28 |
+
- **Total votes:** 2,787
|
| 29 |
+
- **With draft PDFs:** 488 (17.5%)
|
| 30 |
+
- **Without draft PDFs:** 2,299 (82.5%)
|
| 31 |
+
- **PDF extraction errors:** 0
|
| 32 |
+
|
| 33 |
+
### Temporal Distribution
|
| 34 |
+
| Decade | Vote Records | Draft PDFs |
|
| 35 |
+
|--------|--------------|------------|
|
| 36 |
+
| 1940s | 78 | 0 |
|
| 37 |
+
| 1950s | 54 | 0 |
|
| 38 |
+
| 1960s | 143 | 1 |
|
| 39 |
+
| 1970s | 186 | 5 |
|
| 40 |
+
| 1980s | 185 | 1 |
|
| 41 |
+
| 1990s | 638 | 73 |
|
| 42 |
+
| 2000s | 623 | 157 |
|
| 43 |
+
| 2010s | 596 | 180 |
|
| 44 |
+
| 2020s | 284 | 71 |
|
| 45 |
+
|
| 46 |
+
### Top Years by Draft Availability
|
| 47 |
+
1. **2002:** 26 drafts
|
| 48 |
+
2. **1998:** 25 drafts
|
| 49 |
+
3. **1999:** 24 drafts
|
| 50 |
+
4. **2016:** 22 drafts
|
| 51 |
+
5. **2006:** 21 drafts
|
| 52 |
+
|
| 53 |
+
## Data Structure
|
| 54 |
+
|
| 55 |
+
Each line is a JSON object with the following structure:
|
| 56 |
+
|
| 57 |
+
```json
|
| 58 |
+
{
|
| 59 |
+
"undl_id": "705442",
|
| 60 |
+
"date": "2011-06-13",
|
| 61 |
+
"resolution": "S/RES/1986(2011)",
|
| 62 |
+
"draft": "S/2011/355",
|
| 63 |
+
"meeting": "S/PV.6554",
|
| 64 |
+
"description": "Security Council resolution 1986 (2011)...",
|
| 65 |
+
"agenda": "The situation in Cyprus.",
|
| 66 |
+
"subjects": "CYPRUS QUESTION",
|
| 67 |
+
"vote_note": "",
|
| 68 |
+
"modality": "Vote",
|
| 69 |
+
"undl_link": "https://digitallibrary.un.org/record/705442",
|
| 70 |
+
|
| 71 |
+
"vote_summary": {
|
| 72 |
+
"total_yes": 15,
|
| 73 |
+
"total_no": 0,
|
| 74 |
+
"total_abstentions": 0,
|
| 75 |
+
"total_non_voting": 0,
|
| 76 |
+
"total_ms": 15
|
| 77 |
+
},
|
| 78 |
+
|
| 79 |
+
"member_state_votes": [
|
| 80 |
+
{
|
| 81 |
+
"ms_code": "CHN",
|
| 82 |
+
"ms_name": "CHINA",
|
| 83 |
+
"permanent_member": true,
|
| 84 |
+
"vote": "Y"
|
| 85 |
+
},
|
| 86 |
+
...
|
| 87 |
+
],
|
| 88 |
+
|
| 89 |
+
"draft_pdf": {
|
| 90 |
+
"has_pdf": true,
|
| 91 |
+
"filename": "draft_S_2011_355.pdf",
|
| 92 |
+
"text": "United Nations S/2011/355...",
|
| 93 |
+
"char_count": 9740,
|
| 94 |
+
"page_count": 4
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## Field Descriptions
|
| 100 |
+
|
| 101 |
+
### Core Metadata
|
| 102 |
+
- **undl_id** (string): Unique identifier from UN Digital Library
|
| 103 |
+
- **date** (string): Vote date in YYYY-MM-DD format
|
| 104 |
+
- **resolution** (string): Resolution number (e.g., "S/RES/1986(2011)")
|
| 105 |
+
- **draft** (string): Draft document number (e.g., "S/2011/355")
|
| 106 |
+
- **meeting** (string): Meeting record (e.g., "S/PV.6554")
|
| 107 |
+
- **description** (string): Full description of the resolution
|
| 108 |
+
- **agenda** (string): Agenda item description
|
| 109 |
+
- **subjects** (string): Subject classification
|
| 110 |
+
- **vote_note** (string): Additional voting notes
|
| 111 |
+
- **modality** (string): Voting type (typically "Vote")
|
| 112 |
+
- **undl_link** (string): URL to UN Digital Library record
|
| 113 |
+
|
| 114 |
+
### Vote Summary
|
| 115 |
+
- **total_yes** (integer): Number of Yes votes
|
| 116 |
+
- **total_no** (integer): Number of No votes
|
| 117 |
+
- **total_abstentions** (integer): Number of abstentions
|
| 118 |
+
- **total_non_voting** (integer): Number of non-voting members
|
| 119 |
+
- **total_ms** (integer): Total member states (typically 15)
|
| 120 |
+
|
| 121 |
+
### Member State Votes
|
| 122 |
+
Array of objects, one per Security Council member:
|
| 123 |
+
- **ms_code** (string): ISO country code (e.g., "USA", "CHN")
|
| 124 |
+
- **ms_name** (string): Country name (e.g., "UNITED STATES")
|
| 125 |
+
- **permanent_member** (boolean): Is this a permanent member (P5)?
|
| 126 |
+
- **vote** (string): Vote cast - "Y" (Yes), "N" (No), "A" (Abstain)
|
| 127 |
+
|
| 128 |
+
### Draft PDF Data
|
| 129 |
+
- **has_pdf** (boolean): Whether draft PDF exists and was extracted
|
| 130 |
+
- **filename** (string|null): PDF filename (e.g., "draft_S_2011_355.pdf")
|
| 131 |
+
- **text** (string|null): Full extracted text from the PDF
|
| 132 |
+
- **char_count** (integer): Number of characters in extracted text
|
| 133 |
+
- **page_count** (integer): Number of pages in the PDF
|
| 134 |
+
- **extraction_error** (string|null): Error message if extraction failed
|
| 135 |
+
|
| 136 |
+
## Usage Examples
|
| 137 |
+
|
| 138 |
+
### Python
|
| 139 |
+
|
| 140 |
+
```python
|
| 141 |
+
import json
|
| 142 |
+
|
| 143 |
+
# Load all records
|
| 144 |
+
records = []
|
| 145 |
+
with open('sc_voting_with_drafts.jsonl', 'r', encoding='utf-8') as f:
|
| 146 |
+
for line in f:
|
| 147 |
+
records.append(json.loads(line))
|
| 148 |
+
|
| 149 |
+
print(f"Loaded {len(records)} records")
|
| 150 |
+
|
| 151 |
+
# Find records with draft text
|
| 152 |
+
with_drafts = [r for r in records if r['draft_pdf']['has_pdf']]
|
| 153 |
+
print(f"Records with drafts: {len(with_drafts)}")
|
| 154 |
+
|
| 155 |
+
# Analyze voting patterns
|
| 156 |
+
unanimous = [r for r in records
|
| 157 |
+
if r['vote_summary']['total_yes'] == r['vote_summary']['total_ms']]
|
| 158 |
+
print(f"Unanimous votes: {len(unanimous)}")
|
| 159 |
+
|
| 160 |
+
# Search draft text
|
| 161 |
+
keyword = "peacekeeping"
|
| 162 |
+
matching = [r for r in with_drafts
|
| 163 |
+
if r['draft_pdf']['text'] and keyword.lower() in r['draft_pdf']['text'].lower()]
|
| 164 |
+
print(f"Drafts mentioning '{keyword}': {len(matching)}")
|
| 165 |
+
```
|
| 166 |
+
|
| 167 |
+
### Command Line (jq)
|
| 168 |
+
|
| 169 |
+
```bash
|
| 170 |
+
# Count records by year
|
| 171 |
+
cat sc_voting_with_drafts.jsonl | jq -r '.date[:4]' | sort | uniq -c
|
| 172 |
+
|
| 173 |
+
# Find all vetoed resolutions
|
| 174 |
+
cat sc_voting_with_drafts.jsonl | jq 'select(.vote_summary.total_no > 0)'
|
| 175 |
+
|
| 176 |
+
# Extract all China votes
|
| 177 |
+
cat sc_voting_with_drafts.jsonl | jq '.member_state_votes[] | select(.ms_code == "CHN")'
|
| 178 |
+
|
| 179 |
+
# Get records with draft text over 50KB
|
| 180 |
+
cat sc_voting_with_drafts.jsonl | jq 'select(.draft_pdf.char_count > 50000)'
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
### Analysis Ideas
|
| 184 |
+
|
| 185 |
+
1. **Voting Pattern Analysis**
|
| 186 |
+
- P5 veto frequency and patterns
|
| 187 |
+
- Voting bloc identification
|
| 188 |
+
- Temporal trends in voting behavior
|
| 189 |
+
|
| 190 |
+
2. **Text Analysis**
|
| 191 |
+
- Topic modeling on draft texts
|
| 192 |
+
- Resolution complexity (by text length)
|
| 193 |
+
- Language patterns in successful vs. failed resolutions
|
| 194 |
+
|
| 195 |
+
3. **Correlation Studies**
|
| 196 |
+
- Resolution length vs. voting outcome
|
| 197 |
+
- Subject matter vs. unanimity
|
| 198 |
+
- Temporal trends in resolution topics
|
| 199 |
+
|
| 200 |
+
## Data Quality Notes
|
| 201 |
+
|
| 202 |
+
### PDF Text Extraction
|
| 203 |
+
- **Success Rate:** 100% (488/488 PDFs successfully extracted)
|
| 204 |
+
- **Non-Readable PDFs:** 2 identified in initial scan (not in this dataset)
|
| 205 |
+
- **Extraction Method:** PyPDF2 library
|
| 206 |
+
- **Text Quality:** Machine-readable, preserves line breaks and structure
|
| 207 |
+
|
| 208 |
+
### Missing Data
|
| 209 |
+
- **Draft PDFs:** 82.5% of votes lack draft PDFs
|
| 210 |
+
- Primarily older records (pre-1990s)
|
| 211 |
+
- Some recent records also missing
|
| 212 |
+
- **Empty Fields:** Some records have empty `agenda`, `subjects`, or `vote_note` fields
|
| 213 |
+
|
| 214 |
+
### Known Limitations
|
| 215 |
+
1. Older resolutions (1940s-1980s) have limited draft PDF availability
|
| 216 |
+
2. Some extracted text may contain formatting artifacts
|
| 217 |
+
3. Member state names use historical designations (e.g., "USSR", "ZAIRE")
|
| 218 |
+
4. Permanent member status reflects historical composition
|
| 219 |
+
|
| 220 |
+
## File Generation
|
| 221 |
+
|
| 222 |
+
**Script:** `create_voting_jsonl.py`
|
| 223 |
+
**Generated:** 2025-10-31
|
| 224 |
+
**Processing Time:** ~5 minutes for 2,787 records
|
| 225 |
+
|
| 226 |
+
### Generation Process
|
| 227 |
+
1. Parse CSV voting data (40,929 rows)
|
| 228 |
+
2. Group by `undl_id` (2,787 unique votes)
|
| 229 |
+
3. For each vote:
|
| 230 |
+
- Aggregate member state votes
|
| 231 |
+
- Calculate vote summary
|
| 232 |
+
- Extract draft PDF text if available
|
| 233 |
+
4. Write to JSONL format
|
| 234 |
+
|
| 235 |
+
## License & Attribution
|
| 236 |
+
|
| 237 |
+
**Data Source:** United Nations Digital Library
|
| 238 |
+
**Website:** https://digitallibrary.un.org/
|
| 239 |
+
|
| 240 |
+
Please cite the UN Digital Library when using this dataset. This compilation is provided for research and educational purposes.
|
| 241 |
+
|
| 242 |
+
## Contact & Issues
|
| 243 |
+
|
| 244 |
+
For questions or issues with this dataset, please refer to the UN Digital Library documentation or the data processing scripts included in this repository.
|
| 245 |
+
|
| 246 |
+
---
|
| 247 |
+
|
| 248 |
+
**Last Updated:** October 31, 2025
|
| 249 |
+
**Version:** 1.0
|