https://github.com/hacc2024/kettle-labs
A chrome extension to unlock the full query capability of SQL on Hawaii's OpenData Portal.
https://github.com/hacc2024/kettle-labs
chrome-extension react sql typescript
Last synced: 4 months ago
JSON representation
A chrome extension to unlock the full query capability of SQL on Hawaii's OpenData Portal.
- Host: GitHub
- URL: https://github.com/hacc2024/kettle-labs
- Owner: HACC2024
- License: mit
- Created: 2024-11-09T19:34:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-13T17:11:02.000Z (over 1 year ago)
- Last Synced: 2025-09-08T20:41:50.671Z (10 months ago)
- Topics: chrome-extension, react, sql, typescript
- Language: TypeScript
- Homepage: https://chromewebstore.google.com/detail/hawaii-opendata-hacc/cohalgekdkpklkgcchejaflbdoggbmmo
- Size: 185 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  Hawaii OpenData HACC

A chrome extension to unlock the full query capability of SQL on Hawaii's OpenData Portal `https://opendata.hawaii.gov/`.
###
Now approved in the Chrome Web Store! [[install link](https://chromewebstore.google.com/detail/hawaii-opendata-hacc/cohalgekdkpklkgcchejaflbdoggbmmo)]
## Prerequisites
* [node + npm](https://nodejs.org/) (Current Version)
* [Visual Studio Code](https://code.visualstudio.com/)
* [Chrome Web Browser](https://www.google.com/chrome/)
## Project Structure
* `src/*`: TypeScript source files
* `public/*`: static files
* `dist`: Chrome Extension build directory
## Setup Build
```shell
npm install
# compile production build
npm run build
# watch changes for local development
npm run watch
```
## Installation

To load an unpacked extension in developer mode:
1. Go to the Extensions page by entering `chrome://extensions` in a new tab. (By design `chrome://` URLs are not linkable.)
* Alternatively, click the Extensions menu puzzle button and select **Manage Extensions** at the bottom of the menu.
* Or, click the Chrome menu, hover over **More Tools**, then select **Extensions**.
2. Enable Developer Mode by clicking the toggle switch next to **Developer mode**.
3. Click the Load unpacked button and select the `/dist`.
## Sample Queries
Try these queries out against the [unpaid-expenditures-for-hawaii-state-and-county-candidates](https://opendata.hawaii.gov/dataset/unpaid-expenditures-for-hawaii-state-and-county-candidates/resource/caf4dc69-cf11-43dc-b4f9-3c29156d7630) dataset:
#### top campaign spenders
```sql
with total_spend as (
SELECT
"Candidate Name" as name,
sum("Unpaid Expenditure Amount"::MONEY) as spend
from "caf4dc69-cf11-43dc-b4f9-3c29156d7630"
group by 1
)
SELECT
row_number() over (order by spend desc nulls last) AS rank,
name,
spend
from total_spend
order by spend desc nulls last
limit 10
```
#### observe spend over time grouped by month
```sql
SELECT
date_trunc('month', "Date")::DATE as month,
sum("Unpaid Expenditure Amount"::MONEY) as spend
FROM "caf4dc69-cf11-43dc-b4f9-3c29156d7630"
GROUP BY month
order by month asc
```