-
Notifications
You must be signed in to change notification settings - Fork 542
3643 geoconnect guide #3792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
3643 geoconnect guide #3792
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c205474
Initial commit - halfway draft of worldmap user guide [ref #3643]
dlmurphy 1784680
Added Geoconnect set up info to Developers and Installation guides. […
mheppler 7baafff
Completed user guide for GeoConnect
dlmurphy 3a02454
Fixed capitalization of Geoconnect [ref: #3643]
dlmurphy 6067f2c
Geoconnect admin guide - typo fix [ref: 3643]
dlmurphy 4e3bc61
Geoconnect Dev Guide Proofreading [ref #3643 ]
dlmurphy 01b1825
Geoconnect installation guide - typo fix [ref #3643 ]
dlmurphy 1878b03
Fixed bad image file ref paths for WorldMap pg in User Guide. [ref #3…
mheppler bc1ee5c
Merge branch 'develop' into 3643-geoconnect-guide
mheppler 9b1827a
Further geoconnect user guide edits [ref: #3643]
dlmurphy a62a4bb
Revisions for Geoconnect info in Admin, Developer and Installation gu…
mheppler aea9ccf
many tweaks to geoconnect guide content (details below) #3643
pdurbin ddff04d
User guide - info about viewing maps [ref: #3643]
dlmurphy 7567712
typo #3643
pdurbin fb5028f
Fixed duplicate content sections issue on Dataset + File Management p…
mheppler abf1775
Revisions to Geoconnect documentation in Developer Guide, moved most …
mheppler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,174 @@ | ||
| =============== | ||
| Geospatial Data | ||
| =============== | ||
|
|
||
| How Dataverse Ingests Shapefiles | ||
| -------------------------------- | ||
|
|
||
| A shapefile is a set of files, often uploaded/transferred in ``.zip`` format. This set may contain up to fifteen files. A minimum of three specific files (``.shp``, ``.shx``, ``.dbf``) are needed to be a valid shapefile and a fourth file (``.prj``) is required for WorldMap -- or any type of meaningful visualization. | ||
|
|
||
| For ingest and connecting to WorldMap, four files are the minimum required: | ||
|
|
||
| - ``.shp`` - shape format; the feature geometry itself | ||
| - ``.shx`` - shape index format; a positional index of the feature geometry to allow seeking forwards and backwards quickly | ||
| - ``.dbf`` - attribute format; columnar attributes for each shape, in dBase IV format | ||
| - ``.prj`` - projection format; the coordinate system and projection information, a plain text file describing the projection using well-known text format | ||
|
|
||
| Ingest | ||
| ~~~~~~ | ||
|
|
||
| When uploaded to Dataverse, the ``.zip`` is unpacked (same as all ``.zip`` files). Shapefile sets are recognized by the same base name and specific extensions. These individual files constitute a shapefile set. The first four are the minimum required (``.shp``, ``.shx``, ``.dbf``, ``.prj``) | ||
|
|
||
| For example: | ||
|
|
||
| - bicycles.shp (required extension) | ||
| - bicycles.shx (required extension) | ||
| - bicycles.prj (required extension) | ||
| - bicycles.dbf (required extension) | ||
| - bicycles.sbx (NOT required extension) | ||
| - bicycles.sbn (NOT required extension) | ||
|
|
||
| Upon recognition of the four required files, Dataverse will group them as well as any other relevant files into a shapefile set. Files with these extensions will be included in the shapefile set: | ||
|
|
||
| - Required: ``.shp``, ``.shx``, ``.dbf``, ``.prj`` | ||
| - Optional: ``.sbn``, ``.sbx``, ``.fbn``, ``.fbx``, ``.ain``, ``.aih``, ``.ixs``, ``.mxs``, ``.atx``, ``.cpg``, ``shp.xml`` | ||
|
|
||
| Then Dataverse creates a new ``.zip`` with mimetype as a shapefile. The shapefile set will persist as this new ``.zip``. | ||
|
|
||
| Example | ||
| ~~~~~~~ | ||
|
|
||
| **1a.** Original ``.zip`` contents: | ||
|
|
||
| A file named ``bikes_and_subways.zip`` is uploaded to the Dataverse. This ``.zip`` contains the following files. | ||
|
|
||
| - ``bicycles.shp`` (shapefile set #1) | ||
| - ``bicycles.shx`` (shapefile set #1) | ||
| - ``bicycles.prj`` (shapefile set #1) | ||
| - ``bicycles.dbf`` (shapefile set #1) | ||
| - ``bicycles.sbx`` (shapefile set #1) | ||
| - ``bicycles.sbn`` (shapefile set #1) | ||
| - ``bicycles.txt`` | ||
| - ``the_bikes.md`` | ||
| - ``readme.txt`` | ||
| - ``subway_line.shp`` (shapefile set #2) | ||
| - ``subway_line.shx`` (shapefile set #2) | ||
| - ``subway_line.prj`` (shapefile set #2) | ||
| - ``subway_line.dbf`` (shapefile set #2) | ||
|
|
||
| **1b.** Dataverse unzips and re-zips files: | ||
|
|
||
| Upon ingest, Dataverse unpacks the file ``bikes_and_subways.zip``. Upon recognizing the shapefile sets, it groups those files together into new ``.zip`` files: | ||
|
|
||
| - files making up the "bicycles" shapefile become a new ``.zip`` | ||
| - files making up the "subway_line" shapefile become a new ``.zip`` | ||
| - remaining files will stay as they are | ||
|
|
||
| To ensure that a shapefile set remains intact, individual files such as ``bicycles.sbn`` are kept in the set -- even though they are not used for mapping. | ||
|
|
||
| **1c.** Dataverse final file listing: | ||
|
|
||
| - ``bicycles.zip`` (contains shapefile set #1: ``bicycles.shp``, ``bicycles.shx``, ``bicycles.prj``, ``bicycles.dbf``, ``bicycles.sbx``, ``bicycles.sbn``) | ||
| - ``bicycles.txt`` (separate, not part of a shapefile set) | ||
| - ``the_bikes.md`` (separate, not part of a shapefile set) | ||
| - ``readme.txt`` (separate, not part of a shapefile set) | ||
| - ``subway_line.zip`` (contains shapefile set #2: ``subway_line.shp``, ``subway_line.shx``, ``subway_line.prj``, ``subway_line.dbf``) | ||
|
|
||
| For two "final" shapefile sets, ``bicycles.zip`` and ``subway_line.zip``, a new mimetype is used: | ||
|
|
||
| - Mimetype: ``application/zipped-shapefile`` | ||
| - Mimetype Label: "Shapefile as ZIP Archive" | ||
|
|
||
| WorldMap JoinTargets + API Endpoint | ||
| ----------------------------------- | ||
|
|
||
| WorldMap supplies target layers -- or JoinTargets -- that a tabular file may be mapped against. A JSON description of these `CGA <http://gis.harvard.edu>`_-curated JoinTargets may be retrieved via API at ``http://worldmap.harvard.edu/datatables/api/jointargets/``. Please note: login is required. You may use any WorldMap account credentials via HTTP Basic Auth. | ||
|
|
||
| Example of JoinTarget information returned via the API: | ||
|
|
||
| .. code-block:: json | ||
|
|
||
| { | ||
| "data":[ | ||
| { | ||
| "layer":"geonode:census_tracts_2010_boston_6f6", | ||
| "name":"Census Tracts, Boston (GEOID10: State+County+Tract)", | ||
| "geocode_type_slug":"us-census-tract", | ||
| "geocode_type":"US Census Tract", | ||
| "attribute":{ | ||
| "attribute":"CT_ID_10", | ||
| "type":"xsd:string" | ||
| }, | ||
| "abstract":"As of the 2010 census, Boston, MA contains 7,288 city blocks [truncated for example]", | ||
| "title":"Census Tracts 2010, Boston (BARI)", | ||
| "expected_format":{ | ||
| "expected_zero_padded_length":-1, | ||
| "is_zero_padded":false, | ||
| "description":"Concatenation of state, county and tract for 2010 Census Tracts. Reference: https://www.census.gov/geo/maps-data/data/tract_rel_layout.html\r\n\r\nNote: Across the US, this can be a zero-padded \"string\" but the original Boston layer has this column as \"numeric\" ", | ||
| "name":"2010 Census Boston GEOID10 (State+County+Tract)" | ||
| }, | ||
| "year":2010, | ||
| "id":28 | ||
| }, | ||
| { | ||
| "layer":"geonode:addresses_2014_boston_1wr", | ||
| "name":"Addresses, Boston", | ||
| "geocode_type_slug":"boston-administrative-geography", | ||
| "geocode_type":"Boston, Administrative Geography", | ||
| "attribute":{ | ||
| "attribute":"LocationID", | ||
| "type":"xsd:int" | ||
| }, | ||
| "abstract":"Unique addresses present in the parcels data set, which itself is derived from [truncated for example]", | ||
| "title":"Addresses 2015, Boston (BARI)", | ||
| "expected_format":{ | ||
| "expected_zero_padded_length":-1, | ||
| "is_zero_padded":false, | ||
| "description":"Boston, Administrative Geography, Boston Address Location ID. Example: 1, 2, 3...nearly 120000", | ||
| "name":"Boston Address Location ID (integer)" | ||
| }, | ||
| "year":2015, | ||
| "id":18 | ||
| }, | ||
| { | ||
| "layer":"geonode:bra_neighborhood_statistical_areas_2012__ug9", | ||
| "name":"BRA Neighborhood Statistical Areas, Boston", | ||
| "geocode_type_slug":"boston-administrative-geography", | ||
| "geocode_type":"Boston, Administrative Geography", | ||
| "attribute":{ | ||
| "attribute":"BOSNA_R_ID", | ||
| "type":"xsd:double" | ||
| }, | ||
| "abstract":"BRA Neighborhood Statistical Areas 2015, Boston. Provided by [truncated for example]", | ||
| "title":"BRA Neighborhood Statistical Areas 2015, Boston (BARI)", | ||
| "expected_format":{ | ||
| "expected_zero_padded_length":-1, | ||
| "is_zero_padded":false, | ||
| "description":"Boston, Administrative Geography, Boston BRA Neighborhood Statistical Area ID (integer). Examples: 1, 2, 3, ... 68, 69", | ||
| "name":"Boston BRA Neighborhood Statistical Area ID (integer)" | ||
| }, | ||
| "year":2015, | ||
| "id":17 | ||
| } | ||
| ], | ||
| "success":true | ||
| } | ||
|
|
||
| How Geoconnect Uses Join Target Information | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| When a user attempts to map a tabular file, the application looks in the Geoconnect database for ``JoinTargetInformation``. If this information is more than 10 minutes* old, the application will retrieve fresh information and save it to the db. | ||
|
|
||
| (* Change the timing via the Django settings variable ``JOIN_TARGET_UPDATE_TIME``.) | ||
|
|
||
| This JoinTarget info is used to populate HTML forms used to match a tabular file column to a JoinTarget column. Once a JoinTarget is chosen, the JoinTarget ID is an essential piece of information used to make an API call to the WorldMap and attempt to map the file. | ||
|
|
||
| Retrieving Join Target Information from WorldMap API | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The ``get_join_targets()`` function in ``dataverse_layer_services.py`` uses the WorldMap API, retrieves a list of available tabular file JointTargets. (See the `dataverse_layer_services code in GitHub <https://github.com/IQSS/geoconnect/blob/master/gc_apps/worldmap_connect/dataverse_layer_services.py#L275>`_.) | ||
|
|
||
| Saving Join Target Information to Geoconnect Database | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The ``get_latest_jointarget_information()`` in ``utils.py`` retrieves recent JoinTarget Information from the database. (See the `utils code in GitHub <https://github.com/IQSS/geoconnect/blob/master/gc_apps/worldmap_connect/utils.py#L16>`_.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,4 +20,5 @@ Contents: | |
| making-releases | ||
| tools | ||
| unf/index | ||
| geospatial | ||
| selinux | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| Geoconnect | ||
| ========== | ||
|
|
||
| Geoconnect works as a middle layer, allowing geospatial data files in Dataverse to be visualized with Harvard WorldMap. | ||
|
|
||
| To understand the feature from the user perspective, see the :doc:`/user/data-exploration/worldmap` section of the User Guide. | ||
|
|
||
| As of this writing, the README at https://github.com/IQSS/geoconnect recommends not installing Geoconnect at this time due to an ongoing rewrite of the WorldMap code. If you are not deterred by this, read on! | ||
|
|
||
| To set up a Geoconnect development environment, you can follow the steps outlined in the `local_setup.md <https://github.com/IQSS/geoconnect/blob/master/local_setup.md>`_ guide. Although those instructions are for a local development setup, they may assist in installing Geoconnect in your production environment. See also "Geoconnect" under the :doc:`/developers/dev-environment` section of the Developer Guide. | ||
|
|
||
| Harvard Dataverse runs Geoconnect on Heroku. To make use of Heroku, you will need a Heroku account, as well as a few other prerequisites. Follow the instructions outlined in the `heroku_setup.md <https://github.com/IQSS/geoconnect/blob/master/heroku_setup.md>`_ guide. The `heroku.py <https://github.com/IQSS/geoconnect/blob/master/geoconnect/settings/heroku.py>`_ settings file may also be adapted for other environments. Please note, for the production environment, remember to set ``DEBUG=False``. | ||
|
|
||
| See also the :doc:`/admin/geoconnect-worldmap` section of the Admin Guide. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,5 +18,6 @@ Contents: | |
| administration | ||
| upgrading | ||
| r-rapache-tworavens | ||
| geoconnect | ||
| shibboleth | ||
| oauth2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+43.1 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+170 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.9 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+70.7 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.2 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.2 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.9 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.3 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+689 KB
doc/sphinx-guides/source/user/data-exploration/img/geoconnect-tabular-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Geoconnect README we say, "You should wait until the WorldMap rewrite is complete before considering installing Geoconnect." Should we explain on this page that people installing Dataverse are welcome to use the two servers below that are hosted by Harvard?