https://github.com/markush/berlin-school-data
https://github.com/markush/berlin-school-data
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/markush/berlin-school-data
- Owner: MarkusH
- License: bsd-3-clause
- Created: 2014-06-01T09:27:42.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-21T16:12:56.000Z (about 11 years ago)
- Last Synced: 2025-01-26T05:15:09.412Z (9 months ago)
- Language: CSS
- Homepage: https://markusholtermann.eu/2014/08/using-elasicsearch-as-relational-data-storage/
- Size: 639 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Data importer
## Installation
```shell
$ cd importer
$ pip install --user .
```
## Usage
Set up the new index mapping:
```shell
$ importer setup
```
Index all data:
```shell
$ importer load_data clean_schools.csv clean_accessibility.csv \
clean_addresses.csv clean_equipments.csv \
clean_languages.csv clean_schools_ext.csv \
clean_personal.csv
```
Clear existing data:
```shell
$ importer clear
```
If Elasticsearch doesn't listen on `127.0.0.1:9200` include `--es-hosts
'example.com:1234'` as an argument to `importer`:
```shell
$ importer --es-hosts 'example.com:1234' setup
```
If you are running Elasticsearch on a publicly accessible ip and port, you
should lock it down and import data via an SSH tunnel:
```shell
ssh -NfL 9222:localhost:9200 example.com
```
Now use `--es-hosts 'localhost:9222'` for the commands
## Help
### `importer`
```shell
Usage: importer [OPTIONS] COMMAND [ARGS]...
Options:
--es-hosts TEXT
--help Show this message and exit.
Commands:
clear
load_data
setup
```
### `importer clear`
```shell
Usage: importer clear [OPTIONS]
Options:
--help Show this message and exit.
```
### `importer load_data`
```shell
Usage: importer load_data [OPTIONS] SCHOOLS ACCESSIBILITY ADDRESSES EQUIPMENTS
LANGUAGES SCHOOLS_EXT PERSONELL
Options:
--help Show this message and exit.
```
### `importer setup`
```shell
Usage: importer setup [OPTIONS]
Options:
--help Show this message and exit.
```