Skip to content

Commit f781766

Browse files
authored
Merge pull request #12 from rickecon/newjan
Merging
2 parents 6ce9fa9 + 1e7c5eb commit f781766

21 files changed

+337
-173
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88

9+
## [0.0.9] - 2025-01-21 11:30:00
10+
11+
### Added
12+
13+
- Update the API for functions.
14+
915
## [0.0.8] - 2024-11-02 04:30:00
1016

1117
### Added
@@ -75,6 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7581
- This is the first release of the usempl-plots package.
7682

7783

84+
[0.0.9]: https://github.com/OpenSourceEcon/usempl-plots/compare/v0.0.8...v0.0.9
7885
[0.0.8]: https://github.com/OpenSourceEcon/usempl-plots/compare/v0.0.7...v0.0.8
7986
[0.0.7]: https://github.com/OpenSourceEcon/usempl-plots/compare/v0.0.6...v0.0.7
8087
[0.0.6]: https://github.com/OpenSourceEcon/usempl-plots/compare/v0.0.5...v0.0.6

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ The code in this repository makes up a package `usempl-plots` that can create mu
1313

1414
The code in this part of the repository allows the user to create a normalized peak plot of U.S. nonfarm payroll employment (PAYEMS, seasonally adjusted) over the last 15 recessions, from the Great Depression (Aug. 1929 to Mar. 1933) to the most recent COVID-19 recession (Feb. 2020 to Apr. 2020). The dynamic version of this plot, which is updated regularly, is available to manipulate and explore at [https://www.oselab.org/gallery/usempl_npp](https://www.oselab.org/gallery/usempl_npp). The core maintainer of this repository is [Richard Evans](https://sites.google.com/site/rickecon/) ([@RickEcon](https://github.com/rickecon)).
1515

16-
A normalized peak plot takes the maximum level of U.S. payroll employment at the beginning of a recession (within two months of the NBER declared beginning month) and normalizes the entire series so that the value at that peak equals 1.0. As such, the normalized time series shows the percent change from that peak. This is an intuitive way to compare the progression of nonfarm employment across recessions. The following figure is a screen shot of the normalized peak plot of the PAYEMS series from data downloaded on November 2, 2024 (most recent employment data is October 2022).
16+
A normalized peak plot takes the maximum level of U.S. payroll employment at the beginning of a recession (within two months of the NBER declared beginning month) and normalizes the entire series so that the value at that peak equals 1.0. As such, the normalized time series shows the percent change from that peak. This is an intuitive way to compare the progression of nonfarm employment across recessions. The following figure is a screen shot of the normalized peak plot of the PAYEMS series from data downloaded on January 15, 2025 (most recent employment data is December 2024).
1717

18-
The monthly PAYEMS data series begins in January 1939. The U.S. Bureau of Labor Statistics published an annual survey of U.S. nonfarm employment which provided an annual average nonfarm payroll employment (not seasonally adjusted) for the years 1919-1938. I set the date values for annual average data to July 1 of that year. These data are taken from Table 1 on page 1 of the Bureau of Labor Statistics' "[Employment, Hours, and Earnings, United States, 1909-90, Volume I](https://fraser.stlouisfed.org/title/employment-earnings-united-states-189/employment-hours-earnings-united-states-1909-90-5435/content/pdf/emp_bmark_1909_1990_v1)," Bulletin of the United States Bureau of Labor Statistics, No. 2370 (Mar. 1991). In order to have monthly data, I imputed the missing months as a cubic spline that connected the annual data from July 1919 to July 1938 to the first two months of 1939 (January and February 1939). These annual data are stored as a .csv file in this repository ([`usempl_npp/data/usempl_anual_1919-1938.csv`](usempl_npp/data/usempl_anual_1919-1938.csv)). The imputation takes place in the [`usempl_npp_bokeh.py`](usempl_plots/usempl_npp_bokeh.py) file, and the final PAYEMS monthly data series from 1919-07 to 2024-10 with the imputed months is [`usempl_npp/data/usempl_2024-10-01.csv`](usempl_plots/data/usempl_2024-10-01.csv).
18+
The monthly PAYEMS data series begins in January 1939. The U.S. Bureau of Labor Statistics published an annual survey of U.S. nonfarm employment which provided an annual average nonfarm payroll employment (not seasonally adjusted) for the years 1919-1938. I set the date values for annual average data to July 1 of that year. These data are taken from Table 1 on page 1 of the Bureau of Labor Statistics' "[Employment, Hours, and Earnings, United States, 1909-90, Volume I](https://fraser.stlouisfed.org/title/employment-earnings-united-states-189/employment-hours-earnings-united-states-1909-90-5435/content/pdf/emp_bmark_1909_1990_v1)," Bulletin of the United States Bureau of Labor Statistics, No. 2370 (Mar. 1991). In order to have monthly data, I imputed the missing months as a cubic spline that connected the annual data from July 1919 to July 1938 to the first two months of 1939 (January and February 1939). These annual data are stored as a .csv file in this repository ([`usempl_npp/data/usempl_anual_1919-1938.csv`](usempl_npp/data/usempl_anual_1919-1938.csv)). The imputation takes place in the [`usempl_npp_bokeh.py`](usempl_plots/usempl_npp_bokeh.py) file, and the final PAYEMS monthly data series from 1919-07 to 2024-12 with the imputed months is [`usempl_npp/data/usempl_2024-12-01.csv`](usempl_plots/data/usempl_2024-12-01.csv).
1919

2020
![](readme_images/usempl_npp_full.png)
2121

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="usempl-plots",
8-
version="0.0.8",
8+
version="0.0.9",
99
author="Richard W. Evans",
1010
license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
1111
description="Package for creating plots of US employment and unemployment",

usempl_plots/data/usempl_2024-10-01.csv renamed to usempl_plots/data/usempl_2024-12-01.csv

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,5 +1261,7 @@ Date,PAYEMS,BLS_annual,diff_monthly,diff_yoy,Source
12611261
2024-06-01,158548000.0,,118000.0,2521000.0,BLS monthly series
12621262
2024-07-01,158692000.0,,144000.0,2481000.0,BLS monthly series
12631263
2024-08-01,158770000.0,,78000.0,2349000.0,BLS monthly series
1264-
2024-09-01,158993000.0,,223000.0,2326000.0,BLS monthly series
1265-
2024-10-01,159005000.0,,12000.0,2173000.0,BLS monthly series
1264+
2024-09-01,159025000.0,,255000.0,2358000.0,BLS monthly series
1265+
2024-10-01,159068000.0,,43000.0,2236000.0,BLS monthly series
1266+
2024-11-01,159280000.0,,212000.0,2266000.0,BLS monthly series
1267+
2024-12-01,159536000.0,,256000.0,2232000.0,BLS monthly series

usempl_plots/data/usempl_pk_2024-10-01.csv renamed to usempl_plots/data/usempl_pk_2024-12-01.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ mths_frm_peak,Date0,PAYEMS0,usempl_dv_pk0,Date1,PAYEMS1,usempl_dv_pk1,Date2,PAYE
102102
52,1933-11-01,24410.398446709125,0.7792873977368512,1941-11-01,38024.0,1.2261455612524588,1949-06-01,43739.0,1.043964961691768,1953-01-01,50144.0,1.1070782002031174,1957-11-01,52558.0,1.0400110812094348,1961-12-01,54872.0,1.0328263815690408,1964-08-01,58619.0,1.0694360826811158,1974-07-01,78636.0,1.1005584246546585,1978-11-01,88391.0,1.124052596775014,1984-07-01,94789.0,1.0417060465525199,1985-11-01,98443.0,1.074693507712798,1994-10-01,115458.0,1.0509844616182855,2005-06-01,133939.0,1.0086831443073818,2012-05-01,133935.0,0.967759416750363,2024-06-01,158548.0,1.0409627796124983
103103
53,1933-12-01,24613.14297022539,0.7857598956143976,1941-12-01,38104.0,1.228725291025765,1949-07-01,43531.0,1.0390004057569755,1953-02-01,50339.0,1.1113834061906653,1957-12-01,52384.0,1.0365679911350325,1962-01-01,54891.0,1.033184008432465,1964-09-01,58903.0,1.0746173353036688,1974-08-01,78619.0,1.1003204993631999,1978-12-01,88671.0,1.127613306882344,1984-08-01,95032.0,1.0443765523001516,1985-12-01,98609.0,1.0765057150031114,1994-11-01,115873.0,1.054762099820676,2005-07-01,134297.0,1.0113792116638802,2012-06-01,134008.0,0.9682868848313186,2024-07-01,158692.0,1.0419082260404835
104104
54,1934-01-01,24819.217286201616,0.7923386951283877,1942-01-01,38347.0,1.2365612202121827,1949-08-01,43624.0,1.0412201350932047,1953-03-01,50473.0,1.1143418554333908,1958-01-01,52076.0,1.0304733259458603,1962-02-01,55188.0,1.03877428098178,1964-10-01,58793.0,1.0726105121047926,1974-09-01,78610.0,1.1001945389147807,1979-01-01,88808.0,1.1293555114705733,1984-09-01,95344.0,1.0478053498032838,1986-01-01,98732.0,1.0778484951037652,1994-12-01,116176.0,1.0575202308455538,2005-08-01,134495.0,1.0128703327157984,2012-07-01,134153.0,0.9693345954030795,2024-08-01,158770.0,1.0424203428556422
105-
55,1934-02-01,25025.307308499967,0.7989179960573352,1942-02-01,38512.0,1.241881912869627,1949-09-01,43780.0,1.0449435520442991,1953-04-01,50435.0,1.1135028922153045,1958-02-01,51576.0,1.020579388950451,1962-03-01,55275.0,1.0404118355669327,1964-11-01,59218.0,1.0803641471913596,1974-10-01,78630.0,1.100474451022379,1979-02-01,89055.0,1.1324965664581108,1984-10-01,95629.0,1.0509374244455678,1986-02-01,98847.0,1.0791039399133198,1995-01-01,116504.0,1.0605059304368407,2005-09-01,134552.0,1.013299594836805,2012-08-01,134329.0,0.9706062992694928,2024-09-01,158993.0,1.0438844716989804
106-
56,1934-03-01,25228.098950982636,0.8053919981797547,1942-03-01,38935.0,1.2555222340459837,1949-10-01,42942.0,1.0249421199608564,1953-05-01,50490.0,1.1147171810835872,1958-03-01,51299.0,1.0150981478549945,1962-04-01,55602.0,1.0465667821111277,1964-12-01,59421.0,1.0840676481856495,1974-11-01,78265.0,1.0953660550587117,1979-03-01,89479.0,1.1378884989063534,1984-11-01,95982.0,1.0548168011077654,1986-03-01,98934.0,1.0800537112040263,1995-02-01,116693.0,1.0622263487988932,2005-10-01,134646.0,1.014007500790746,2012-09-01,134512.0,0.9719285822669567,2024-10-01,159005.0,1.0439632589013124
107-
57,1934-04-01,25424.278127511796,0.8116549012741603,1942-04-01,39352.0,1.2689690754893426,1949-11-01,43242.0,1.0321025371744994,1953-06-01,50519.0,1.1153574424868635,1958-04-01,51027.0,1.009715846129492,1962-05-01,55628.0,1.0470561662400242,1965-01-01,59582.0,1.0870049075949135,1974-12-01,77652.0,1.0867867489608263,1979-04-01,89417.0,1.1371000559540159,1984-12-01,96107.0,1.0561905180561355,1986-04-01,99121.0,1.0820951736334756,1995-03-01,116907.0,1.0641743357273548,2005-11-01,135001.0,1.0166809754040336,2012-10-01,134672.0,0.9730846766909688,,,
108-
58,1934-05-01,25610.530751949616,0.8176009051190658,1942-05-01,39771.0,1.282480410177034,1949-12-01,43522.0,1.038785593240566,1953-07-01,50536.0,1.1157327681370601,1958-05-01,50914.0,1.0074798163685295,1962-06-01,55644.0,1.0473573257039603,1965-02-01,59800.0,1.0909820662981409,1975-01-01,77293.0,1.0817623266294383,1979-05-01,89789.0,1.1418307136680401,1985-01-01,96372.0,1.0591027979866805,1986-05-01,99248.0,1.0834816213796792,1995-04-01,117065.0,1.06561256906706,2005-12-01,135160.0,1.0178783907942102,2012-11-01,134831.0,0.9742335455248308,,,
105+
55,1934-02-01,25025.307308499967,0.7989179960573352,1942-02-01,38512.0,1.241881912869627,1949-09-01,43780.0,1.0449435520442991,1953-04-01,50435.0,1.1135028922153045,1958-02-01,51576.0,1.020579388950451,1962-03-01,55275.0,1.0404118355669327,1964-11-01,59218.0,1.0803641471913596,1974-10-01,78630.0,1.100474451022379,1979-02-01,89055.0,1.1324965664581108,1984-10-01,95629.0,1.0509374244455678,1986-02-01,98847.0,1.0791039399133198,1995-01-01,116504.0,1.0605059304368407,2005-09-01,134552.0,1.013299594836805,2012-08-01,134329.0,0.9706062992694928,2024-09-01,159025.0,1.0440945709051992
106+
56,1934-03-01,25228.098950982636,0.8053919981797547,1942-03-01,38935.0,1.2555222340459837,1949-10-01,42942.0,1.0249421199608564,1953-05-01,50490.0,1.1147171810835872,1958-03-01,51299.0,1.0150981478549945,1962-04-01,55602.0,1.0465667821111277,1964-12-01,59421.0,1.0840676481856495,1974-11-01,78265.0,1.0953660550587117,1979-03-01,89479.0,1.1378884989063534,1984-11-01,95982.0,1.0548168011077654,1986-03-01,98934.0,1.0800537112040263,1995-02-01,116693.0,1.0622263487988932,2005-10-01,134646.0,1.014007500790746,2012-09-01,134512.0,0.9719285822669567,2024-10-01,159068.0,1.044376891713556
107+
57,1934-04-01,25424.278127511796,0.8116549012741603,1942-04-01,39352.0,1.2689690754893426,1949-11-01,43242.0,1.0321025371744994,1953-06-01,50519.0,1.1153574424868635,1958-04-01,51027.0,1.009715846129492,1962-05-01,55628.0,1.0470561662400242,1965-01-01,59582.0,1.0870049075949135,1974-12-01,77652.0,1.0867867489608263,1979-04-01,89417.0,1.1371000559540159,1984-12-01,96107.0,1.0561905180561355,1986-04-01,99121.0,1.0820951736334756,1995-03-01,116907.0,1.0641743357273548,2005-11-01,135001.0,1.0166809754040336,2012-10-01,134672.0,0.9730846766909688,2024-11-01,159280.0,1.0457687989547564
108+
58,1934-05-01,25610.530751949616,0.8176009051190658,1942-05-01,39771.0,1.282480410177034,1949-12-01,43522.0,1.038785593240566,1953-07-01,50536.0,1.1157327681370601,1958-05-01,50914.0,1.0074798163685295,1962-06-01,55644.0,1.0473573257039603,1965-02-01,59800.0,1.0909820662981409,1975-01-01,77293.0,1.0817623266294383,1979-05-01,89789.0,1.1418307136680401,1985-01-01,96372.0,1.0591027979866805,1986-05-01,99248.0,1.0834816213796792,1995-04-01,117065.0,1.06561256906706,2005-12-01,135160.0,1.0178783907942102,2012-11-01,134831.0,0.9742335455248308,2024-12-01,159536.0,1.047449592604508
109109
59,1934-06-01,25783.54273815829,0.8231242094929858,1942-06-01,40029.0,1.2908000386959466,1950-01-01,43526.0,1.0388810654700813,1953-08-01,50489.0,1.1146951031041639,1958-06-01,50914.0,1.0074798163685295,1962-07-01,55746.0,1.0492772172865532,1965-03-01,60003.0,1.0946855672924307,1975-02-01,76918.0,1.0765139746119718,1979-06-01,90108.0,1.1458873798260338,1985-02-01,96503.0,1.0605424533485723,1986-06-01,99155.0,1.0824663486206483,1995-05-01,117050.0,1.0654760279272144,2006-01-01,135425.0,1.0198740831111714,2012-12-01,135074.0,0.9759893639312991,,,
110110
60,1934-07-01,25940.0,0.8281190141744349,1942-07-01,40472.0,1.30508529231563,1950-02-01,43297.0,1.0334152803303338,1953-09-01,50368.0,1.112023667593942,1958-07-01,51039.0,1.0099533006173818,1962-08-01,55838.0,1.051008884204186,1965-04-01,60259.0,1.0993559921916334,1975-03-01,76648.0,1.072735161159396,1979-07-01,90217.0,1.1472735134035301,1985-03-01,96842.0,1.0642679737125524,1986-07-01,99473.0,1.0859379264418512,1995-06-01,117286.0,1.067624275194116,2006-02-01,135732.0,1.0221860738330848,2013-01-01,135263.0,0.9773550004696634,,,
111111
61,1934-08-01,26077.583305916007,0.8325112790804498,1942-08-01,40988.0,1.3217245493534553,1950-03-01,43954.0,1.049096594028212,1953-10-01,50240.0,1.1091976862277564,1958-08-01,51233.0,1.0137921481716003,1962-09-01,55978.0,1.0536440295136276,1965-05-01,60491.0,1.1035885647565358,1975-04-01,76460.0,1.0701039873479727,1979-08-01,90300.0,1.1483290096139174,1985-04-01,97038.0,1.066421961887597,1986-08-01,99588.0,1.0871933712514055,1995-07-01,117377.0,1.068452624775845,2006-03-01,136041.0,1.0245131263838054,2013-02-01,135548.0,0.9794142936624349,,,

0 commit comments

Comments
 (0)