You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains utility scripts for the GeoIDs.jl package.
4
+
5
+
## populate_geoids.jl
6
+
7
+
This script populates the GeoIDs database tables with all predefined datasets from the PredefinedSets module. It should be run once to initialize the database with standard geographic region definitions.
8
+
9
+
### Usage
10
+
11
+
```bash
12
+
julia populate_geoids.jl [--force] [--verbose]
13
+
```
14
+
15
+
### Options
16
+
17
+
-`--force`: Forcibly recreate sets even if they already exist
18
+
-`--verbose`: Print detailed information about each operation
19
+
20
+
### Example
21
+
22
+
Basic usage:
23
+
24
+
```bash
25
+
julia populate_geoids.jl
26
+
```
27
+
28
+
Verbose output with forced recreation:
29
+
30
+
```bash
31
+
julia populate_geoids.jl --force --verbose
32
+
```
33
+
34
+
### Execution Through GeoIDs Module
35
+
36
+
The script functionality is also automatically executed when you first load the GeoIDs module through the `initialize_predefined_geoid_sets()` function called in the module's `__init__()`. However, this script provides more detailed feedback and control over the process.
37
+
38
+
### Requirements
39
+
40
+
This script requires:
41
+
42
+
1. A properly configured PostgreSQL database
43
+
2. The GeoIDs.jl package installed and accessible in your Julia environment
44
+
3. The required database tables (created automatically if they don't exist)
45
+
46
+
### Environment Variables
47
+
48
+
The script uses the following environment variables to connect to the database:
49
+
50
+
-`GEOIDS_DB_NAME`: Database name (defaults to "tiger")
51
+
-`GEOIDS_DB_HOST`: Database host (defaults to "localhost")
52
+
-`GEOIDS_DB_PORT`: Database port (defaults to "5432")
53
+
54
+
No username/password authentication is used by default, as the script assumes socket authentication.
0 commit comments