Skip to content

Instantly share code, notes, and snippets.

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
@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
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 / 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
@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 / 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 / top40health
Created April 19, 2020 19:20
Breakdown of Health care occupations by gender, race, ethnicity and nativity, via our New York Times story https://www.nytimes.com/2020/04/18/us/coronavirus-women-essential-workers.html
Occupation,workers,Female,NonWhite,Black,Hispanic,Asian,ForeignBorn-Citizen,ForeignBorn-NonCitizen
Registered nurses,"3,171,358",89%,29%,11%,7%,9%,12%,3%
Nursing assistants,"1,369,106",89%,57%,34%,14%,5%,14%,9%
Physicians,"882,804",38%,35%,5%,6%,21%,21%,7%
Licensed practical and licensed vocational nurses,"863,026",87%,45%,26%,12%,5%,10%,4%
Personal care aides,"720,868",84%,56%,27%,18%,8%,12%,11%
Medical and health services managers,"631,539",72%,30%,12%,10%,5%,9%,3%
Medical assistants,"497,345",92%,49%,13%,29%,4%,10%,5%
"Secretaries and administrative assistants, except legal, medical, and executive","470,105",96%,30%,11%,13%,4%,7%,3%
Receptionists and information clerks,"459,777",95%,39%,11%,21%,4%,6%,4%
@gebelo
gebelo / gist:94dbc276882846175d74b0b1360d53d1
Created April 18, 2020 15:14
These are industry and occupation codes used in a New York Times story about gender dynamics of the coronavirus pandemic "essential" workforce, https://www.nytimes.com/2020/04/18/us/coronavirus-women-essential-workers.html
"isHealth=ifelse((IND>=7970 & IND<=8290) | (OCC>=3000 & OCC<=3550),1,0),
isHealth=ifelse(OCC==3250 |OCC==3424, 0, isHealth)," "Offices of physicians
Offices of dentists
Offices of chiropractors
Offices of optometrists
Offices of other health practitioners
Outpatient care centers
Home health care services
Other health care services
General medical and surgical hospitals, and specialty (except psychiatric and substance abuse) hospitals
@gebelo
gebelo / nytcounties.csv
Created October 29, 2019 16:41
this is population distribution by county based on our density estimates... pop is tract level aggregated, from 2013-2017 ACS
statename countyfips countyname urban inner outer rural total urban_pct isuburb_pct osuburb_pct
al01 01001 Autauga County 0 9965 18709 26362 55036 0 0.18106330401918744 0.3399411294425467
al01 01003 Baldwin County 0 0 149067 54293 203360 0 0 0.7330202596380803
al01 01005 Barbour County 0 0 6045 20156 26201 0 0 0.23071638487080645
al01 01007 Bibb County 0 0 0 22580 22580 0 0 0
al01 01009 Blount County 0 0 0 57667 57667 0 0 0
al01 01011 Bullock County 0 0 0 10478 10478 0 0 0
al01 01013 Butler County 0 0 4368 15758 20126 0 0 0.21703269402762596
al01 01015 Calhoun County 1197 3854 82703 27773 115527 0.010361214261601184 0.03336016688739429 0.7158759424203865
al01 01017 Chambers County 0 0 12473 21422 33895 0 0 0.36798937896444905
We can't make this file beautiful and searchable because it's too large.
geoid,pop_density,paved_density,tract_type
01001020100,3,3,3) OUTER RING
01001020200,5,5,3) OUTER RING
01001020300,5,4,3) OUTER RING
01001020400,5,4,3) OUTER RING
01001020500,6,6,2) INNER RING
01001020600,4,4,3) OUTER RING
01001020700,3,3,3) OUTER RING
01001020801,2,2,4) RURAL
01001020802,2,2,4) RURAL