https://github.com/nlesc/eecology-cartodb
Documentation and script to setup a CartoDB server with eEcology tables
https://github.com/nlesc/eecology-cartodb
Last synced: 5 months ago
JSON representation
Documentation and script to setup a CartoDB server with eEcology tables
- Host: GitHub
- URL: https://github.com/nlesc/eecology-cartodb
- Owner: NLeSC
- License: apache-2.0
- Created: 2015-07-27T12:27:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-20T11:34:29.000Z (over 8 years ago)
- Last Synced: 2025-07-22T09:33:48.740Z (12 months ago)
- Size: 16.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eEcology-CartoDB
Documentation and script to setup a CartoDB server with eEcology tables
[](https://doi.org/10.5281/zenodo.1033929)
Setup cartodb machine see [setup.md](setup.md)
# Create tables
The `gps.ee_*_limited` views from db.e-ecology.sara.nl have been converted in cartodb tables in `gps_limited.cartodb.ddl.sql`.
Tables can be created with:
# Retrieve organization database name
ORGANIZATION_DB=`echo "SELECT database_name FROM users u JOIN organizations o ON u.id=o.owner_id WHERE o.name='ee'" | sudo -u postgres psql -t carto_db_production`
# Create gps schema in organization database
# Create tables in gps schema
# Grant organization select rights on tables
psql -U postgres $ORGANIZATION_DB < gps_limited.cartodb.ddl.sql
# Export tables
Uses postgresql copy command to dump data from the `gps.ee_*_limited` views at db.e-ecology.sara.nl
psql -U someone -h db.e-ecology.sara.nl eecology < export.psql
# Import tables
Import data using postgresql copy command
psql -U cartodb $ORGANIZATION_DB < import.psql