-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Calibrate state populations (and under-5s) (#121)
* Add dataset comparisons to docs * Add inequality to book * Add population by state to calibration * Update uprating factors * Update versioning and dataset URLs
- Loading branch information
1 parent
2f0e8cf
commit 786b18e
Showing
12 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
!eitc.csv | ||
!spm_threshold_agi.csv | ||
**/_build | ||
!population_by_state.csv |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- bump: minor | ||
changes: | ||
added: | ||
- Metric comparisons by dataset to the documentation. | ||
- Calibration of state populations. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import argparse | ||
from pathlib import Path | ||
|
||
# This command-line tools enables Plotly charts to show in the HTML files for the Jupyter Book documentation. | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("book_path", help="Path to the Jupyter Book.") | ||
|
||
args = parser.parse_args() | ||
|
||
# Find every HTML file in the Jupyter Book. Then, add a script tag to the start of the <head> tag in each file, with the contents: | ||
# <script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script> | ||
|
||
book_folder = Path(args.book_path) | ||
|
||
for html_file in book_folder.glob("**/*.html"): | ||
with open(html_file, "r") as f: | ||
html = f.read() | ||
|
||
# Add the script tag to the start of the <head> tag. | ||
html = html.replace( | ||
"<head>", | ||
'<head><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>', | ||
) | ||
|
||
with open(html_file, "w") as f: | ||
f.write(html) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
state,population,population_under_5 | ||
CA,38965193.00,2104120.00 | ||
TX,30503301.00,1921708.00 | ||
FL,22610726.00,1130536.00 | ||
NY,19571216.00,1037274.00 | ||
PA,12961683.00,661046.00 | ||
IL,12549689.00,665134.00 | ||
OH,11785935.00,660012.00 | ||
GA,11029227.00,639695.00 | ||
NC,10835491.00,606787.00 | ||
MI,10037261.00,531975.00 | ||
NJ,9290841.00,520287.00 | ||
VA,8715698.00,488079.00 | ||
WA,7812880.00,421896.00 | ||
AZ,7431344.00,393861.00 | ||
TN,7126489.00,413336.00 | ||
MA,7001399.00,343069.00 | ||
IN,6862199.00,404870.00 | ||
MO,6196156.00,353181.00 | ||
MD,6180253.00,352274.00 | ||
WI,5910955.00,313281.00 | ||
CO,5877610.00,311513.00 | ||
MN,5737915.00,327061.00 | ||
SC,5373555.00,290172.00 | ||
AL,5108468.00,291183.00 | ||
LA,4573749.00,278999.00 | ||
KY,4526154.00,262517.00 | ||
OR,4233358.00,203201.00 | ||
OK,4053824.00,243229.00 | ||
CT,3617176.00,180859.00 | ||
UT,3417734.00,232406.00 | ||
IA,3207004.00,186006.00 | ||
PR,3205691.00,96171.00 | ||
NV,3194176.00,172486.00 | ||
AR,3067732.00,180996.00 | ||
KS,2940546.00,176433.00 | ||
MS,2939690.00,173442.00 | ||
NM,2114371.00,107833.00 | ||
NE,1978379.00,124638.00 | ||
ID,1964726.00,113954.00 | ||
WV,1770071.00,86733.00 | ||
HI,1435138.00,77497.00 | ||
NH,1402054.00,63092.00 | ||
ME,1395722.00,61412.00 | ||
MT,1132812.00,57773.00 | ||
RI,1095962.00,52606.00 | ||
DE,1031890.00,54690.00 | ||
SD,919318.00,57917.00 | ||
ND,783926.00,49387.00 | ||
AK,733406.00,46205.00 | ||
DC,678972.00,38701.00 | ||
VT,647464.00,27193.00 | ||
WY,584057.00,30955.00 |
This file contains 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
This file contains 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
This file contains 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