-
Notifications
You must be signed in to change notification settings - Fork 3
Installation for Development
##Instructions for setting up dataShuttle
Clone this repository, then perform the following operations (all commands assume you are in the root of the repo unless otherwise stated):
###Download all components and set up directory structure
drush make ds.make build
Create a symbolic link from build/sites/all/themes/ldp to themes/ldp
Create a symbolic link from build/sites/all/modules/features to features
Create a symbolic link from build/sites/all/modules/custom to modules
cp build/sites/default/default.settings.php build/sites/default/settings.php
Create a virtual host with it's docroot at /build/ then navigate to the site in a web browser and set up Drupal using the default install profile. You will need to create a new database, the Drupal installer will ask for it's name and mysql credentials. Alternatively, you can use the drush site-install command:
drush site-install standard --db-url=mysql://username:pass@localhost/databasename
[edit - last build required this -] drush en rdf; drush en libraries;
Enable datashuttle feature, which will enable everything we need. Evoc throws an error so we then revert and clear cache
cd build
drush en datashuttle -y
drush fr datashuttle -y
drush cc all -y
Log in with the superadmin credentials you created during the Drupal installation.
uuid_nodes does not preserve the "promote" attribute for nodes, so the nodes we want to be promoted to the homepage do not show up. Go to the following node edit pages and check the "Promote to front page" checkbox then save.
node/1/edit
node/2/edit
We use the RDFImporter Feeds plugin to create an indicator node for each Indicator resource in our triple store, and a Topic term for each ICDChapter. RDF Importer is documented rather well in these two screencasts:
- Installing the module + requirements http://vimeo.com/16965880
- Basic usage, importing Linked Data from VIVO http://vimeo.com/16990421
First we must import the ICDChapters into taxonomy terms, then we will import Indicators, which will be associated with topics. Here are step by step instructions for our purposes:
####TOPICS
-
Go to: /import and click on "Topics" - this is the standalone form for our Feeds Importer that's already been configured.
-
Enter http://ec2-79-125-59-17.eu-west-1.compute.amazonaws.com:8890/sparql for "Endpoint"
-
Use the following for "SPARQL query":
SELECT DISTINCT ?s
WHERE { ?s a <http://datashuttle.org/Indicator>}
- Click "Import", if successful you should see the message "Created 22 terms in Topics."
####INDICATORS
-
Go to: /import and click on "Indicators" - this is the standalone form for our Feeds Importer that's already been configured.
-
Enter http://ec2-79-125-59-17.eu-west-1.compute.amazonaws.com:8890/sparql for "Endpoint"
-
Use the following for "SPARQL query":
SELECT DISTINCT ?s
WHERE { ?s a <http://datashuttle.org/Indicator>}
-
Click "Save and refresh preview" and Feeds will run the SPARQL query we've entered, and also find all the properties that are linked with our Indicator resources. Once this operation has finished, you should see that a number of properties have been found.
-
Click Import to run the importer (you can see how the fields are mapped to our "Indicator" nodes by clicking "Edit Mappings" on the same screen)
-
If all goes well, you should now have 115 Indicator nodes created. If you want these nodes these to show up in a search then run cron.php a few times so that they are indexed. We currently have a small hack in datashuttle.module that causes a direct node view to redirect to the appropriate indicator page handled by ctools.
####AREAS / LOCATIONS
-
Go to: /import and click on "Locations" - this is the standalone form for our Feeds Importer that's already been configured.
-
Enter http://ec2-79-125-59-17.eu-west-1.compute.amazonaws.com:8890/sparql for "Endpoint"
-
Use the following for "SPARQL query":
SELECT DISTINCT ?lad ?la_label WHERE {
?s a <http://purl.org/NET/scovo#Item>;
<http://purl.org/NET/scovo#dataset> <http://datashuttle.org/vs3>;
<http://purl.org/NET/scovo#dimension> ?lad.
?lad a <http://statistics.data.gov.uk/def/administrative-geography/LocalAuthorityDistrict>;
<http://statistics.data.gov.uk/def/administrative-geography/localAuthority> ?la.
?la rdfs:label ?la_label
FILTER(str(?la_label) != "")
}
- Click "Import", if successful you should see the message "Created 22 terms in Topics."