Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _data/profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const IMPLEMENTED = [
{ dir: 'catalog', slug: 'catalog', name: 'Discovery and data catalogue', source: 'DCAT / DCAT-AP' },
{ dir: 'alerts', slug: 'alerts', name: 'Public warnings and notices', source: 'Common Alerting Protocol (OASIS)' },
{ dir: 'permits', slug: 'permits', name: 'Permits and licences', source: 'BLDS, national equivalents' },
{ dir: 'elections', slug: 'elections', name: 'Elections and results', source: 'NIST SP 1500-100, VIP' },
]
const PLANNED = []

Expand Down
83 changes: 81 additions & 2 deletions context/v1/context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@
},
"party": {
"@id": "gs:party",
"@container": "@set"
"@type": "@id"
},
"supplier": {
"@id": "gs:supplier",
Expand Down Expand Up @@ -905,6 +905,85 @@
"validUntil": {
"@id": "schema:validUntil",
"@type": "schema:Date"
}
},
"Election": "gs:Election",
"Contest": "gs:Contest",
"Candidacy": "gs:Candidacy",
"BallotOption": "gs:BallotOption",
"electionDate": {
"@id": "gs:electionDate",
"@type": "schema:Date"
},
"electionType": {
"@id": "gs:electionType",
"@type": "@vocab",
"@context": {
"@vocab": "https://schema.govfresh.com/v1/electtype/"
}
},
"electionStatus": {
"@id": "gs:electionStatus",
"@type": "@vocab",
"@context": {
"@vocab": "https://schema.govfresh.com/v1/electstatus/"
}
},
"electoralSystem": {
"@id": "gs:electoralSystem",
"@type": "@vocab",
"@context": {
"@vocab": "https://schema.govfresh.com/v1/electsys/"
}
},
"contestType": {
"@id": "gs:contestType",
"@type": "@vocab",
"@context": {
"@vocab": "https://schema.govfresh.com/v1/contesttype/"
}
},
"candidacyResult": {
"@id": "gs:candidacyResult",
"@type": "@vocab",
"@context": {
"@vocab": "https://schema.govfresh.com/v1/candresult/"
}
},
"administeredBy": {
"@id": "gs:administeredBy",
"@type": "@id"
},
"contest": {
"@id": "gs:contest",
"@type": "@id",
"@container": "@set"
},
"election": {
"@id": "gs:election",
"@type": "@id"
},
"seatsToFill": "gs:seatsToFill",
"candidacy": {
"@id": "gs:candidacy",
"@container": "@set"
},
"ballotOption": {
"@id": "gs:ballotOption",
"@container": "@set"
},
"candidate": {
"@id": "gs:candidate",
"@type": "@id"
},
"ballotName": "gs:ballotName",
"ballotOrder": "gs:ballotOrder",
"voteCount": "gs:voteCount",
"incumbent": "gs:incumbent",
"registeredVoters": "gs:registeredVoters",
"ballotsCast": "gs:ballotsCast",
"validVotes": "gs:validVotes",
"invalidVotes": "gs:invalidVotes",
"totalVotes": "gs:totalVotes",
"prevailed": "gs:prevailed"
}
}
2 changes: 2 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export default async function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({ './profiles/alerts/codelists/': '/v1/codelists/' })
eleventyConfig.addPassthroughCopy({ './profiles/permits/schema/': '/v1/permits/' })
eleventyConfig.addPassthroughCopy({ './profiles/permits/codelists/': '/v1/codelists/' })
eleventyConfig.addPassthroughCopy({ './profiles/elections/schema/': '/v1/elections/' })
eleventyConfig.addPassthroughCopy({ './profiles/elections/codelists/': '/v1/codelists/' })
eleventyConfig.addPassthroughCopy({ './examples/': '/examples/' })

eleventyConfig.addWatchTarget('./profiles/')
Expand Down
242 changes: 242 additions & 0 deletions examples/example-city/elections.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
{
"@context": "https://schema.govfresh.com/v1/context.jsonld",
"@graph": [
{
"@id": "https://example-city.gov/id/election/2022-general",
"@type": "Election",
"name": "Example City general election, 2022",
"electionDate": "2022-11-08",
"electionType": "general",
"electionStatus": "completed",
"administeredBy": {
"@id": "https://example-city.gov/id/organization/city-government",
"name": "Example City Government"
},
"jurisdiction": {
"@id": "https://example-city.gov/id/jurisdiction/example-city",
"name": "Example City"
},
"registeredVoters": 41200,
"ballotsCast": 24310,
"identifier": [
{
"@type": "PropertyValue",
"propertyID": "gs:local",
"value": "2022-general"
}
],
"contest": [
{
"@id": "https://example-city.gov/id/contest/2022-mayor"
},
{
"@id": "https://example-city.gov/id/contest/2022-council-d2"
},
{
"@id": "https://example-city.gov/id/contest/2022-measure-a"
}
]
},
{
"@id": "https://example-city.gov/id/election/2026-d5-special",
"@type": "Election",
"name": "Example City District 5 special election, 2026",
"description": "Called to fill the District 5 council vacancy.",
"electionDate": "2026-11-03",
"electionType": "special",
"electionStatus": "scheduled",
"administeredBy": {
"@id": "https://example-city.gov/id/organization/city-government"
},
"jurisdiction": {
"@id": "https://example-city.gov/id/jurisdiction/example-city"
},
"contest": [
{
"@id": "https://example-city.gov/id/contest/2026-council-d5"
}
]
},
{
"@id": "https://example-city.gov/id/contest/2022-mayor",
"@type": "Contest",
"name": "Mayor",
"election": {
"@id": "https://example-city.gov/id/election/2022-general",
"name": "Example City general election, 2022"
},
"contestType": "office",
"electoralSystem": "fptp",
"seatsToFill": 1,
"post": {
"@id": "https://example-city.gov/id/post/mayor",
"name": "Mayor"
},
"validVotes": 23880,
"invalidVotes": 430,
"totalVotes": 24310,
"candidacy": [
{
"@type": "Candidacy",
"@id": "https://example-city.gov/id/candidacy/2022-mayor-smith",
"candidate": {
"@id": "https://example-city.gov/id/person/jane-smith",
"name": "Jane Smith"
},
"party": {
"@id": "https://example-city.gov/id/party/civic-alliance",
"name": "Civic Alliance"
},
"ballotName": "Jane Smith",
"ballotOrder": 1,
"voteCount": 13402,
"candidacyResult": "elected",
"incumbent": false
},
{
"@type": "Candidacy",
"@id": "https://example-city.gov/id/candidacy/2022-mayor-reyes",
"candidate": {
"@id": "https://example-city.gov/id/person/alan-reyes",
"name": "Alan Reyes"
},
"party": {
"@id": "https://example-city.gov/id/party/riverside-independents",
"name": "Riverside Independents"
},
"ballotName": "Alan Reyes",
"ballotOrder": 2,
"voteCount": 10478,
"candidacyResult": "notElected",
"incumbent": true
}
]
},
{
"@id": "https://example-city.gov/id/contest/2022-council-d2",
"@type": "Contest",
"name": "Councilmember, District 2",
"election": {
"@id": "https://example-city.gov/id/election/2022-general"
},
"contestType": "office",
"electoralSystem": "fptp",
"seatsToFill": 1,
"post": {
"@id": "https://example-city.gov/id/post/councilmember-d2",
"name": "Councilmember"
},
"representsJurisdiction": {
"@id": "https://example-city.gov/id/jurisdiction/example-city/district-2",
"name": "District 2"
},
"validVotes": 4611,
"invalidVotes": 88,
"totalVotes": 4699,
"candidacy": [
{
"@type": "Candidacy",
"@id": "https://example-city.gov/id/candidacy/2022-d2-garcia",
"candidate": {
"@id": "https://example-city.gov/id/person/maria-garcia",
"name": "Maria Garcia"
},
"party": {
"@id": "https://example-city.gov/id/party/civic-alliance",
"name": "Civic Alliance"
},
"ballotName": "Maria Garcia",
"ballotOrder": 1,
"voteCount": 2870,
"candidacyResult": "elected",
"incumbent": false
},
{
"@type": "Candidacy",
"@id": "https://example-city.gov/id/candidacy/2022-d2-oliveira",
"candidate": {
"@id": "https://example-city.gov/id/person/tomas-oliveira",
"name": "Tomás Oliveira"
},
"ballotName": "Tomás Oliveira",
"ballotOrder": 2,
"voteCount": 1741,
"candidacyResult": "notElected",
"incumbent": false
}
]
},
{
"@id": "https://example-city.gov/id/contest/2022-measure-a",
"@type": "Contest",
"name": "Measure A — street maintenance bond",
"description": "Authorising $24,000,000 in general obligation bonds for street resurfacing.",
"election": {
"@id": "https://example-city.gov/id/election/2022-general"
},
"contestType": "ballotMeasure",
"electoralSystem": "fptp",
"validVotes": 23615,
"invalidVotes": 695,
"totalVotes": 24310,
"ballotOption": [
{
"@type": "BallotOption",
"voteCount": 15840,
"prevailed": true,
"name": "Yes"
},
{
"@type": "BallotOption",
"voteCount": 7775,
"prevailed": false,
"name": "No"
}
]
},
{
"@id": "https://example-city.gov/id/contest/2026-council-d5",
"@type": "Contest",
"name": "Councilmember, District 5",
"election": {
"@id": "https://example-city.gov/id/election/2026-d5-special",
"name": "Example City District 5 special election, 2026"
},
"contestType": "office",
"electoralSystem": "fptp",
"seatsToFill": 1,
"post": {
"@id": "https://example-city.gov/id/post/councilmember-d5",
"name": "Councilmember"
},
"representsJurisdiction": {
"@id": "https://example-city.gov/id/jurisdiction/example-city/district-5",
"name": "District 5"
}
},
{
"@id": "https://example-city.gov/id/party/civic-alliance",
"@type": "PoliticalParty",
"name": "Civic Alliance",
"identifier": [
{
"@type": "PropertyValue",
"propertyID": "gs:local",
"value": "civic-alliance"
}
]
},
{
"@id": "https://example-city.gov/id/party/riverside-independents",
"@type": "PoliticalParty",
"name": "Riverside Independents",
"identifier": [
{
"@type": "PropertyValue",
"propertyID": "gs:local",
"value": "riverside-independents"
}
]
}
]
}
17 changes: 17 additions & 0 deletions examples/example-city/jurisdictions.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,23 @@
"@id": "https://example-city.gov/id/jurisdiction/example-city",
"name": "Example City"
}
},
{
"@id": "https://example-city.gov/id/jurisdiction/example-city/district-5",
"@type": "AdministrativeArea",
"name": "District 5",
"governmentLevel": "submunicipal",
"identifier": [
{
"@type": "PropertyValue",
"propertyID": "gs:local",
"value": "district-5"
}
],
"containedInPlace": {
"@id": "https://example-city.gov/id/jurisdiction/example-city",
"name": "Example City"
}
}
]
}
Loading
Loading