Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Phan christopherphan

View GitHub Profile
@christopherphan
christopherphan / Senate_representation_by_impeachment_trial_vote.md
Last active Mar 19, 2021
A breakdown of how many people are represented by senators voting for or against conviction in the Feb. 2021 presidential impeachment trial
View Senate_representation_by_impeachment_trial_vote.md

Population represented in the U.S. Senate by by Feb. 2021 impeachment trial vote

In February 2021, the U.S. Senate acquitted a former president after an impeachment trial. To convict would have required 2/3 of senators (67 of the full Senate) to vote guilty; the final vote was 57 votes for guilty and 43 votes for not guilty. This chart illustrates how many U.S. residents are represented by senators who voted for and against impeachment.

Population figures are from 2019.

Copyright and license info

@christopherphan
christopherphan / Senate_representation_by_party.md
Last active Mar 18, 2021
A breakdown of how many people are represented by each party in the U.S. Senate
View Senate_representation_by_party.md

Population represented in the U.S. Senate by party

As of March 2021, there are 100 U.S. Senators (as there has been since the admission of Hawaii in 1959), 50 of whom are Democrats (or independents who caucus with the Democrats), and 50 of whom are Republicans. (Democratic Vice-president Kamala Harris can cast a tie-breaking vote, which gives control of the chamber to the Democrats.) However, the states represented by Democrats are altogether larger in population than those represented by Republicans. This graphic illustrates how.

Population figures are from 2019.

Copyright and license info

View leg_sizes.py
#!/usr/bin/env python3
# leg_sizes.py
# Christopher Phan
# cphan@chrisphan.com
# https://chrisphan.com/
#
# Takes data from the Wikipedia article "List of legislatures by number of
# members", and peforms a linear regression on n = kP^alpha
# where n is the number of members of the lower house of a nation's legislature
View keybase.md

Keybase proof

I hereby claim:

  • I am christopherphan on github.
  • I am christopherphan (https://keybase.io/christopherphan) on keybase.
  • I have a public key ASBX9sPz1e1QSSvW93F6712vQ6wi1GJ5JSjmf3htX-RfSAo

To claim this, I am signing this object:

@christopherphan
christopherphan / ISD_861_school_board_districts_map.ipynb
Last active Jul 24, 2018
Create a map of the districts of members of the ISD 861 (Winona Area Public Schools) school board from MN Geospatial Commons shapefiles
View ISD_861_school_board_districts_map.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@christopherphan
christopherphan / isoweekdate.py
Created Jul 18, 2018
Prints the current date in ISO week date format
View isoweekdate.py
#!/usr/bin/env python3
# isoweekdate.py
# Prints the current date in ISO week date format
#
# (C) 2018 Christopher L. Phan, Ph.D., cphan@chrisphan.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
View Color_cartogram_of_MN_House_Districts.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 10PRINT.tex
%% 10PRINT.tex
%% Copyright 2018 Christopher L. Phan, Ph.D.
%% cphan@chrisphan.com
%%
%% Creates a random maze, inspired by
%% 10 PRINT CHR$(205.5+RND(1)); : GOTO 10,
%% by Nick Montfort, et. al., (MIT Press, 2013)
%%
%% See also:
%% https://blog.chrisphan.com/2018/05/28/10-print-in-tikz/
View ISD_861_school_board_dist_by_prec_2017-11.md
@christopherphan
christopherphan / proportion_test_simulation_study.ipynb
Created Sep 26, 2017
Interactive Python notebook for proportion test simulation study
View proportion_test_simulation_study.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.