iizy commited on
Commit
2500035
·
1 Parent(s): ccda56c

init: US Labor Market — Unemployment + LFP — full SEO mesh + Author profiles + cross-links

Browse files
Files changed (3) hide show
  1. README.md +92 -8
  2. app.py +56 -0
  3. requirements.txt +3 -0
README.md CHANGED
@@ -1,14 +1,98 @@
1
  ---
2
- title: Calcfi Labor Market
3
- emoji: 🔥
4
- colorFrom: red
5
- colorTo: gray
6
  sdk: gradio
7
- sdk_version: 6.14.0
8
- python_version: '3.13'
9
  app_file: app.py
10
- pinned: false
11
  license: cc-by-4.0
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: US Labor Market — Unemployment + LFP
3
+ emoji: 👥
4
+ colorFrom: blue
5
+ colorTo: purple
6
  sdk: gradio
7
+ sdk_version: 4.44.0
 
8
  app_file: app.py
9
+ pinned: true
10
  license: cc-by-4.0
11
+ short_description: BLS unemployment + labor-force participation, monthly
12
+ datasets:
13
+ - iizy/calcfi-open-data
14
+ tags:
15
+ - finance
16
+ - labor
17
+ - unemployment
18
+ - bls
19
+ - macro
20
+ - calcfi-open-data
21
  ---
22
 
23
+ # US Labor Market Unemployment + LFP
24
+
25
+ [![Dataset DOI](https://img.shields.io/badge/Dataset%20DOI-10.6084%2Fm9.figshare.32332290-blue)](https://doi.org/10.6084/m9.figshare.32332290)
26
+ [![Zenodo DOI](https://img.shields.io/badge/Zenodo-10.5281%2Fzenodo.20302283-1682D4)](https://doi.org/10.5281/zenodo.20302283)
27
+ [![OSF DOI](https://img.shields.io/badge/OSF-10.17605%2FOSF.IO%2FPUMKT-2C6BAC)](https://doi.org/10.17605/OSF.IO/PUMKT)
28
+ [![License CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey)](https://creativecommons.org/licenses/by/4.0/)
29
+
30
+ Unemployment · Labor Force Participation, loaded live from the [CalcFi Open Data](https://huggingface.co/datasets/iizy/calcfi-open-data) dataset (CC BY 4.0, primary sources only).
31
+
32
+ ## What this Space shows
33
+
34
+ Unemployment alone hides structural changes in who counts as 'looking for work.' Pairing it with labor-force participation reveals when low unemployment is real strength versus people dropping out of the workforce.
35
+
36
+ ## Why these series matter
37
+
38
+ - **Unemployment rate** (percent) — Source: BLS via FRED UNRATE
39
+ - **Labor force participation** (percent) — Source: BLS via FRED CIVPART
40
+
41
+ ## Methodology
42
+
43
+ All series are pulled live from the CalcFi Open Data dataset on Hugging Face. CSVs carry primary-source provenance in their comment headers (`# Source:`, `# Primary URL:`, `# Retrieved:`). Pandas reads them with `comment="#"`. No smoothing, no imputation, no proprietary adjustments.
44
+
45
+ Full methodology: <https://calcfi-open-data-4a2bc1.gitlab.io/methodology.html>
46
+
47
+ ## Data source
48
+
49
+ - Live dataset: [iizy/calcfi-open-data](https://huggingface.co/datasets/iizy/calcfi-open-data)
50
+ - Permanent DOIs: [Figshare 10.6084/m9.figshare.32332290](https://doi.org/10.6084/m9.figshare.32332290) · [Zenodo 10.5281/zenodo.20302283](https://doi.org/10.5281/zenodo.20302283) · [OSF 10.17605/OSF.IO/PUMKT](https://doi.org/10.17605/OSF.IO/PUMKT) · [Kaggle 10.34740/kaggle/dsv/16356447](https://doi.org/10.34740/kaggle/dsv/16356447) · [Mendeley 10.17632/jsnwhy6vjn.1](https://doi.org/10.17632/jsnwhy6vjn.1)
51
+ - Mirrors: [GitHub](https://github.com/jerehere/calcfi-open-data) · [GitLab](https://gitlab.com/jere.salmisto/calcfi-open-data) · [Docs site](https://calcfi-open-data-4a2bc1.gitlab.io/)
52
+
53
+ ## Related work
54
+
55
+ **Other HF Spaces in this set (10 total):**
56
+ - [calcfi-mortgage-rate-explorer](https://huggingface.co/spaces/iizy/calcfi-mortgage-rate-explorer) — 30Y + 15Y mortgage + 10Y Treasury
57
+ - [calcfi-inflation-wage-tracker](https://huggingface.co/spaces/iizy/calcfi-inflation-wage-tracker) — CPI + PCE + hourly earnings
58
+ - [calcfi-yield-curve-spread](https://huggingface.co/spaces/iizy/calcfi-yield-curve-spread) — Fed Funds + 2Y + 10Y, inversion shading
59
+ - [calcfi-fed-funds-cycle](https://huggingface.co/spaces/iizy/calcfi-fed-funds-cycle) — Fed Funds + Prime + credit-card APR
60
+ - [calcfi-oil-gas-tracker](https://huggingface.co/spaces/iizy/calcfi-oil-gas-tracker) — WTI + Brent + US gasoline
61
+ - [calcfi-fx-history](https://huggingface.co/spaces/iizy/calcfi-fx-history) — USD/EUR · USD/GBP · USD/JPY exchange-rate history
62
+ - [calcfi-commodity-inflation](https://huggingface.co/spaces/iizy/calcfi-commodity-inflation) — Copper · corn · vs CPI
63
+ - [calcfi-gdp-per-capita](https://huggingface.co/spaces/iizy/calcfi-gdp-per-capita) — US · Eurozone GDP per capita
64
+ - [calcfi-consumer-credit](https://huggingface.co/spaces/iizy/calcfi-consumer-credit) — Credit-card APR · personal-loan rate
65
+
66
+ **Long-form Observable notebooks built on the same dataset:**
67
+ - [Mortgage Spread Over Treasury (50 years)](https://observablehq.com/@iizy/mortgage-spread-over-treasury-50-years)
68
+ - [Yield Curve Recession Indicator (2s/10s)](https://observablehq.com/@iizy/yield-curve-recession-indicator-2s-10s)
69
+ - [Inflation vs Fed Target (2% History)](https://observablehq.com/@iizy/inflation-vs-fed-target-2-percent-history)
70
+
71
+ **CodePen calculator demos (vanilla JS, MIT)** — [view all 6 in collection](https://codepen.io/collection/BawbdB):
72
+ - [Compound Interest Calculator](https://codepen.io/Jere-S/pen/LEbyJQe)
73
+ - [Mortgage Amortization Chart](https://codepen.io/Jere-S/pen/zxowJaw)
74
+ - [Inflation-Adjusted Returns](https://codepen.io/Jere-S/pen/pvNPOZg)
75
+ - [30Y Mortgage Rate History (FRED Data)](https://codepen.io/Jere-S/pen/emBWLLg)
76
+ - [Retirement Corpus Projection](https://codepen.io/Jere-S/pen/ByQROqg)
77
+ - [CPI vs Wages Tracker](https://codepen.io/Jere-S/pen/qEqmMQo)
78
+
79
+ **Static dataset documentation:** [calcfi-open-data-4a2bc1.gitlab.io](https://calcfi-open-data-4a2bc1.gitlab.io/)
80
+
81
+ **Author profiles (Person entity graph):**
82
+ - [ORCID 0009-0000-0916-8684](https://orcid.org/0009-0000-0916-8684)
83
+ - [Academia.edu — Jere K Salmisto](https://independent.academia.edu/JereS6)
84
+ - [GitLab — jere.salmisto](https://gitlab.com/jere.salmisto)
85
+ - [CodePen — Jere-S](https://codepen.io/Jere-S)
86
+ - [Hugging Face — iizy](https://huggingface.co/iizy)
87
+
88
+ **Live tools at [calcfi.app](https://calcfi.app):** 300+ free personal-finance calculators built on the same primary-source data layer (FRED, BLS, Freddie Mac, US Treasury).
89
+
90
+ ## Citation
91
+
92
+ > Salmisto, J. (2026). *CalcFi Open Data: 34 Free CC-BY Financial and Macro Time Series Mirrored from Primary Sources* [Dataset]. Figshare. https://doi.org/10.6084/m9.figshare.32332290
93
+
94
+ ORCID: [0009-0000-0916-8684](https://orcid.org/0009-0000-0916-8684)
95
+
96
+ ## License
97
+
98
+ App code: MIT. Underlying data: CC BY 4.0 — attribution to [CalcFi](https://calcfi.app/developers) and the named primary source.
app.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # US Labor Market — Unemployment + LFP — Gradio Space
2
+ # Loads live from CalcFi Open Data (CC BY 4.0)
3
+ import io
4
+ import pandas as pd
5
+ import requests
6
+ import gradio as gr
7
+
8
+ HF_BASE = "https://huggingface.co/datasets/iizy/calcfi-open-data/resolve/main/datasets"
9
+
10
+ SERIES = {
11
+ "Unemployment rate": "unemployment-rate",
12
+ "Labor force participation": "labor-force-participation",
13
+ }
14
+
15
+ def load(slug: str) -> pd.DataFrame:
16
+ url = f"{HF_BASE}/{slug}/data.csv"
17
+ r = requests.get(url, timeout=30)
18
+ r.raise_for_status()
19
+ df = pd.read_csv(io.StringIO(r.text), comment="#")
20
+ df["date"] = pd.to_datetime(df["date"], errors="coerce")
21
+ df = df.dropna(subset=["date", "value"])
22
+ df["value"] = pd.to_numeric(df["value"], errors="coerce")
23
+ return df.dropna(subset=["value"])
24
+
25
+ def chart(start_year: int, selected_labels):
26
+ frames = []
27
+ for label in selected_labels:
28
+ slug = SERIES.get(label)
29
+ if not slug:
30
+ continue
31
+ df = load(slug)
32
+ df = df[df["date"].dt.year >= start_year].copy()
33
+ df["series"] = label
34
+ frames.append(df[["date", "value", "series"]])
35
+ if not frames:
36
+ return pd.DataFrame(columns=["date", "value", "series"])
37
+ return pd.concat(frames, ignore_index=True)
38
+
39
+ with gr.Blocks(title="US Labor Market — Unemployment + LFP", theme=gr.themes.Soft()) as demo:
40
+ gr.Markdown("# US Labor Market — Unemployment + LFP\n\nUnemployment · Labor Force Participation, loaded live from [CalcFi Open Data](https://huggingface.co/datasets/iizy/calcfi-open-data) (CC BY 4.0).")
41
+ with gr.Row():
42
+ start = gr.Slider(minimum=1971, maximum=2024, value=1990, step=1, label="Start year")
43
+ picks = gr.CheckboxGroup(choices=list(SERIES.keys()), value=list(SERIES.keys()), label="Series")
44
+ plot = gr.LinePlot(x="date", y="value", color="series", overlay_point=False, height=420, tooltip=["date", "value", "series"])
45
+ inputs = [start, picks]
46
+ start.change(chart, inputs=inputs, outputs=plot)
47
+ picks.change(chart, inputs=inputs, outputs=plot)
48
+ demo.load(chart, inputs=inputs, outputs=plot)
49
+ gr.Markdown(
50
+ "**Sources:** BLS via FRED UNRATE · BLS via FRED CIVPART\n\n"
51
+ "**Methodology:** <https://calcfi-open-data-4a2bc1.gitlab.io/methodology.html>\n\n"
52
+ "**Citation:** Salmisto, J. (2026). CalcFi Open Data. Figshare. https://doi.org/10.6084/m9.figshare.32332290\n\n"
53
+ "**Free calculator suite:** [calcfi.app](https://calcfi.app)"
54
+ )
55
+
56
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio>=4.44.0
2
+ pandas>=2.0.0
3
+ requests>=2.31.0