百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

election-au-2016

> 编程语言
开源

2016年澳大利亚大选的源代码可视化

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

2016年澳大利亚大选的源代码可视化

Australian Election 2016 Application

See LICENSE for usage and distribution restrictions.

Summary

In 2016 there was a national election in Australia, this application was used to show the current state of the nation, where it was possible to vote, and once voting had closed the live results as they came in.

It consists of three main components:

  1. A dart-based client (under dart_frontend). This is an Angular2 application which uses a simple read-only HTTP API to get geospatial data combined with Firebase to have real-time data and application state.

  2. A go-based server (under go_backend). This was responsible for serving the static geospatial data, as well as the physical locations of polling places. It was also capable of computing the electorate for a given location.

  3. [Not Included]: A utility that read various data sources (predominantly the AEC) for the state of the election and pushed this data to Firebase. It is possible to understand the Firebase schema readily from the running website or from the firebase_service.

The live version of this website is visible at: https://ausvotes.withgoogle.com

Dependencies

You'll need:

  • Docker - without need for sudo-prefix.
  • Go - ensure GOPATH is set.
  • Dart
  • Make
  • If using Appengine Go Appengine
  • A Google Maps API key, for the go backend and the dart frontend.

Please also ensure you comply with the various [licenses] (./LICENSE).

Running the Application

Running Locally - go backend

To run the go backend locally:

bash
make
./serve

If all the dependencies are met, make will create the dataset, build the go application and the dart frontend.

Access the local server at http://localhost:8090/.

Running Locally - Dart frontend

To run the frontend client against an existing backend:

bash
make
cd dart_frontend
pub serve

Access the local server at http://localhost:8080/.

You can edit [dart_frontend/lib/conf/config_debug.yaml] (dart_frontend/lib/conf/config_debug.yaml) to modify pub serve's backend.

Deployment to Appengine

To deploy to appengine, ensure the cloned project is associated with an appengine project (normally done via https://console.cloud.google.com/code/develop). Once that's done, you should be able run make install.

Examples of the Raw API

The following REST requests show how the Go App Engine hosted API can be used to make queries against the shape data that is used to show electorates on the map.

Which electorates are in this viewport?

Request:

/viewport/11?bbox=-12.73,130.83,-12.26,131.2

Response:

…

Fetch the geometry for electorates Lingiari and Solomon

Note: For readability, allowEncodedPolylineFeatureCollection in [go_backend/http.go] (go_backend/http.go) was set to false for generating this output. The application otherwise sends an encoded polyline JSON response, to reduce payload size. The client can work with either formats.

Request:

/electorates/6?ids=lingiari,solomon

Response (truncated):

…

This is not an official Google product

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言