Skip to content

Instantly share code, notes, and snippets.

@gebelo
gebelo / nytmeyer.htm
Last active January 19, 2021 21:08
NYT Meyer Award links
These are the links submitted as part of the New York Times 2020 Philip Meyer Award entry:
@gebelo
gebelo / gist:902815fd76c080a4a668e96a93cb430d
Last active March 26, 2021 00:42
Converting Z-Score to Percentile in Python
def zptile(z_score):
return .5 * (math.erf(z_score / 2 ** .5) + 1)
zptile(0.95)
# excel says: 0.8289438737
0.8289438736915181
via: http://stackoverflow.com/questions/2782284/function-to-convert-a-z-score-into-a-percentage
@gebelo
gebelo / census9020.csv
Created April 6, 2022 02:35
Practice data for Writing With Data
We can't make this file beautiful and searchable because it's too large.
fips,year,name,state,region,division,economic_type_label,rucc_2013,description,pop,white,black,hispanic,asian,pacific_islander,native_am,multiracial,other
"01001","1990","Autauga County","Alabama","South Region","East South Central Division","Nonspecialized","2","Metro - Counties in metro areas of 250,000 to 1 million population ","34222","26997","6806","230","110","8","71","0","0"
"01001","2000","Autauga County","Alabama","South Region","East South Central Division","Nonspecialized","2","Metro - Counties in metro areas of 250,000 to 1 million population ","43671","34823","7428","610","194","12","186","374","44"
"01001","2010","Autauga County","Alabama","South Region","East South Central Division","Nonspecialized","2","Metro - Counties in metro are
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
AGE (Labels),Total,Less than 5 years,From 5 to 9 years,From 10 to 14 years,From 15 to 19 years,From 20 to 24 years,From 25 to 29 years,From 30 to 34 years,From 35 to 39 years,From 40 to 44 years,From 45 to 49 years,From 50 to 54 years,From 55 to 59 years,From 60 to 64 years,From 65 to 69 years,From 70 to 74 years,From 75 to 79 years,75 years or over,From 80 to 84 years,80 years or over,85 years or over,
GEO (Labels),,,,,,,,,,,,,,,,,,,,,,
Belgium,"11,566,041","600,614","656,840","679,196","640,925","675,228","738,479","761,414","748,799","752,686","755,127","787,240","804,603","735,128","632,976","561,609","387,508","1,035,177","315,718","647,669","331,951",
Bulgaria,"6,916,548","314,370","337,290","347,354","314,238","306,421","364,385","474,861","478,532","522,220","528,127","491,725","464,881","468,096","451,579","428,163","288,403","624,306","190,665","335,903","145,238",
Czechia,"10,701,777","567,262","556,957","595,522","490,450","477,910","620,925","718,931","753,310","893,321","882,586","691,083","669,
@gebelo
gebelo / datawrapper1
Created September 4, 2023 14:32
sample data for datawrapper class at GIJC23
Year Births Deaths
2011 3973485 2512442
2012 3936976 2501531
2013 3940576 2608019
2014 3963195 2582448
2015 3992376 2699826
2016 3970959 2703215
2017 3890144 2788163
2018 3835477 2839277
2019 3770397 2847282
sector pct83 pct22
All 20.1 10.1
Public sector 36.7 33.2
Private sector 16.5 6
Public Administration 30.0220943 28.23327597
Education and Health 25.93768821 16.62684799
Transportation and Utilities 46.7624861 16.46967771
Construction 28.04559201 12.62769642
Manufacturing 27.85032333 7.903110381
Arts, Entertainment and Recreation 16.73336115 7.434252747