Skip to content

kcondon/geoconnect

 
 

Repository files navigation

To use Geoconnect, please email [email protected] with the URL to your Dataverse installation._

Note: _These instructions need to be updated and should not be used if setting up a Dataverse installation because you would also need to install WorldMap, which is being rewritten. You should wait until the WorldMap rewrite is complete before considering installing Geoconnect.

geoconnect

GeoConnect works as a middle layer, allowing Dataverse files to be visualized on the Harvard WorldMap.

Boston Area Research Initiative project to connect the Dataverse to the Worldmap.

Use Cases

  • Add a GIS dataset to the Dataverse and visualize it on the WorldMap
  • From the WorldMap, search for Dataverse datasets in a given geographic area for a specific time period

geoconnect screenshot

Local Installation Instructions

Install pip

  • use sudo if needed
  • if on Windows, make sure python is installed.
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh

or, on windows, this might be helpful.

Pull down the geoconnect repository

Setup on the local machine

cd into the geoconnect repository

cd ~\geoconnect

Install the virtualenv and the requirements

This may take a minute or two. Xcode needs to be installed.

mkvirtualenv geoconnect
pip install -r requirements/local.txt

If you run into Xcode (or other errors) when running the install, google it. Sometimes the Xcode license agreement hasn't been accepted

Configure settings (still in ~\geoconnect)

vim $VIRTUAL_ENV/bin/postactivate

On windows:

vim %VIRTUAL_ENV%\Scripts\activate.bat

'vim' may be any text editor

  • add these lines to the postactivate file and save the file
export DJANGO_DEBUG=True
export DJANGO_SETTINGS_MODULE=geoconnect.settings.local

On windows:

set "DJANGO_DEBUG=True"
set "DJANGO_SETTINGS_MODULE=geoconnect.settings.local"
  • Test the 'postactivate' script from the command line
deactivate
workon geoconnect
echo $DJANGO_SETTINGS_MODULE

On Windows, use:

echo %DJANGO_SETTINGS_MODULE%

You should see geoconnect.settings.local

Create/sync the database (still in ~\geoconnect)

#Create/sync the database (still in ~\geoconnect)
python manage.py migrate    # step 1 for a new database
python manage.py migrate --run-syncdb  # step 2 for a new database

#python manage.py  migrate --fake-initial # if the tables already exist
  • Add initial database
python manage.py loaddata --app registered_dataverse incoming_filetypes_initial_data.json
python manage.py loaddata --app layer_classification initial_data.json
  • To run on a localhost, add this data: python manage.py loaddata --app registered_dataverse registered_dv_localhost.json

  • Create a superuser

python manage.py createsuperuser

Run the test server (still in ~\geoconnect\geoconnect)

python manage.py runserver 8070
  1. Check if the server is up: http://127.0.0.1:8070
  2. Check if the admin page is available: http://127.0.0.1:8070/geo-connect-admin/
  • if (1) and (2), feel grateful to be alive

Re-run the test server

cd ~/geoconnect/ # example: cd /Users/mheppler/iqss-github/geoconnect
workon geoconnect
atom .  # to open in ATOM
python manage.py runserver 8070

Dataverse settings

Dataverse needs these settings to work on mapping.

Dataverse config settings

INSERT into setting VALUES (':GeoconnectCreateEditMaps', 'true');
INSERT into setting VALUES (':GeoconnectViewMaps', 'true');

Dataverse setting for the 'mapitlink'

  • If GEOCONNECT entry doesn't exist, use:
INSERT INTO worldmapauth_tokentype (contactemail, hostname, ipaddress, mapitlink, name, timelimitminutes, timelimitseconds, md5, created, modified)
VALUES ('[email protected]', '127.0.0.1:8070', '127.0.0.1:8070', 'http://127.0.0.1:8070/shapefile/map-it', 'GEOCONNECT', 30, 1800, '38c0a931b2d582a5c43fc79405b30c22', NOW(), NOW())
  • If GEOCONNECT entry already exists, use:
UPDATE worldmapauth_tokentype SET mapitlink = 'http://127.0.0.1:8070/shapefile/map-it' WHERE name = 'GEOCONNECT';

About

A connector between Dataverse and WorldMap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 79.6%
  • HTML 12.3%
  • CSS 5.3%
  • JavaScript 2.6%
  • Shell 0.2%