pycensus.census.countries.germany.elections¶
Hamburg election results by Wahlbezirk (polling district) and H3 (Bundestag 2025, Buergerschaft 2025, Bezirksversammlungen 2024).
load_buergerschaft_2025(level='wahlbezirk', data_dir=None)
¶
Hamburg Bürgerschaft election 2025 (see :func:load_election).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
|
'wahlbezirk'
|
|
data_dir
|
Folder of the raw downloads; |
None
|
Returns:
| Type | Description |
|---|---|
|
The election frame. |
load_bundestag_2025(level='wahlbezirk', data_dir=None)
¶
Bundestag election 2025 in Hamburg (see :func:load_election).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
|
'wahlbezirk'
|
|
data_dir
|
Folder of the raw downloads; |
None
|
Returns:
| Type | Description |
|---|---|
|
The election frame. |
load_bezirksversammlung_2024(level='wahlbezirk', data_dir=None)
¶
Hamburg district assembly elections 2024 (see :func:load_election).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
|
'wahlbezirk'
|
|
data_dir
|
Folder of the raw downloads; |
None
|
Returns:
| Type | Description |
|---|---|
|
The election frame. |
load_election(scope, year, level='wahlbezirk', data_dir=None, min_share=0.03)
¶
scope/year: ('national', 2025) Bundestag, ('state', 2025) Buergerschaft, ('municipal', 2024) Bezirksversammlungen.
level: 'wahlbezirk' (GEOID, 5-digit string) or 'h3' (h3_cell, res 8).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
str
|
|
required |
year
|
int
|
Election year. |
required |
level
|
str
|
|
'wahlbezirk'
|
data_dir
|
Optional[str]
|
Folder of the raw downloads; |
None
|
min_share
|
float
|
Parties above this share get their own columns. |
0.03
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
The election frame. |