The Data Narrator (DANA) is a Masterportal add-on that can be used to add text, photos and images to geo-referenced data sets. In this way, the usually very technical and purely data-based representations can be supplemented with information and more descriptive representations. The data shown is contextualized and complex relationships become easier to understand. Users click their way through a story step by step. You can test the tool here.
To test DANA with an example story go to the GitHub page of the City Science Lab The aforementioned repository includes an example from the real-life experiment 'Mobilities of care'. Topics such as the mobility behavior of unpaid care workers can thus be communicated and located more easily. This is available under the portal configuration called '/mobility-data/'. The example portal configuration is included in this repository in the example folder. A running portal configuration that includes 3D data can be found here
cut.faircare.story.mp4
The main attributes of the story.json configuration file are the follwing:
- "title" - The name of the story
- "author" - The author visible at the story entry page
- "description" - The description of the story shown on the story entry page
- "coverImagePath" - The cover image of the story shown on the story entry page (stored locally in the portal config story folder)
- "htmlFolder" - The folder that contains the steps html files and images
- "isScrollytelling" - Indicator if the story should run as a story to scroll and not to click through
- "chapters" - Array of chapters (e.g. [ { "chapterNumber": 1, "chapterTitle": "title" },)
- "steps" - Array of the story steps
- "isNoCreateMode" - Defines if the option to get to the story creation is displayed
- "storyInterval" - Definition of the automatic playback of a story in millisecond
The story steps attributes in the story.json are the follwing:
- "stepNumber" - Number of the index of the step
- "stepWidth" - The maximal width on screen that will be shown
- "visible" - Set to true if you want to hide the step
- "associatedChapter" - Reference to the chapter number
- "title" - Title of the step (e.g. "Intro")
- "htmlFile" - String of the .html file containing the steps content (e.g. step_1-1.html)
- "centerCoordinate" - Array for the definition of the steps map center position (e.g. [ 555894.6872343315, 5931378.984010641 ])
- "zoomLevel" - Number of the steps map zoom level (e.g. 3)
- "layers" - Array of IDs that define the map layers shown for this step (e.g. [ "128", "129" ])
- "interactionAddons" - Array of strings that indicating the active addons for this step (e.g. [ "gfi", "measure"])
- "is3D" - Boolean indicating if the 3D map is activated for this step
- "navigation3D": - If 'is3D' is true, then this attribute contains the camera configuration. (e.g. { "cameraPosition": [ 9.948301, 53.552374, 343.8 ], "heading": 0.38138509963163635, "pitch": -0.4525214263618002 }) In the case of a 3D mode, the attributes 'zoomLevel' and 'centerCoordinate' are obsolete
After creating your story in the creator section of the Data Narrator, you can download the story as zip file.
The zip file contains a story.json
and, in case you added HTML content to your story, a story
folder. You can access
the story creator here.
Example
story.zip content folder structure
story.zip
|-- story.json
|-- story
| step_1-1.html
| step_2-1.html
| step_2-2.html
| |-- images
| | |-- step_1-1_1.png
| | |-- step_1-1_2.jpg
To explore your own story in the Data Narrator:
- place the content of the zip file in your portal config folder
- add a
storyConf
parameter to theConfig
in your portal'sconfig.js
with the path to thestory.json
as value
Example
portal folder structure
masterportal/portal
|-- my_portal
| config.js
| config.json
| index.html
| |-- story.json
| |-- story
| | step_1-1.html
| | step_2-1.html
| | step_2-2.html
| | |-- images
| | | |-- step_1-1_1.png
| | | |-- step_1-1_2.jpg
The configuration of the Data Narrator addon in the config.json can include the following parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
active | no | Boolean | false | Whether the tool is initially opened or not. |
name | no | String | Data Narrator | Name of the tool in the menu. |
glyphicon | no | String | glyphicon-book | CSS class of the glyphicons, which is displayed before the name of the tool in the menu. |
renderToWindow | no | Boolean | true | Whether the tools is rendered in a separate window or not. |
resizableWindow | no | Boolean | true | Whether the tool window is resizeable or not. |
isVisibleInMenu | no | Boolean | true | Whether the tool is visible in the menu or not. |
deactivateGFI | no | Boolean | false | If set to true , the filter tool deactivates GFI requests while open. |
initialWidth | no | Number | 500 | The initial width of the tool. |
initialWidthMobile | no | Number | 300 | The initial width of the tool on mobile devices. |
Example
"dataNarrator": {
"name": "Data Narrator",
"glyphicon": "glyphicon-book"
}
You also have to adjust the config.js and add the following parameters.
Example
const Config = {
addons: ["dataNarrator"],
storyConf: "./story.json"
}
Quick setup of a local version of the storytelling tool.
Deploy the frontend (masterportal and pulled addon from the Dipass Addons repository) to Docker. Install Docker on your local machine, pull this repository and execute the following command.
docker-compose up
Default URL for the application deployed on your local machine is: http://localhost/mobility-data/
You can also start the application with npm if you plan on connecting a database, creating a new story or adjusting the code to your needs.
Install Node.js. Last known working version is v10.18.0 LTS with NPM version 6.13.4.
Execute the git bash as admin and navigate to the folder the repository is to be cloned to.
Clone the repository and navigate to the folder created:
git clone https://github.com/citysciencelab/cut-data-narrator.git
Navigate to the addons folder and into it clone the dipasAddons
git clone https://[email protected]/geowerkstatt-hamburg/dipas-masterportal-addons.git
Install the node_modules
required for the addons:
Step 1:
cd cut-data-narrator\addons\dipasAddons\dataNarrator
npm install
Install the node_modules
required for the Masterportal:
cd cut-data-narrator
npm install
With this, all dependencies are installed.
Add the following attributes to config.js of your configured portal:
addons: ["storyTellingTool"],
vuetify: "addons/storyTellingTool/vuetify",
storyConf: "./ressources/story.json",
uiStyle: "table",
Add the following line to index.html of your configured portal:
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
Copy and potentially replace the file
cut-data-narrator\portal\addonsConf.json
to
cut-data-narrator\addons\
In case you need further information about how add-ons configured and developed, please refer to the add-ons documentation for further assistance.
This command will start a local development server.
npm start
- After compilation, you may open the following links for comprehensive demo applications:
- https://localhost:9001/portal/mobility-data Portal that includes the initial Faircare story as well as the data gathering tool
An example story can be found in the folder:
portal\mobility-data\assets
The stories are referenced in the storyConf variable in the config.js.
Official website of the Masterportal
The Masterportal is a tool-kit to create geo web applications based on OpenLayers , Vue.js and Backbone.js. The Masterportal is Open Source Software published under the MIT License.
The Masterportal is a project by Geowerkstatt Hamburg.