Getting started

Preparing and publishing a Pattrn instance is quick and easy: in this section of the Pattrn manual you will learn:

  • how to retrieve the Pattrn source code
  • how to configure it to use your dataset of events (we will use a sample dataset for this tutorial; later sections of this manual explain in detail how to check, clean up and configure your own data for Pattrn)
  • how to publish your first Pattrn app on the web

Working through this example step by step should take around ten minutes. After working through this tutorial you will have a fully working Pattrn instance with the sample dataset and you should be able to repeat the process with your own datasets.

If you require any assistance please get in touch with the Pattrn team (see the Contacts section of this manual).

Later sections of this manual provide more advanced guidance on:

  • how to set up a Pattrn instance using Google Sheets to host the Pattrn dataset
  • how to set up and use the Pattrn Editor to allow crowdsourcing of event data
  • how to fully configure a Pattrn instance with all the advanced features available for complex data science projects

Prerequisites

Before starting this getting started tutorial, you need to sign up for a free account on the Netlify content publishing platform. We will use the Netlify service to publish the Pattrn app and data, by dragging-and-dropping the Pattrn files from a local folder to the Netlify app in the browser.

It will also be helpful—especially for Windows users—to have a text editor installed on your computer if you don’t have one already: if in doubt, we advise to install the free and open source Atom editor. Please note that a visual document editor such as LibreOffice Write or Microsoft Word will not allow you to edit the files needed to configure Pattrn saving them in the required, plain-text format (you could actually do this using specific settings, but it’s much preferrable to use a proper text editor instead.

Step one: Getting the Pattrn code

Download the latest Pattrn source code here:

https://github.com/pattrn-project/pattrn/releases

Click on the zip (for Windows users) or tar.gz (for macOS or GNU/Linux users) download link next to the most recent release to download an archive with the Pattrn app code to your computer.

Extract the contents of the archive and navigate to the extracted folder (its name is pattrn).

Within the Pattrn source code, we will be working inside of the subfolder called dist: this contains just the

Step three: Publishing the Pattrn app

Log in to your Netlify account at https://netlify.com/.

Navigate to the list of your sites on Netlify: https://app.netlify.com/sites.

Here you can create and publish a new website simply by dragging a folder from your computer to the area at the bottom of this page (the area surrounded by a dashed line, with the message “Need to share a quick prototype or publish a simple mockup? Drag a folder with a static site here.”).

In order to publish the Pattrn app you have just finished configuring, navigate to the Pattrn folder and drag its dist folder to the target area on the Netlify sites page.

As the files are being uploaded and processed by the Netlify web app, visual feedback on the progress will be displayed on the web page, until the Pattrn app is fully published. Its web address will be displayed on the site’s configuration page within the Netlify dashboard. By default a random address such as https://secure-synapse-12345.netlify.com will be allocated by Netlify, and this can be customised later through the Netlify dashboard.

Creating a new Pattrn instance with your own data

Congratulations! Your first Pattrn instance is now published and its data can be explored online. If you wish to create a new instance using your own dataset now, you may wish to go through this tutorial again, but using your own GeoJSON data file, metadata and settings instead. If you wish to make sure your dataset is ready for use with Pattrn, we recommend that you read the section of this manual about Preparing your data for Pattrn first.