@tabletopandroid/airport-db-data-sqlite 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +1 -1
- package/README.md +7 -6
- package/data/airports.sqlite +0 -0
- package/index.js +2 -2
- package/package.json +3 -2
package/CONTRIBUTING.md
CHANGED
|
@@ -109,7 +109,7 @@ Example adding to generate-db.js:
|
|
|
109
109
|
|
|
110
110
|
```javascript
|
|
111
111
|
db.run(`
|
|
112
|
-
INSERT INTO runways (id,
|
|
112
|
+
INSERT INTO runways (id, airport_id, length_ft, width_ft, surface, lighting)
|
|
113
113
|
VALUES
|
|
114
114
|
('09/27', 'KLZU', 6001, 100, 'asphalt', 1),
|
|
115
115
|
('03/21', 'KLZU', 5000, 75, 'concrete', 1)
|
package/README.md
CHANGED
|
@@ -63,7 +63,8 @@ The `airports.sqlite` file contains the following tables:
|
|
|
63
63
|
|
|
64
64
|
Core airport identity and location data
|
|
65
65
|
|
|
66
|
-
- `
|
|
66
|
+
- `id` (INTEGER, PRIMARY KEY)
|
|
67
|
+
- `icao` (TEXT, UNIQUE)
|
|
67
68
|
- `iata` (TEXT, UNIQUE)
|
|
68
69
|
- `faa` (TEXT)
|
|
69
70
|
- `name` (TEXT)
|
|
@@ -80,7 +81,7 @@ Core airport identity and location data
|
|
|
80
81
|
Runway specifications
|
|
81
82
|
|
|
82
83
|
- `id` (TEXT)
|
|
83
|
-
- `
|
|
84
|
+
- `airport_id` (INTEGER, FOREIGN KEY)
|
|
84
85
|
- `length_ft`, `width_ft`
|
|
85
86
|
- `surface`
|
|
86
87
|
- `lighting`
|
|
@@ -89,28 +90,28 @@ Runway specifications
|
|
|
89
90
|
|
|
90
91
|
Airport facilities
|
|
91
92
|
|
|
92
|
-
- `
|
|
93
|
+
- `airport_id` (INTEGER, FOREIGN KEY, PRIMARY KEY)
|
|
93
94
|
- `has_fbo`, `has_hangars`, `has_tie_downs`
|
|
94
95
|
|
|
95
96
|
### operational
|
|
96
97
|
|
|
97
98
|
AIRAC-aware operational data
|
|
98
99
|
|
|
99
|
-
- `
|
|
100
|
+
- `airport_id` (INTEGER, FOREIGN KEY, PRIMARY KEY)
|
|
100
101
|
- `airac_cycle`
|
|
101
102
|
|
|
102
103
|
### frequencies
|
|
103
104
|
|
|
104
105
|
Radio frequencies
|
|
105
106
|
|
|
106
|
-
- `
|
|
107
|
+
- `airport_id` (INTEGER, FOREIGN KEY, PRIMARY KEY)
|
|
107
108
|
- `atis`, `tower`, `ground`, `clearance`, `unicom`, `approach`, `departure`
|
|
108
109
|
|
|
109
110
|
### fuel_available
|
|
110
111
|
|
|
111
112
|
Available fuel types
|
|
112
113
|
|
|
113
|
-
- `
|
|
114
|
+
- `airport_id` (INTEGER, FOREIGN KEY)
|
|
114
115
|
- `fuel_type`
|
|
115
116
|
|
|
116
117
|
## Why Just the Database?
|
package/data/airports.sqlite
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -10,10 +10,10 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```javascript
|
|
13
|
-
* import { getDatabasePath } from '@
|
|
13
|
+
* import { getDatabasePath } from '@tabletopandroid/airport-db-data-sqlite';
|
|
14
14
|
*
|
|
15
15
|
* const dbPath = getDatabasePath();
|
|
16
|
-
* console.log(dbPath); // /path/to/node_modules/@
|
|
16
|
+
* console.log(dbPath); // /path/to/node_modules/@tabletopandroid/airport-db-data-sqlite/data/airports.sqlite
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
export function getDatabasePath() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tabletopandroid/airport-db-data-sqlite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "SQLite database distribution of airport data for the airport-db ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"generate-db": "node scripts/generate-db.js"
|
|
32
|
+
"generate-db": "node scripts/generate-db.js",
|
|
33
|
+
"import-data": "node scripts/import-csv.cjs"
|
|
33
34
|
},
|
|
34
35
|
"keywords": [
|
|
35
36
|
"airport",
|