diff --git a/data/items.csv b/data/items.csv index 19fe8e1..f14e492 100644 --- a/data/items.csv +++ b/data/items.csv @@ -382,7 +382,7 @@ SS5703,SS5703,Outpatient hospital services SS61011,SS61011,"Toys, games, hobbies and playground equipment" SS61021,SS61021,Film and photographic supplies SS61023,SS61023,Photographic equipment -SS61031,SS61031,Pet food +SS61031,SS61031,Pet food and treats SS61032,SS61032,"Purchase of pets, pet supplies, accessories" SS62011,SS62011,Automobile service clubs SS62031,SS62031,"Admission to movies, theaters, and concerts" diff --git a/notebooks/cpi-mom.csv b/notebooks/cpi-mom.csv index e8fbd9f..7be240c 100644 --- a/notebooks/cpi-mom.csv +++ b/notebooks/cpi-mom.csv @@ -1,27 +1,27 @@ date,pct_change,pct_change_rounded -2022-09-01,0.38345714392176156,0.4 -2022-10-01,0.5135975109755275,0.5 -2022-11-01,0.26354397827190734,0.3 -2022-12-01,0.054914146419871024,0.1 -2023-01-01,0.5167128495508821,0.5 -2023-02-01,0.38387779834596625,0.4 -2023-03-01,0.07794128865141747,0.1 -2023-04-01,0.4268519009491323,0.4 -2023-05-01,0.10988938461946596,0.1 -2023-06-01,0.21030771512864366,0.2 -2023-07-01,0.20559007641371974,0.2 -2023-08-01,0.5117717347059347,0.5 -2023-09-01,0.35958417568349166,0.4 -2023-10-01,0.07907890968732456,0.1 -2023-11-01,0.16030904201527196,0.2 -2023-12-01,0.2330987195803047,0.2 -2024-01-01,0.30543301526839706,0.3 -2024-02-01,0.4420620953549559,0.4 -2024-03-01,0.3780694027403664,0.4 -2024-04-01,0.3129103545463252,0.3 -2024-05-01,0.00574699799176237,0.0 -2024-06-01,-0.05618964003513138,-0.1 -2024-07-01,0.1549278228009099,0.2 -2024-08-01,0.1872205247277714,0.2 -2024-09-01,0.17986699392908978,0.2 -2024-10-01,0.24405280184056632,0.2 +2022-12-01,0.03347750980888797,0.0 +2023-01-01,0.5515247249069821,0.6 +2023-02-01,0.33948398434380245,0.3 +2023-03-01,0.05539412755906081,0.1 +2023-04-01,0.4027940313549472,0.4 +2023-05-01,0.15122598709624846,0.2 +2023-06-01,0.2581466193672721,0.3 +2023-07-01,0.16968158395787025,0.2 +2023-08-01,0.49997537875678955,0.5 +2023-09-01,0.4037394900339164,0.4 +2023-10-01,0.09076890042749586,0.1 +2023-11-01,0.14106802143973862,0.1 +2023-12-01,0.21033019893732519,0.2 +2024-01-01,0.34301261599751776,0.3 +2024-02-01,0.3963924414288167,0.4 +2024-03-01,0.34884992058441533,0.3 +2024-04-01,0.2912462713108077,0.3 +2024-05-01,0.03961458839163434,0.0 +2024-06-01,-0.0028741138149102063,-0.0 +2024-07-01,0.1389194937581939,0.1 +2024-08-01,0.1801853517281904,0.2 +2024-09-01,0.22920373984103293,0.2 +2024-10-01,0.2264563237849071,0.2 +2024-11-01,0.2804502414724075,0.3 +2024-12-01,0.36467171645351293,0.4 +2025-01-01,0.46693513600313263,0.5 diff --git a/notebooks/latest.json b/notebooks/latest.json index 931134a..2aafce0 100644 --- a/notebooks/latest.json +++ b/notebooks/latest.json @@ -1 +1 @@ -{"all": {"latest_month": "2024-10-01", "latest_change": 0.2, "previous_month": "2024-09-01", "previous_change": 0.2}, "food": {"latest_month": "2024-10-01", "latest_change": 0.2, "previous_month": "2024-09-01", "previous_change": 0.4}, "energy": {"latest_month": "2024-10-01", "latest_change": -0.0, "previous_month": "2024-09-01", "previous_change": -1.9}, "less_food_and_energy": {"latest_month": "2024-10-01", "latest_change": 0.3, "previous_month": "2024-09-01", "previous_change": 0.3}, "yoy_change": 2.6} +{"all": {"latest_month": "2025-01-01", "latest_change": 0.5, "previous_month": "2024-12-01", "previous_change": 0.4}, "food": {"latest_month": "2025-01-01", "latest_change": 0.4, "previous_month": "2024-12-01", "previous_change": 0.3}, "energy": {"latest_month": "2025-01-01", "latest_change": 1.1, "previous_month": "2024-12-01", "previous_change": 2.4}, "less_food_and_energy": {"latest_month": "2025-01-01", "latest_change": 0.4, "previous_month": "2024-12-01", "previous_change": 0.2}, "yoy_change": 3.0} \ No newline at end of file diff --git a/notebooks/three-categories-yoy.csv b/notebooks/three-categories-yoy.csv index d6ffe58..97221a7 100644 --- a/notebooks/three-categories-yoy.csv +++ b/notebooks/three-categories-yoy.csv @@ -1,7 +1,4 @@ series_id,year,date,value,period_id,period_code,period_abbreviation,period_name,period_month,period_type,pct_change -CUUR0000SA0,2014,2014-11-01,236.151,M11,M11,NOV,November,11,monthly,0.013223551823708934 -CUUR0000SA0,2014,2014-12-01,234.812,M12,M12,DEC,December,12,monthly,0.007564932696557447 -CUUR0000SA0,2015,2015-01-01,233.707,M01,M01,JAN,January,1,monthly,-0.0008934831306964819 CUUR0000SA0,2015,2015-02-01,234.722,M02,M02,FEB,February,2,monthly,-0.00025129801815304553 CUUR0000SA0,2015,2015-03-01,236.119,M03,M03,MAR,March,3,monthly,-0.0007363739086643228 CUUR0000SA0,2015,2015-04-01,236.599,M04,M04,APR,April,4,monthly,-0.001995174461766891 @@ -119,9 +116,9 @@ CUUR0000SA0,2024,2024-07-01,314.54,M07,M07,JUL,July,7,monthly,0.0289475319849130 CUUR0000SA0,2024,2024-08-01,314.796,M08,M08,AUG,August,8,monthly,0.025307302964569622 CUUR0000SA0,2024,2024-09-01,315.301,M09,M09,SEP,September,9,monthly,0.02440633031069983 CUUR0000SA0,2024,2024-10-01,315.664,M10,M10,OCT,October,10,monthly,0.02597904904914672 -CUUR0000SA0E,2014,2014-11-01,221.844,M11,M11,NOV,November,11,monthly,-0.048435248095532235 -CUUR0000SA0E,2014,2014-12-01,209.785,M12,M12,DEC,December,12,monthly,-0.1055546554561656 -CUUR0000SA0E,2015,2015-01-01,192.619,M01,M01,JAN,January,1,monthly,-0.19591652716957975 +CUUR0000SA0,2024,2024-11-01,315.493,M11,M11,NOV,November,11,monthly,0.027493803960905616 +CUUR0000SA0,2024,2024-12-01,315.605,M12,M12,DEC,December,12,monthly,0.02888057219980067 +CUUR0000SA0,2025,2025-01-01,317.671,M01,M01,JAN,January,1,monthly,0.030004831121501097 CUUR0000SA0E,2015,2015-02-01,196.597,M02,M02,FEB,February,2,monthly,-0.18775331452109345 CUUR0000SA0E,2015,2015-03-01,204.731,M03,M03,MAR,March,3,monthly,-0.1828508479582348 CUUR0000SA0E,2015,2015-04-01,203.715,M04,M04,APR,April,4,monthly,-0.19390068733009658 @@ -239,9 +236,9 @@ CUUR0000SA0E,2024,2024-07-01,287.868,M07,M07,JUL,July,7,monthly,0.01067310798095 CUUR0000SA0E,2024,2024-08-01,282.614,M08,M08,AUG,August,8,monthly,-0.039799135658177276 CUUR0000SA0E,2024,2024-09-01,275.74,M09,M09,SEP,September,9,monthly,-0.06845853434413052 CUUR0000SA0E,2024,2024-10-01,272.807,M10,M10,OCT,October,10,monthly,-0.04863750810799505 -CUUR0000SAF1,2014,2014-11-01,245.192,M11,M11,NOV,November,11,monthly,0.031774820001599036 -CUUR0000SAF1,2014,2014-12-01,245.976,M12,M12,DEC,December,12,monthly,0.03408178451164301 -CUUR0000SAF1,2015,2015-01-01,246.538,M01,M01,JAN,January,1,monthly,0.0320925014233564 +CUUR0000SA0E,2024,2024-11-01,268.213,M11,M11,NOV,November,11,monthly,-0.031823383111515335 +CUUR0000SA0E,2024,2024-12-01,267.963,M12,M12,DEC,December,12,monthly,-0.005241763341067185 +CUUR0000SA0E,2025,2025-01-01,273.045,M01,M01,JAN,January,1,monthly,0.009707122254271061 CUUR0000SAF1,2015,2015-02-01,246.68,M02,M02,FEB,February,2,monthly,0.02951487429468136 CUUR0000SAF1,2015,2015-03-01,246.045,M03,M03,MAR,March,3,monthly,0.023490212064992244 CUUR0000SAF1,2015,2015-04-01,246.121,M04,M04,APR,April,4,monthly,0.01982290324318292 @@ -359,3 +356,6 @@ CUUR0000SAF1,2024,2024-07-01,330.561,M07,M07,JUL,July,7,monthly,0.02175424931148 CUUR0000SAF1,2024,2024-08-01,330.75,M08,M08,AUG,August,8,monthly,0.020518358531317338 CUUR0000SAF1,2024,2024-09-01,332.083,M09,M09,SEP,September,9,monthly,0.022725312900364614 CUUR0000SAF1,2024,2024-10-01,332.678,M10,M10,OCT,October,10,monthly,0.021327414338825568 +CUUR0000SAF1,2024,2024-11-01,332.904,M11,M11,NOV,November,11,monthly,0.023778185083586534 +CUUR0000SAF1,2024,2024-12-01,333.566,M12,M12,DEC,December,12,monthly,0.025066915789053068 +CUUR0000SAF1,2025,2025-01-01,335.517,M01,M01,JAN,January,1,monthly,0.025020850708924014 diff --git a/notebooks/two-categories-yoy.csv b/notebooks/two-categories-yoy.csv index e3765be..a935c46 100644 --- a/notebooks/two-categories-yoy.csv +++ b/notebooks/two-categories-yoy.csv @@ -1,7 +1,4 @@ series_id,year,date,value,period_id,period_code,period_abbreviation,period_name,period_month,period_type,pct_change -CUUR0000SA0,2023,2023-10-01,307.671,M10,M10,OCT,October,10,monthly,0.03241144651893202 -CUUR0000SA0,2023,2023-11-01,307.051,M11,M11,NOV,November,11,monthly,0.03137270708841777 -CUUR0000SA0,2023,2023-12-01,306.746,M12,M12,DEC,December,12,monthly,0.033521228314302265 CUUR0000SA0,2024,2024-01-01,308.417,M01,M01,JAN,January,1,monthly,0.030908847812280538 CUUR0000SA0,2024,2024-02-01,310.326,M02,M02,FEB,February,2,monthly,0.031531711208615976 CUUR0000SA0,2024,2024-03-01,312.332,M03,M03,MAR,March,3,monthly,0.034773850700380304 @@ -12,9 +9,9 @@ CUUR0000SA0,2024,2024-07-01,314.54,M07,M07,JUL,July,7,monthly,0.0289475319849130 CUUR0000SA0,2024,2024-08-01,314.796,M08,M08,AUG,August,8,monthly,0.025307302964569622 CUUR0000SA0,2024,2024-09-01,315.301,M09,M09,SEP,September,9,monthly,0.02440633031069983 CUUR0000SA0,2024,2024-10-01,315.664,M10,M10,OCT,October,10,monthly,0.02597904904914672 -CUUR0000SA0L1E,2023,2023-10-01,311.38,M10,M10,OCT,October,10,monthly,0.040308704876133916 -CUUR0000SA0L1E,2023,2023-11-01,311.606,M11,M11,NOV,November,11,monthly,0.04007343124165552 -CUUR0000SA0L1E,2023,2023-12-01,311.907,M12,M12,DEC,December,12,monthly,0.03929853088669932 +CUUR0000SA0,2024,2024-11-01,315.493,M11,M11,NOV,November,11,monthly,0.027493803960905616 +CUUR0000SA0,2024,2024-12-01,315.605,M12,M12,DEC,December,12,monthly,0.02888057219980067 +CUUR0000SA0,2025,2025-01-01,317.671,M01,M01,JAN,January,1,monthly,0.030004831121501097 CUUR0000SA0L1E,2024,2024-01-01,313.623,M01,M01,JAN,January,1,monthly,0.03861744192977934 CUUR0000SA0L1E,2024,2024-02-01,315.419,M02,M02,FEB,February,2,monthly,0.03752495797849398 CUUR0000SA0L1E,2024,2024-03-01,317.088,M03,M03,MAR,March,3,monthly,0.03801280624337111 @@ -25,3 +22,6 @@ CUUR0000SA0L1E,2024,2024-07-01,319.214,M07,M07,JUL,July,7,monthly,0.031712787894 CUUR0000SA0L1E,2024,2024-08-01,320.017,M08,M08,AUG,August,8,monthly,0.03197002286337125 CUUR0000SA0L1E,2024,2024-09-01,321.109,M09,M09,SEP,September,9,monthly,0.033112731929077155 CUUR0000SA0L1E,2024,2024-10-01,321.758,M10,M10,OCT,October,10,monthly,0.03332905131993069 +CUUR0000SA0L1E,2024,2024-11-01,321.947,M11,M11,NOV,November,11,monthly,0.03318613890618294 +CUUR0000SA0L1E,2024,2024-12-01,322.007,M12,M12,DEC,December,12,monthly,0.032381447033891675 +CUUR0000SA0L1E,2025,2025-01-01,323.842,M01,M01,JAN,January,1,monthly,0.03258370718984249 diff --git a/tests/test_input.py b/tests/test_input.py index 811d8d1..2c2016a 100644 --- a/tests/test_input.py +++ b/tests/test_input.py @@ -16,12 +16,12 @@ # These global variables change with each data update. # They will need to be edited when the data changes, which # happens every month. -LATEST_YEAR = 2023 -LATEST_YEAR_1950_ALL_ITEMS = 1264.323651452282 -LATEST_YEAR_1950_CUSR0000SA0 = 1264.323651452282 -LATEST_MONTH = date(2024, 10, 1) -LATEST_MONTH_1950_ALL_ITEMS = 1343.2510638297872 -LATEST_MONTH_1950_CUSR0000SA0 = 1341.7864738409187 +LATEST_YEAR = 2024 +LATEST_YEAR_1950_ALL_ITEMS = 1301.6141078838175 +LATEST_YEAR_1950_CUSR0000SA0 = 1301.6141078838175 +LATEST_MONTH = date(2025, 1, 1) +LATEST_MONTH_1950_ALL_ITEMS = 1351.7914893617021 +LATEST_MONTH_1950_CUSR0000SA0 = 1357.235219055721 def test_latest_year():