Skip to content

Instantly share code, notes, and snippets.

@fogonwater
fogonwater / dnz_agent_edm.md
Last active August 29, 2015 14:17
Attempts to describe the artist Rita Angus as an EDM Agent contextual entity.

JSON-LD EDM experiments

This gist contains two attempts to describe the artist Rita Angus as an EDM Agent contextual entity using the JSON-LD format. They are intended to facilitate conversation between DigitalNZ and Europeana rather than indicate a final data format.

  • rita_angus_v1.json is close to the examples expressed in the "JSON-LD profile for EDM contextual entities" proposal document.
  • rita_angus_v2a.json deviates significantly from the v1 context mapping structure. The document's fieldnames are terms like name and description, which differ from the EDM Agent schema skos:prefLabel and rdaGr2:biographicalInformation fields.
  • rita_angus_v2b.json references the @context section rather then presenting it inline. This is the default format that we are likely to adopt.

The rita_angus_v2 examples follows the model presented by Manu Spooney in the JSON-LD W3.org context specs. See: [EXAMPLE 5: In-line context defini

@fogonwater
fogonwater / README.md
Last active August 29, 2015 14:21
Recommended reading for Indie Maps + DIY Cartography workshop.

Recommended reading for Indie Maps + DIY Cartography Auckland Laneway Learning class.

Useful / inspirational books

  • "Everything Sings: Maps for a Narrative Atlas", Denis Wood (2010).
  • "You Are Here: Personal Geographies and Other Maps of the Imagination", Katharine Harmon (2003).
  • "Mapping It Out: Expository Cartography for the Humanities and Social Sciences", Mark Monmonier (1993).
  • "Semiology of Graphics: Diagrams, Networks, Maps", Jacques Bertin (1983)
  • "Maps and Diagrams", F. J. Monkhouse and H. R. Wilkinson (1952).

Online goodness

@fogonwater
fogonwater / index.html
Created July 22, 2015 00:43
DNZ People Timelines
<!DOCTYPE html>
<html>
<head>
<title>people's lives</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<style type="text/css">
html {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
@fogonwater
fogonwater / README.md
Last active November 19, 2015 03:56
Data Poets' Society notes. Inaugural gathering, 18 August, 2015.

The Data Poets' Society is a Twitter joke that grew into a group who meet every couple of months to talk about data, visualisation and storytelling. We are scientists, artists, journalists, software developers, business professionals, students, museum folk, historians and geographers. We don't do formal talks. Instead we have a brief show and tell at the start of each meeting and spend the rest of the time sharing anecdotes and ideas over drinks and food.

At our first meeting we compiled a list of things we wanted to get out of Auckland Data Poets' Society. The numbers in brackets indicate how many votes an item received.

  • (8) "Art" of data visualisation.
  • (6) Seeing other peoples' stuff.
  • (5) Telling stories with data.
  • (5) Making stuff.
  • (4) Understanding the craft*.
  • (4) Exploring possible concepts.
@fogonwater
fogonwater / README.md
Last active December 14, 2015 19:49
Matplotlib map for world’s top ten most populated cities
@fogonwater
fogonwater / README.md
Last active December 30, 2015 01:09
Tuhonohono metadata harvester
@fogonwater
fogonwater / README.md
Last active December 30, 2015 19:49
Uncertain carto styles

Notes on how I organise StatisticsNZ CSVs

This write-up details how I re-structure and organise StatisticsNZ CSVs. It makes no mention of how I handle particular data values and codes (e.g. datetimes, missing and confidential values). My practice changes a little between projects, but typically I end up with a structure along the following lines:

  • I remove all footnotes and metadata.
  • I separate data measured at different scales into different CSVs (e.g. meshblock data goes in a different file from area units).
  • I remove all total rows.
  • I rename all columns with concise but meaningful shortnames so they are easier refer to in code.
  • I generate a JSON file containing key metadata and mappings between my shortnames and the original long fieldnames.

My d3.js starter template.

This is the little bit of scaffolding I typically use when starting a d3.js project. I typically separate the Javascript from the HTML, but it's included here for convenience. In addition to d3.js v4, this example uses:

@fogonwater
fogonwater / README.md
Last active September 15, 2016 02:18
Notes on handling elevation with Geojson

There are a couple of approaches to encoding elevation in geojson.

  1. The value for a feature's coordinates key should an array of numbers, which are ordered easting, northing and (optionally) altitude. The array represents a position.
  2. Alternatively, you can make the elevation value one of the feature's properties.

Both approaches are demonstrated below.

{
 "type": "Feature",