This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Extract coal electricity generation (TWh) by year from Ember data. | |
| China coal can use monthly or yearly data; World uses yearly. | |
| """ | |
| import argparse | |
| import pandas as pd | |
| from pathlib import Path | |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| start_date,end_date,speaker,role,horizon,claim,source,source_url | |
| 1992-10-01,1999-12-31,Shimon Peres,Israeli FM,"by 1999","Iran ""set to have nuclear warheads by 1999"" (as reported in later timelines).",The Christian Science Monitor,https://www.csmonitor.com/World/Middle-East/2011/1108/Imminent-Iran-nuclear-threat-A-timeline-of-warnings-since-1979/Israel-paints-Iran-as-Enemy-No.-1-1992 | |
| 1992-01-01,1997-12-31,Benjamin Netanyahu,Israeli MK,"within 3–5 years",Iran becoming autonomous in ability to develop/produce a nuclear bomb.,Al Jazeera,https://www.aljazeera.com/gallery/2025/6/18/the-history-of-netanyahus-rhetoric-on-irans-nuclear-ambitions | |
| 1993-02-01,1999-12-31,Benjamin Netanyahu,Israeli MK,"by 1999","In a Feb 1993 column (Yedioth Ahronoth) Netanyahu wrote that Iran would develop its first nuclear bomb by 1999.",Ynet,https://www.ynetnews.com/article/4633272 | |
| 1995-01-05,2000-01-05,Senior US & Israeli officials (quoted),quoted,"less than five years","""Less than five years away"" from having a nuclear bomb (quot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| url = "https://sdmx.oecd.org/public/rest/data/OECD.ELS.HD,DSD_HEALTH_LVNG@DF_HEALTH_LVNG_AC,1.0/.A.....?dimensionAtObservation=AllDimensions&format=csvfilewithlabels&startPeriod=1960" | |
| df = pd.read_csv( | |
| url, | |
| storage_options={ | |
| "User-Agent": "Mozilla/5.0" | |
| } | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| State | Average Wedding Cost | Average Marriage Length | |
|---|---|---|---|
| Alabama | 34000 | 20.3 | |
| Arizona | 32000 | 20.6 | |
| Arkansas | 25000 | 19.4 | |
| California | 41000 | 19.9 | |
| Colorado | 34000 | 17.9 | |
| Connecticut | 44000 | 21.4 | |
| Delaware | 39000 | 21.9 | |
| DC | 42000 | 10.8 | |
| Florida | 34000 | 20.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| decade | global_stations | tv_power_escaping_mw | radio_power_escaping_mw | seti_detectable_mw | total_anthropogenic_rf_mw | |
|---|---|---|---|---|---|---|
| 1920s | 5 | 0.0005 | 0.005 | 0.0055 | 0.01 | |
| 1930s | 15 | 0.003 | 0.25 | 0.253 | 0.05 | |
| 1940s | 55 | 0.2 | 0.5 | 0.7 | 1 | |
| 1950s | 550 | 5 | 1 | 6 | 5 | |
| 1960s | 3000 | 30 | 2 | 32 | 40 | |
| 1970s | 7500 | 75 | 3 | 78 | 100 | |
| 1980s | 12500 | 125 | 4 | 129 | 165 | |
| 1990s | 17500 | 175 | 5 | 180 | 260 | |
| 2000s | 22500 | 125 | 6 | 131 | 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| from io import StringIO | |
| import numpy as np | |
| import pandas as pd | |
| import matplotlib | |
| matplotlib.use("Agg") | |
| import matplotlib.pyplot as plt | |
| from matplotlib.colors import LinearSegmentedColormap | |
| DATA = """pasta\tbox time\tactual al dente\tdifference |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| install.packages("readr", quiet = TRUE) | |
| library(readr) | |
| data https://mqscores.wustl.edu/measures.php | |
| justices_df <- read_csv("justices.csv") | |
| library(dplyr) | |
| library(ggplot2) | |
| # 1. Sitting Justices as of 2026 | |
| keep <- c("CThomas", "SAAlito", "JGRoberts", "EKagan", "SSotomayor", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| from io import StringIO | |
| import matplotlib.pyplot as plt | |
| import matplotlib.dates as mdates | |
| csv_data = """Product,Start Date,End Date,Notes,Color | |
| Bread (Wheat Flour),2024-01-01,2024-12-31,Grain can be stored year-round,#C2A14D | |
| Bacon (Cured Pork),2024-01-01,2024-12-31,Pigs slaughtered in winter and meat cured for year-round storage,#C45A4A | |
| Turkey,2024-11-01,2025-01-31,Traditional seasonal consumption around holidays,#E8D2C5 | |
| Lettuce,2024-05-15,2024-09-30,Cool-season crop; short shelf life before modern cooling,#4CAF50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #get all ember energy data | |
| import pandas as pd | |
| df = pd.read_csv("https://storage.googleapis.com/emb-prod-bkt-publicdata/public-downloads/monthly_full_release_long_format.csv",low_memory=False) | |
| #get coal usage | |
| import pandas as pd | |
| df_china_coal_twh = df[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Phase of Flight,Number of Accidents | |
| LANDING,788 | |
| TAKE OFF,128 | |
| APPROACH,124 | |
| INITIAL CLIMB,92 | |
| CRUISE,70 | |
| TAXI IN,49 | |
| TAXI OUT,45 | |
| ENGINE START OR DEPART,44 | |
| GO AROUND,29 |
NewerOlder