Skip to content

pycensus.census.countries.israel.elections

Israel election results (Central Elections Committee data republished on data.gov.il) -> H3 res 8 -> CBS statistical areas.

load_knesset(election=25, localities=(9000,), data_dir=None, party_threshold=0.03)

Knesset election results for localities (CBS locality symbols; 9000 = Beersheba).

Returns ElectionResult(census, h3): census keyed by 8-digit CBS statistical-area GEOID (same GEOIDs as israel.geography.load_boundaries('statistical_area', ...)), h3 keyed by h3_cell (res 8) with shares and cnt_* counts. Columns: elec_national_<year>_{total_votes,turnout_rate,left_share,right_share,other_share,party_<slug>_share} (total_votes = valid votes).

Parameters:

Name Type Description Default
election int

Knesset number (e.g. 25).

25
localities Iterable[int]

CBS locality symbols.

(9000,)
data_dir Optional[str]

Folder of the raw downloads; None = the pycensus cache.

None
party_threshold float

Parties above this share get their own columns.

0.03

Raises:

Type Description
ValueError

For a Knesset not wired.

load_knesset_localities(election=25, localities=(9000,), data_dir=None, party_threshold=0.03)

Knesset results summed over each locality's ballot boxes (no geocoding): one row per CBS locality symbol (GEOID), the same elec_national_<year>_* columns as :func:load_knesset. For the localities without statistical areas (most of them) and as the fallback of those with them. A locality with no ballot-box rows is left out.

Parameters:

Name Type Description Default
election int

Knesset number (e.g. 25).

25
localities Iterable[int]

CBS locality symbols.

(9000,)
data_dir Optional[str]

Folder of the raw downloads; None = the pycensus cache.

None
party_threshold float

Parties above this share (of the localities together) get their own columns.

0.03

Returns:

Type Description
DataFrame

DataFrame keyed by GEOID (locality symbol as text).

Raises:

Type Description
ValueError

For a Knesset not wired.

load_local_authorities(*args, **kw)

Not available: the Interior Ministry / Central Elections Committee local-authority (mayor + council) results by ballot box (Feb 2024 round) are only on gov.il / bechirot.gov.il pages that answer scripted clients with an HTTP 403 WAF block, and data.gov.il has no local-election results dataset (only polling-place lists). Not circumvented; see the module report.

Parameters:

Name Type Description Default
*args

Ignored.

()
**kw

Ignored.

{}

Raises:

Type Description
NotImplementedError

Always.