outages-to-sqlite

command module
v0.0.0-...-2f78741 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2025 License: BSD-3-Clause Imports: 24 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

outages-to-sqlite

A very work-in-progress program to convert scraped Nova Scotia Power outage data to a SQLite database.

The result is currently visible at https://nsp.datasette.danp.net/outages (powered by Datasette).

In short, this program:

  1. Reads each commit of https://github.com/danp/nspoweroutages, cloning it in memory by default, can be configured with -repo-remote <remote> or -repo-path <path>
  2. Parses the data/outages.json file
  3. Uses the geom.p value (which every outage seems to have) as a key to determine which outages are new, ongoing, or gone
  4. Uses data in the places directory to map the geom.p value to a place (currently at the "county" level)
  5. Emits events to a sqlite database, outages.db by default but can be specified with -database-file <path>

Once the database exists, subsequent runs will fetch the last observed time from the database and read commits from then on, picking up where it left off.

Everything about this is subject to change!

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址