<![CDATA[Data Integrity]]>https://di.samizdat.co/2020/https://di.samizdat.co/2020/favicon.pngData Integrityhttps://di.samizdat.co/2020/Ghost 3.5Thu, 17 Aug 2023 17:42:04 GMT60<![CDATA[Week 13]]>
  • Free Form
    • Individual meetings to discuss your prototypes

Assignment

  • Free Form
    • Complete your visualization and prepare to present it at our final class meeting in two weeks. We will all meet as a group at 6.30 PM EDT.
]]>
https://di.samizdat.co/2020/week-13/5ea883eec96c960350e9ba07Tue, 28 Apr 2020 19:30:30 GMT
  • Free Form
    • Individual meetings to discuss your prototypes

Assignment

  • Free Form
    • Complete your visualization and prepare to present it at our final class meeting in two weeks. We will all meet as a group at 6.30 PM EDT.
]]>
<![CDATA[Week 12]]>
  • Free Form:
    • Review proposals as a group
    • Meet individually to look over progress

Assignment

  • Free Form
    • Develop an initial prototype of your visualization
    • If your prototype is static, commit your mock-ups as a (potentially multipage) PDF called process/prototype.pdf
    • Whether you're building something screen based or simply using Excel
]]>
https://di.samizdat.co/2020/week-12/5e9f6461c96c960350e9b9f3Tue, 21 Apr 2020 21:30:05 GMT
  • Free Form:
    • Review proposals as a group
    • Meet individually to look over progress

Assignment

  • Free Form
    • Develop an initial prototype of your visualization
    • If your prototype is static, commit your mock-ups as a (potentially multipage) PDF called process/prototype.pdf
    • Whether you're building something screen based or simply using Excel & Illustrator to generate your visuals, place your most up-to-date data files in project/data and name your primary script project/sketch.js
    • Whatever form your project takes, the prototype must use real data; this is a first draft, not a pencil sketch! If your dataset is too large to visualize fully in one week, pull out a handful of representative cases and visualize those to show the range of outcomes.
]]>
<![CDATA[Week 11]]>
  • A Thousand Suns: final round of feedback
  • Free Form
    • Lightning round: report on topics & data sources
    • Individual meetings & work in small groups

Assignment

  • Free Form
    • Select one idea to develop further for your final project and create:
      1. a one-page proposal,
      2. three concepts with two sketches apiece,
      3. a spreadsheet
]]>
https://di.samizdat.co/2020/week-11/5e962402c96c960350e9b9d7Tue, 14 Apr 2020 21:52:17 GMT
  • A Thousand Suns: final round of feedback
  • Free Form
    • Lightning round: report on topics & data sources
    • Individual meetings & work in small groups

Assignment

  • Free Form
    • Select one idea to develop further for your final project and create:
      1. a one-page proposal,
      2. three concepts with two sketches apiece,
      3. a spreadsheet with one or more tabs arranging your collected data into a form you can begin generating charts from.
    • See the “Sketches and Data” section of the assignment for details…
]]>
<![CDATA[Week 10]]>
  • Reading #2: Subtleties of Color
    • To actually use your newfound understanding of color, start looking into using chroma.js in your sketches
      • Note the use of the .hex() method to convert from chroma’s color representation to p5’s on line 23 of this example
    • If the chroma.js library
]]>
https://di.samizdat.co/2020/week-10/5e83ac9bc96c960350e9b99aTue, 07 Apr 2020 21:33:40 GMT
  • Reading #2: Subtleties of Color
    • To actually use your newfound understanding of color, start looking into using chroma.js in your sketches
      • Note the use of the .hex() method to convert from chroma’s color representation to p5’s on line 23 of this example
    • If the chroma.js library is too heavyweight for your needs, take a look at my brewer palette generator and see if you find it easier to use. Consult this catalog to find the name of the palette you want.
  • A Thousand Suns
    • Review your sketches merging an external data set with the testing timeline
    • Pick one direction to develop for next week

Assignment

  • A Thousand Suns
    • Complete your final version and commit your code and documentation in a folder called 3.mapping-quantities/final. If you have designed a static visualization, upload a PDF at the proper scale and trim its art-board to be full-bleed. If your project is screen-based make sure it runs correctly from the course website’s work directory.
    • Fine tune the text and typography surrounding your diagram in order two provide ‘three reads’ in terms of information from headline to body text to legends & labels (similar to the three visual reads we explored in the first assignment).
    • Include a brief (just a few sentences) explanation of your project’s data and how it is presented in 3.mapping-quantities/final/README.md
  • Free Form
    • Spend an hour brainstorming ten ideas for your final project. Focus on data that seems interesting to you for reasons you might not be able to articulate, then start posing questions that you could potentially answer with that data (either alone or in combination with other information).
    • Describe each idea in a sentence or three (ideally ending with a concrete, testable question) in 4.final-project/process/ideas.md
    • From your ten ideas, find five data sources on the web and document them in the file 4.final-project/process/datasources.md using the format demonstrated with the USGS example at the top of the file (and be sure to delete this once you've completed your list).
]]>
<![CDATA[Free Form]]>

Final Project

In this final project you will be bringing the conceptual dimension of the class together with the visualization techniques we’ve learned. You will develop and implement a final project following a complete, iterative design process. The first step in this is the creation of a set of

]]>
https://di.samizdat.co/2020/free-form/5e8cefdfc96c960350e9b9afTue, 07 Apr 2020 21:30:23 GMT

Final Project

Free Form

In this final project you will be bringing the conceptual dimension of the class together with the visualization techniques we’ve learned. You will develop and implement a final project following a complete, iterative design process. The first step in this is the creation of a set of proposals.

Process

You should aim to generate about 10 ideas during the next week that are intellectually distinct, address a diverse range of points of view, and explore different subject domains and levels of complexity. Work rapidly and don't get hung up on polishing anything digitally — limit yourself to handwritten notes and sketches during this phase while you are doing research (recommended: 10 ideas in a 1 hour session).

During the research and sketching process, address the following questions:

  • What are some observations you find noteworthy?
  • What insights could this offer?
  • How is it related to visualization, what can visualization reveal here?
  • What new ideas came out of the process of sketching and research?
  • What are the next steps?

Refine your list daily and let your initial set of ideas sit for at least a day before you take things a step further. Talk about your ideas with a peer outside of class (their level of expertise does not matter here).

Ideas & Sources (due 14 Apr)

List your ten ideas in the process/ideas.md file in your 4.final-project directory. Each idea can be described in 2 or 3 sentences, but make sure you outline the subject matter being considered, the question being asked, and the format (digital vs print, static vs interactive, diagram vs text vs map, etc.) you intend to use.

For five of these, find at least one datasource and record the details in your process/datasources.md file. There is a placeholder entry in the file describing the USGS feeds. Delete that entry, but use it as a model for the five new entries you'll be adding.

Concept Design & Development

Based on the feedback you’ve received for your 10 ideas from the ideation phase, choose one direction and create three different series of wireframe sketches (with at least 2 sketches per series) to illustrate how you plan to convey your subject visually. Your wireframes will be static representations of the eventual user interface plus schematic views of your visualization. The individual components of the sketch should be rough, functional approximations of the final placement, size, and interaction type (click, drag, hover, etc.) of UI elements but shouldn't yet be concerned with aesthetics.

Develop these sketches quickly enough to explore alternative approaches that present the subject in different ways. Experiment both with the visual representation of the data (in terms of the retinal variable mappings we've examined) and the different affordances your UI provides, allowing the user to pose different questions and filter/sort/focus the information in different ways.

In parallel with your design work, build a proof-of-concept illustration that your data-source is sound and will be able to provide the quantitative and qualitative information necessary for your final visualization. To that end, write a simple p5 script in which you read in one of your data files (whether CSV, JSON, or otherwise) and print/draw its values to a canvas. This sketch will be the basis for the visualization portion of your project and should not incorporate any of your UI design ideas until we get to the next step of the process.

Sketches and Data (due 21 Apr)

Select one idea to develop further for your final project and create a one-page proposal, 3 wireframe sketches, and a p5 script that loads in the data you’ve collected as either a JSON file or CSV table:

  • Summarize your final project ideas as a 1-page project proposal. Include rough visual sketches to illustrate your approach as needed.
    • The written description can be short (200–500 words) and should establish the subject matter, the question you’re trying to answer, and what you expect your intended audience to take away from the project. Be sure to address the questions listed above in the “Process” section.
    • The sketches are there only to help communicate your overall concept, so don’t spend too much time ‘designing’ them. If you don’t include a sketch, then describe your visualization approach thoroughly.
    • Create a PDF called proposal.pdf that combines your written description and supporting sketches and place it in the process folder.
  • Bring in three conceptually distinct approaches to visualizing your chosen dataset, depicted with at least 2 sketches apiece.
    • The sketches should illustrate both the representation of the data and the user interface approach.
  • Collect the data files (plural!) that contribute evidence to your subject (look in particular for CSV, TSV, JSON, XML, or SQL sources) and write a p5.js script that reads in your data file and generates something visual from it.
    • The form of the visual representation is not important, but it must include every field from the data source that you'll be using in your final visualization.

Initial Prototype (due 28 Apr)

Continue developing your wireframes and draw up a set of static representations of your user interface that demonstrate all of the ‘feature complete’ version’s eventual affordances, modes, and states. Devote particular attention to screen (or page) layout, typography, color mappings, contrast (both in terms of lightness and type hierarchy), and overall look and feel. These static mock-ups will serve as the ‘specification’ which the rest of your development work this semester will attempt to implement.

  • Collect your mock-ups in a single PDF file and place it in your repository as process/prototype.pdf.

  • Clean your data and convert it to a more programmatically usable (CSV, JSON, TXT, or XML) form. If you’re working off of a ‘live’ data source, learn the relevant API. In the case of relational databases, ensure you have a full understanding of its schema and prepare the queries you’ll be using. Submit your p5 sketch that successfully parses the data as data/sketch.js and place any local data files you’ll be using in data/assets.

Final (due 12 May)

You will present your completed projects at our last class meeting. Good luck!

]]>
<![CDATA[Sherry Wang]]>In reading, Robert Simmon shows a variety of relationships between colors and human. We invent computers to help us to analyze colors. Before we have computers, we mostly use our intuition to distinguish colors. Most of color selections are inspired from nature and the environment around us. These selections may

]]>
https://di.samizdat.co/2020/sherry-wang/5e838d4fc96c960350e9b983Tue, 31 Mar 2020 19:01:07 GMTIn reading, Robert Simmon shows a variety of relationships between colors and human. We invent computers to help us to analyze colors. Before we have computers, we mostly use our intuition to distinguish colors. Most of color selections are inspired from nature and the environment around us. These selections may not be accurate but usually can be accepted universally.  Using computer as a tool to make colors gives a wide new world to chose colors. During that process, we can choose color from a non-visual start point but from numbers and methods. Combining intuition and computer methods could provide a precise and acceptable way of choosing color representations.

]]>
<![CDATA[Reading Response 2]]>Within the reading, Subtleties of Color, Robert Simmon touches upon the difference between the way we see color versus the way computers sees color. Though computers reads color in a linear way, our eyes can not perceive it like so because some colors look brighter to us than others. Thus,

]]>
https://di.samizdat.co/2020/reading-response-2/5e423c153ba17274b8ae2a3dTue, 31 Mar 2020 18:20:26 GMTWithin the reading, Subtleties of Color, Robert Simmon touches upon the difference between the way we see color versus the way computers sees color. Though computers reads color in a linear way, our eyes can not perceive it like so because some colors look brighter to us than others. Thus, there are ways that people have organized color to allow for us to view it as a progression even though computers see them differently. This is very important especially in terms of representing data as colors are often used to represent or draw attention to something. Having control over how people perceive the colors allows for better visualization methods as well as representation.

]]>
<![CDATA[Week 9]]>
  • Acknowledging reality:
    • The course is going to have to change now that we’ve been scattered around the globe. Let’s figure it out…
  • Presentation: Penny on Giorgia Lupi
  • A Thousand Suns
    • Share possible external data sources
    • Examine your exploratory visualizations
    • Meet to look over your sketches and discuss merging
]]>
https://di.samizdat.co/2020/week-9/5e835875c96c960350e9b938Tue, 31 Mar 2020 18:04:28 GMT
  • Acknowledging reality:
    • The course is going to have to change now that we’ve been scattered around the globe. Let’s figure it out…
  • Presentation: Penny on Giorgia Lupi
  • A Thousand Suns
    • Share possible external data sources
    • Examine your exploratory visualizations
    • Meet to look over your sketches and discuss merging in the external data

Assignment

  • Read The Subtleties of Color and come to class prepared to answer questions about the ideas within
  • A Thousand Suns
    • Clean up whatever spreadsheet manipulation you did to the testing data via pivot tables and the like into a csv-friendly format that has a single header row, 1 set of data per row, and is purely rectangular (i.e., no skipped lines or multi-row/column regions). Save this to a csv in your project/data folder where your p5 code can access it.
    • Find the external data source you’ll be using for your ‘so what’ and ‘compared to what’ variables and convert it to spreadsheet form. If the data is quantitative in nature, do some exploratory visualizations using the spreadsheet. If it is qualitative, use a vector drawing app to organize the information spatially (for example, sorting similar items into groups and assembling a bunch of categorical lists or assigning a date to each item and arranging them into a timeline)
    • Bring in three additional pencil sketches that show different options for merging the testing data with your external data source. As before, save these images to the process directory and explain their logic within the README.md file.
  • Final project
    • Make a short list of subjects that might be of interest and do some brainstorming for the kinds of data you’d need to collect to learn more about it
]]>
<![CDATA[Reading #2]]>Subtleties of Color by Robert Simmon

The use of color to display data is a solved problem, right? Just pick a palette from a drop-down menu (probably either a grayscale ramp or a rainbow), set start and end points, press “apply,” and you’re done. Although we all know it’
]]>
https://di.samizdat.co/2020/reading-2/5e7cb585c96c960350e9b92cThu, 26 Mar 2020 14:01:18 GMTSubtleties of Color by Robert Simmon

The use of color to display data is a solved problem, right? Just pick a palette from a drop-down menu (probably either a grayscale ramp or a rainbow), set start and end points, press “apply,” and you’re done. Although we all know it’s not that simple, that’s often how colors are chosen in the real world. As a result, many visualizations fail to represent the underlying data as well as they could.

Read the blog series and optionally also watch the lecture.

]]>
<![CDATA[Week 8]]>
  • Presentations
    • Ben on Ben Fry, Processing, and Fathom
  • Right Twice a Day: final crit
  • Exercise 3: A Thousand Suns

Assignment

  • A Thousand Suns:
    • Run make update in your repository folder to fetch the new assignment
    • Generate three exploratory
]]>
https://di.samizdat.co/2020/week-8/5e67cd06c96c960350e9b916Tue, 10 Mar 2020 17:24:46 GMT
  • Presentations
    • Ben on Ben Fry, Processing, and Fathom
  • Right Twice a Day: final crit
  • Exercise 3: A Thousand Suns

Assignment

  • A Thousand Suns:
    • Run make update in your repository folder to fetch the new assignment
    • Generate three exploratory visualizations based on the spreadsheet data using either Google Sheets itself or other off-the-shelf tools. Place SVG or PDF exports of these charts (after editing them in Illustrator or Sketch) in the process folder and sum up the ‘take home message’ of each in a single sentence in the process/README.md file.
    • In addition, add three pencil sketches to the process folder exploring ways in which you could represent the nuclear testing data without using a map. Focus on what aspects of the data you plan to present, which you will omit, and what needs to be summed, grouped, or averaged in order be most comprehensible.
    • Pick an additional data set that you think would make for an interesting counterpoint to the nuclear testing data. Think in particular about addressing the ‘compared to what’ and ‘so what’ sides of the question in a way that either lets us understand the scale of the main data set, or gives us a deeper understanding of the political regimes, technology, culture, social developments, etc. that were going on during the relevant time periods.
      • Locate a source on the web for this contextual data set and bring it to class
    • Read up on using the preload() and loadTable() commands in the p5 reference; in combination they will allow you to fetch a CSV file and load it into an object called a Table.
      • Try adding some print() statements to the starter code in the project folder to get a sense of how you can pull values out of the table by row/column coordinates, using the names in the header row, etc.
]]>
<![CDATA[A Thousand Suns]]>

Exercise 3: Mapping Quantities, Categories, and Summarized Data

For this third project, we'll be examining a simple time-series dataset: the history of nuclear testing by the eight (declared) nuclear nations. In the first phase of this project we will consider only the total number of test explosions across three dimensions:

]]>
https://di.samizdat.co/2020/a-thousand-suns/5e67b513c96c960350e9b90dTue, 10 Mar 2020 17:23:11 GMT

Exercise 3: Mapping Quantities, Categories, and Summarized Data

A Thousand Suns

For this third project, we'll be examining a simple time-series dataset: the history of nuclear testing by the eight (declared) nuclear nations. In the first phase of this project we will consider only the total number of test explosions across three dimensions:

  1. the state conducting the test
  2. the year in which it occurred
  3. whether it was above- or below-ground

Despite the simplicity of the data, there are a number of ways to slice and group the data. Some things to consider:

  • Is each year plotted separately, or are the totals grouped into decades or some other multi-year chunk
  • Is time represented by position on the x or y axis? Or by angle? Or using color?
  • What are the 'objects' being represented in your diagram? Are they the countries, the years, or the individual tests?
  • How will your diagram address the 'lull' that resulted from the Comprehensive Test Ban Treaty in ’96 and the more recent resurgence in testing?

Preliminaries

Starting with this project, we'll be making use of external files to separate the data we're plotting from the code that does the actual drawing. Getting this to work means becoming acquainted with a couple implementational details of the browser environment.

The first is the idea that retrieving information over the network is not instantaneous and that some time will pass between when you ‘request’ your data file and the moment where its contents are available to your script. To work around this, p5 allows you to define a function called preload which will run before your setup or draw functions begin. In our case, that function will be used to call either loadTable (which fetches a CSV file) or loadJSON (for, unsurprisingly, JSON data). In either case, you'll want to make sure you follow a procedure along the lines of:

var externalData; // declare a global variable to store the data

function preload() {
  // start fetching the data and assign it to your global
  externalData = loadJSON('http://example.com/some/file.json');
}

function setup(){
    // ... use the global externalData variable here (or in draw)
}

The second browser-related issue is the Same-origin Policy which requires that all the files your page touches come from the same domain. Thus far, we've been opening our index.html files directly (which gives them a URL beginning with file:///). Unfortunately, this is incompatible with loading external data files, so we’ll need to run a local web server (giving everything an http://localhost/ URL).

Open a terminal window in your main di-2020 folder via the Github Desktop app’s Repository → Open in Terminal menu. Once there, type make server. You'll then see a message along the lines of:

Starting up http-server, serving .
Available on:
  http://localhost:8080
Hit CTRL-C to stop the server

Now try pasting that http://localhost:8080 url into your browser, and then start clicking on folders to navigate to your student directory. Once you're done working, you can type Control-c in the terminal window to shut down the server (or just close its window and click the Terminate button).

Getting started

Begin your investigation with this simplified dataset collected from the Natural Resources Defense Council's pages on the original and subcontinental nuclear powers.

Examine the data subdirectory of the project folder which contains JSON & CSV versions of the table below. Then look at the scripts in the examples folder. These scripts build on our work learning the p5 drawing primitives in three major ways:

  1. setting drawing parameters with structured, tabular data rather than hard-coded values
  2. working with serialized JSON and CSV data
  3. using loops to render multiple ‘instances’ (a.k.a. rows) of a data set using the same procedure each time

Start by modifying the code in the example scripts and explore some of the different ways to represent the country, year, and test-count values. Make 'snapshot' copies of your script as you modify it so you can build up an array of different approaches.

Next steps

Over the next week, continue working with this dataset and sketch out three different approaches to representing it in a way that tells a story.

Confine yourself to static, non-interactive representations for now, but consider any medium that could represent these values; posters, projections, and physical representations are all just as valid as pixels on a screen.

In at least one of your three variations, bring in one additional variable using data you find on the web and be sure to cite your source. This additional variable could be anything from a timeline of world events to the military budgets of the countries (or even the astrological signs of their leaders). Just make sure you can defend how it is in some way adding useful context to the data.

Feel free to use whatever tools you're comfortable with. Programmatic drawing can be very handy but so can Excel…

Data sources

This spreadsheet on Google Docs has a tidied up copy of the NRDC data and provides both the total number of tests as well as distinguishing between 'atmospheric' or 'underground' tests. Consider making use of a pivot table to modify/summarize the information, and then export it as a csv for your own usage.

Also consider taking a look at the Wikipedia page listing the various tests and providing links to country-specific pages with background information about the individual tests.

For the details of individual tests, take a look at the materials collected at “Johnston's Archive” (and also included in the last tabs of the Google Sheet). But keep in mind that the volume of data is substantially larger, so be sure to have a clear idea of what you're trying to collect before diving in...

Supplemental materials

I've assembled a cleaned-up csv file with most of the Johnston's Archive data. If you're looking for information about the naming schemes of the individual tests, yield estimates, locations, dates, etc. it may be helpful...

Lawrence Livermore National Laboratory recently released the declassified 2400 FPS films of many of their atmospheric nuclear tests. Those of you whose projects are dealing with specific tests rather than the summary statistics may find stills from the videos useful in your work. Take a look at their playlist on YouTube.

]]>
<![CDATA[Week 7]]>
  • Programming workshop
  • Right Twice a Day: in-class work
    • By the end of class have three concepts (including pencil sketches) for a time visualization that includes the hours/minutes/seconds values from your ‘clock’ explorations and at least
]]>
https://di.samizdat.co/2020/week-7/5e5e7a0fc96c960350e9b8e4Tue, 03 Mar 2020 18:39:45 GMT
  • Programming workshop
  • Right Twice a Day: in-class work
    • By the end of class have three concepts (including pencil sketches) for a time visualization that includes the hours/minutes/seconds values from your ‘clock’ explorations and at least three ‘calendar’ variables of your own choosing (day of week, month, season, etc.)
    • Commit your sketches to the process folder in a file called hybrid-sketches.pdf by the end of class and detail their logic in the README.md file in that directory.
    • Remember to both commit your changes locally and then push them up to github. Make sure that all your work so far is visible when you browse through the files on your github pages in the browser. The course website will update its /work pages every five minutes with a copy of your repository.

Assignment

  • Right Twice a Day
    • Incorporate feedback and finalize your three code-based date visualizations
    • Develop one of your three ‘hybrid’ calendar + clock concepts in code for your final visualization. As before, duplicate the project folder and title it final. Once you’ve settled on an idea, rename the folder to something with a descriptive suffix (e.g., final-radial-weekdays).
    • Create a README.md file within that final folder that gives your visualization a proper title and include a brief explanataion of how the 3 clock variables and additional date variables have been encoded into retinal variables for the final visualization. In other words, describe it well enough for someone to make sense of your visualization if you weren’t there to explain it to them
    • Note that by next class you should have 7 folders total containing your visualizations from the past several weeks. Make sure the folder names all start with either clock-#, date-#, or final. For instance:
      • clock-1-short-title
      • clock-2-another-short-title
      • clock-3-yet-another-title
      • date-1-yadda-yadda
      • date-2-foo-bar-baz
      • date-3-etc-etc-and-so-forth
      • final-something-something
]]>
<![CDATA[Week 6]]>]]>https://di.samizdat.co/2020/week-6/5e5560fdc96c960350e9b8cdTue, 25 Feb 2020 19:30:00 GMT

Assignment

  • Right Twice a Day
    • Polish and incorporate feedback on your three code-based time visualizations
    • Convert your paper sketches into code for your three date visualizations. As before, duplicate the project folder three times and name them date-1, date-2, and date-3. Once the sketch is complete, rename each folder with a meaningful and descriptive suffix such as date-3-season-colors
]]>
<![CDATA[Week 5]]>

Assignment

  • Right Twice a Day
    • Complete at least three representations of the current time (ignore days, weeks, moons, etc. for now) that develop
]]>
https://di.samizdat.co/2020/week-5/5e4c2e7ccfa623034323a6d4Tue, 18 Feb 2020 19:30:00 GMT

Assignment

  • Right Twice a Day
    • Complete at least three representations of the current time (ignore days, weeks, moons, etc. for now) that develop on your sketches from last week.
      • This time everything must be done in code. Use the clock() function to access different attributes of the current time (a listing of its property names is included in the assignment).
      • Make sure each approach addresses hours, minutes, and seconds in such a way that the representation looks different over the course of a day, hour, and minute.
      • Start by duplicating your project folder three times and naming them clock-1, clock-2, and clock-3. Once you've completed each sketch, rename the folder with a more descriptive suffix (e.g., clock-1-radial-seconds)
    • Add three new sketches to your process folder that this time focus on representing at least two of the longer-term calendar variables (and for these you don't need to worry about incorporating the wall-clock time)
      • Each sketch should choose two or more calendar values to represent (e.g., day-of-week, day-of-month, month, moon, season, or year) and you should use a different retinal variable for each value (i.e., 6 different retinal variables across the 3 sketches)
      • Since calendar units use much more irregular values than clocks do, pay extra attention to the progress attributes provided by the clock() function and figure out how to map their 0–1 values into an appropriate range to use for drawing
]]>
<![CDATA[Right Twice a Day]]>

Mapping Time

Preliminaries

Gather all the necessary software and files to get started:

The P5.js site has an extensive Reference section with a full listing of

]]>
https://di.samizdat.co/2020/right-twice-a-day/5e42d0963ba17274b8ae2a43Tue, 11 Feb 2020 18:30:23 GMT

Mapping Time

Preliminaries

Right Twice a Day

Gather all the necessary software and files to get started:

The P5.js site has an extensive Reference section with a full listing of the drawing commands that make up its API. It’s also got a somewhat sparser set of Tutorials that might help you get started (but mostly seem to be written to an audience that’s familiar with the original Processing environment so YMMV).

For this assignment, make sure you’ve got a handle on these basics:

Your project files are also set up to allow you to use a pair of exceedingly useful libraries (though don’t feel like you need to learn them immediately). Take a look at their documentation pages and see if anything jumps out at you:

  • lodash – the unnoficial 'standard library' of javascript with utility functions for every use-case under the sun
  • chroma – powerful color-math functions useful for interpolating between colors, applying hue/saturation/brightness transformations, etc.

To get yourself situated, try looking over the sample code in the examples directory. Note the basic form of each of the programs (i.e., their setup() and draw() definitions), how they employ the drawing commands listed above, and particularly their use of variables to hold partial computations and for-loops to encapsulate repeated procedures.

Dataset

For this project the ‘data’ you'll be working with are the numerical aspects of time. You should familiarize yourself with the clock() function I've provided to help access the current date & time. The function returns a time Object with the current instant broken down into individual components. You can get numerical values for hour, min, sec, and ms on the time side of things and year, season, month, moon, day, and weekday if you’re interested in dates.

For instance, you can use the current year to work backwards:

var now = clock()
var age = 64
var born = now.year - age
print(`A ${age}-year-old would have been born in ${born}`)

To determine what half of the day it currently is, access the am and pm attributes, each of which contains a Boolean. You could conceivably use this to set the background color depending on whether it’s before- or afternoon.

function draw(){
  var now = clock()
  if (now.pm){
    background(0)
  }else{
    background(255)
  }
}

The object returned by clock() also provides a mechanism for measuring the current time in terms of the cyclic features of the calendar. By accessing fields of its progress attribute, you can get the fraction of various periods that have elapsed before the current moment. The clock represents progress as a number between 0 and 1 for each of: year, season, moon, month, week, day, halfday, hour, min, and sec.

For instance, if you wanted to be fairly literal and draw a progress bar for the day, try drawing a black rectangle whose width is proportional to the ‘doneness’ of the current 24-hour cycle:

function draw(){
  background(255)
  noStroke()
  fill(0)

  var now = clock()
  var pct = now.progress.day
  rect(0,0, width*pct, height)
}

The full set of attributes you can access via the clock function is as follows:

var now = clock()

// numerical values for elements of current time
now.hours // hour in 0–23 'military' time
now.hour  // hour in 1–12 'am/pm' time
now.min   // minute
now.sec   // seconds
now.ms    // milliseconds
now.am    // true for hours 0-11
now.pm    // true for hours 12-23

// numerical values for elements of current date
now.year    // the full 4-digit year
now.month   // month number 1–12
now.moon    // the fullness of the moon 0–1.0
now.day     // the day 1–{28,29,30,31}
now.weekday // the day of the week 1-7
now.season  // the current season 1-4 (starting with spring)

// a string-based representation that can be used as an argument to clockStart
now.timestamp // "2001/12/31 23:45:56"

// values between 0.0 and 1.0 measuring the current time's %-completion of various cycles
now.progress.year
now.progress.season
now.progress.month
now.progress.moon
now.progress.week
now.progress.day
now.progress.halfday
now.progress.hour
now.progress.min
now.progress.sec

// string versions of the date & time (in case you want to print it out)
now.text.time    // "11:45:56 P.M."
now.text.hour    // "11"
now.text.hours   // "23"
now.text.min     // "45"
now.text.sec     // "56"
now.text.ampm    // "P.M."
now.text.date    // "31 Dec 2001"
now.text.year    // "2001"
now.text.season  // "Winter"
now.text.month   // "December"
now.text.mon     // "Dec"
now.text.day     // "31"
now.text.weekday // "Monday"

Goal

  • Create a visual representation of the current local time using only graphics primitives, symbols, and formal elements like color/texture/size — no text or alphanumeric characters!
  • Use the clock() function so that your sketch is always displaying the current time in your draw() function.
  • This is to be a creative interpretation of the idea of a clock. Your focus should be on inventiveness and polished visuals.
  • Your interpretation needs to be legible to you (the author), and you need to be able to explain how the time is derived visually at any given point.
  • Your clock concept needs a name (put that in the <title> tag of the index.html file).
  • We will be working in two phases
    1. Representing the current hour, minute, and second by mapping their numerical values onto form
    2. Representing longer-term ‘calendar time’ units such as days, weeks, months, moon phases, seasons, years, etc.
  • In each case your task is to develop an encoding of either the numerical unit itself (e.g., the number 11 if it’s 11 A.M.) or its proportional relationship to the passage of time (0.42 since 11 a.m. is 42% of the way through the course of the day) and a visual representation that makes use of what we’ve learned about Bertin’s retinal variables

Process

  • Start off by making some hand-drawn (or mocked up in a drawing app) sketches of clock ideas and put these images into the process folder of your subdirectory.
  • Update the README.md file in your process folder describing what’s in your various sketch files, the logic of the representation, etc. Be sure to explain, either in words or diagrammatically, your chosen mapping of time components to Bertin-ian Retinal Variables.
  • Start coding by editing the project/sketch.js file. If you want to explore multiple options in parallel, use the Finder’s Duplicate command to clone the whole project directory and give it a sensible name (i.e., not just project copy or project2). You can then start working on the sketch.js in the new folder without disturbing your previous work.
  • Commit your changes whenever you’ve made some modifications that feel like they’re in a stable state (or if you stumble onto a glitchy visual that points in a direction you’d like to explore). This will let you ‘rewind’ to that point in the future if you’ve hit a dead-end or need to remember how you did something.
  • When you make a commit, select just the files (or even just the lines within one) that are part of the ‘conceptual unit’ of change that you made and type a brief description of what changed into the Summary field.
  • Sync your local repository with the copy on GitHub before the start of class next week.
]]>