Skip to content
Afinni
Guide
PT EN

Afinni Guide

How to turn questionnaire responses into a class sociogram, how to read the drawing, and what exactly the numbers the app reports are measuring.

Part I

Getting started

From raw responses to a first drawing, in three steps.

The questionnaire

A sociogram starts from a question with a criterion: "who would you like to work with on a group project?" is one criterion, "who would you invite to organise a weekend trip?" is another. The same pupil may be much in demand for work and hardly chosen for company — these are different things, which is why it is worth asking both.

Each criterion asks for a fixed number of choices in order of preference, usually three. In Google Forms that means one question per choice, and the response sheet ends up with headers like these:

QuestionHeader in the sheet
IdentificationPupil name
Criterion 1Who would you like to work with? [1st choice]
… [2nd choice] · … [3rd choice]
Criterion 2Who would you invite for a weekend? [1st choice]
… [2nd choice] · … [3rd choice]
OptionalGender
Use a drop-down list of the class names Rather than free text. The app corrects small typos and recognises a pupil by first name when there is no ambiguity, but a list avoids the problem at source — and stops invented pupils from appearing in the drawing.

Before running the questionnaire, tell the class what it is for and what will happen to the answers. The responses are confidential and the sociogram is not shown to pupils: it is a tool for the teacher.

Importing the responses

The first step in the left-hand panel offers two routes.

Google Sheets

Paste the link to the sheet. It must be reachable by anyone with the link: Share → General access → Anyone with the link → Viewer, or else File → Share → Publish to web. The app's local server is what fetches the data, because the browser on its own is blocked from doing so for security reasons.

The "Sheet within the file" field is only needed when the document has several tabs and the responses are not in the first one. Type the tab name exactly as it appears in Sheets.

File

Accepts .csv, .tsv and Excel .xlsx, as well as the .nni projects saved by the app itself. In Sheets: File → Download, then pick CSV or Excel. If the Excel workbook has several sheets with data, the app uses the responses sheet and offers a menu to switch.

To see the app working before you have data of your own, click "load the demonstration class": a fictional class of 24 pupils, with stars, isolated pupils, subgroups and a few deliberate data-entry errors.

Matching the columns

As soon as the data arrives, the app guesses the role of each column and opens the second step for you to confirm. Each column can be:

  • Pupil name — who answered. Only one column.
  • Gender — optional; if present, boys get squares and girls get circles.
  • Criterion · nth choice — each choice column, with the criterion it belongs to and the order of preference.
  • — ignore — — everything else, such as the timestamp.

Below that you can rename the criteria: that name appears in the sociogram menu, in the legend and in the printed header.

The app works with any number of criteria and of choices, from one to five. If you mark two columns with the same position in the same criterion, it warns you.

Building the sociogram

Build sociogram constructs the graph. At that point the app resolves the names the pupils wrote, links each choice to the right classmate, computes the measures and draws.

The first two steps collapse and you move on to step 3, with the drawing options. You can reopen them at any time by clicking their title.

The warnings

The Warnings tab in the right-hand panel gathers everything the app corrected or could not resolve. It is worth reading before drawing any conclusions:

WarningWhat happened
Appears more than once The pupil answered twice; the most recent response is used.
Chose themselves Self-choices do not enter the sociogram.
Named the same classmate twice Only the better position counts.
"X" was read as "Y" A small spelling difference, corrected automatically. Do check.
Was chosen n times but did not answer Someone named by classmates who did not fill in the form.
Answered but named no recognised classmate The names written match nobody in the class.
Pupils who did not answer They still appear in the drawing, with a dashed outline and no choices of their own: they were chosen, so they are part of the group structure. They do not, however, enter the denominator of the measures — someone who did not answer could not choose anybody.
Part II

Using the sociogram

What each mark in the drawing means, and how to question it.

Reading the drawing

Every graphical mark always means the same thing. The colour of the circles and the colour of the lines are independent of each other, and the criterion is never shown by colour — it is shown by the line's dash pattern — precisely to avoid confusion.

MarkMeaning
ArrowRuns from whoever chooses to whoever was chosen.
Number in the circleChoices received under that criterion.
Circle sizeProportional to whatever is set in "Node size".
Circle colourWhatever is set in "Node colour": subgroup, status, popularity, gender or a single colour.
Green line Reciprocal choice: the two chose each other.
Dark line 1st choice. The paler and thinner, the lower down the order of preference.
Line dashWhich criterion the choice belongs to — only when viewing "All criteria".
Dashed red outlineA pupil nobody chose.
Dashed dark outlineA pupil who was named but did not answer the questionnaire.
Square / circleGender, when that column exists.

The legend in the corner explains the lines, which is what you cannot guess by looking. Click its title to collapse it. The printed legend is complete, because on paper there are no menus to check against.

Mouse and keyboard

GestureWhat it does
Click a pupil Isolates their links — blue for the ones they made, orange for the ones they received — and opens their card in the right-hand panel.
Click the backgroundClears the selection.
Drag a pupil Moves them. They stay where you put them, and the automatic layout stops moving them.
Drag the backgroundPans the drawing.
Mouse wheelZooms in and out.
HoverShows a summary card for that pupil.

Recompute rebuilds the layout from scratch and returns any pupils you dragged to automatic placement. Fit frames everything in the visible area.

KeysWhat they do
/ or Ctrl/⌘+KSearch for a pupil.
Ctrl/⌘+SSave the project.
Ctrl/⌘+PPrint.
FFit the drawing.
[ and ]Collapse the side panels.
EscClear the selection.

The search box at the top accepts part of a name and ignores accents — "ines" finds Inês Patrício. On picking a result the app centres and selects that pupil. The × in the box clears the search, drops the selection and frames the whole class again.

The drawing options

OptionWhat it is for
Sociometric criterion Which question is in view. A sociogram is always about one criterion; "All criteria" overlays them, telling them apart by the line dash.
Node size Choices received, weighted score, reciprocal choices, or all equal.
Node colour Subgroup, sociometric status, popularity as a gradient, gender or a single colour.
Show links All, reciprocal only, 1st and 2nd choice only, or 1st only. Filtering to first choices reveals the core of the preferences.
Highlight reciprocityPaints returned choices green.
Highlight isolatedRed outline on those who received no choices.
Avoid overlapPushes nodes apart so names do not cover each other.
Spacing and text sizeTo fit the screen or the page.

The right-hand panel

Summary

Six class-level indicators for the criterion in view — hover over each to see what it measures. Below them, four clickable lists: most chosen, those who received no choices, reciprocal pairs and cohesive subgroups. Clicking any name selects that pupil in the drawing.

When a pupil is selected, their card appears at the top: status, totals, who they chose and who chose them.

Pupils

The full table, sortable by any column. Rec. is choices received, Made the ones they made, Pts the weighted score and ⇄ the reciprocal ones. An asterisk marks those who did not answer.

Warnings

What the app corrected or could not resolve in the data, with the count next to the tab.

Part III

The layouts

Where pupils sit on the page is not neutral: each layout answers a different question.

ForceAtlas2

The default layout, and the one that best reveals the structure of the class. It works as a system of forces: pupils repel each other and choices pull them together, like springs. The result is an equilibrium in which groups of friends gather on their own and peripheral pupils end up at the edges.

It is the same algorithm Gephi uses, in LinLog mode: attraction grows with the logarithm of distance rather than linearly, which separates subgroups far more sharply. Reciprocal choices pull harder, because they are stronger ties.

Position is an argument Whoever sits in the centre is well connected to the class as a whole; whoever sits at the edge has few links, or only links inside their own group. The distance between two pupils is not an exact measure of anything — read it as a tendency, not as a number.

Fruchterman–Reingold

Another force-directed algorithm, older and with linear attraction. It spreads pupils more evenly across the space and separates groups less. It is useful in small classes, where ForceAtlas2 tends to bunch everything together, and for anyone who prefers a more open drawing.

Concentric target

The classic sociogram as it appears in the sociometry literature: a set of rings in which the more choices a pupil receives, the closer to the centre they sit. Pupils with no choices sit on the outer ring.

Here position answers a single question — who is most sought after — and answers it at a glance, without counting arrows. It is the easiest layout to explain to someone who has never seen a sociogram, and the most suitable for a report where the hierarchy of preferences is the point.

In exchange you lose the structure: two pupils side by side on the same ring may have nothing to do with each other.

Grid

Pupils lined up in rows and columns, ordered by subgroup. It reveals no structure at all, but it guarantees that every name is legible and no pupil is hidden behind another. Use it to check choice by choice, to verify a particular case, or to project in a meeting.

Which one to use

The questionThe layout
How is this class organised?ForceAtlas2
Who is most and least sought after?Concentric target
The class is small and the drawing is crampedFruchterman–Reingold
I need to check name by nameGrid

It is worth viewing the same class in two layouts before deciding what to conclude: what one hides, the other usually shows.

Part IV

The measures

How each number is computed, and what can — and cannot — be concluded from it.

Choices and weighting

The basic counts, always relative to the criterion in view:

  • Choices received — how many classmates chose this pupil. This is the number inside the circle.
  • Choices made — how many classmates they chose.
  • Reciprocal choices — in how many of those relations the choice went both ways.

Not all choices are worth the same: being someone's first choice is not the same as being their third. The weighted score gives more weight to earlier choices. With three choices:

1st choice = 3 points · 2nd choice = 2 points · 3rd choice = 1 point

With a different number of choices the scale adjusts: the first is worth as many points as there are choices asked for, decreasing by one. When you select "All criteria", points from the several criteria are added up.

Popularity

Raw counts of choices received are not comparable between classes of different sizes: five choices in a class of 12 are worth far more than in a class of 30. The popularity index turns them into a proportion.

popularity = choices received ÷ number of classmates who could choose

The denominator deserves attention. It is not the total number of pupils in the drawing, but the number who actually answered the questionnaire, minus the pupil themselves (nobody chooses themselves). Someone who did not answer chose nobody, and counting them would artificially lower everyone's popularity.

Example

In a class of 25 where 19 answered, a pupil with 8 choices received has a popularity of 8 ÷ 18 = 44% — 18 rather than 24, because only 18 classmates were in a position to choose them. For a pupil who did not answer but was chosen, the denominator is 19: every respondent could have chosen them.

Sociometric status

The classification compares each pupil with the average of their own class, not with a fixed value. The app computes the mean and standard deviation of choices received and measures how far from the mean each pupil sits — the z score.

StatusCriterionReading
Starz ≥ 1.25 Well above the class average. There are usually one or two.
Popularz > 0.25Above average.
Averagereceived choices, z ≤ 0.25At or near the average.
Neglected0 received, but made choices Takes part but is chosen by nobody. Worth attention.
Isolated0 received and 0 made Outside the network of relations under this criterion.
Isolated does not mean unhappy A pupil may not have been chosen under this criterion and still have solid friendships in another context, or outside the class. A sociogram measures choices declared in one specific question, on one specific day — it does not measure wellbeing or personal worth. Treat a low status as a question to ask, never as a diagnosis.

Reciprocity

A choice is reciprocal when two pupils choose each other. These are the strongest ties in the drawing, which is why they appear green and thicker.

reciprocity = (2 × reciprocal pairs) ÷ total choices

It is the percentage of choices that were returned. A class with high reciprocity has settled relationships; one with low reciprocity has many unreturned admirations, which tends to go with groups still forming or with strongly hierarchical ones.

The Reciprocal pairs list is ordered by strength — the pair who chose each other first appears at the top.

Density

density = choices made ÷ possible choices

It measures how much of the possible network is actually filled in. Possible choices count only those coming from respondents: each respondent could, in principle, choose any of the other pupils.

Read it in relative terms Because the questionnaire limits each pupil to three choices per criterion, density can never be high — in a class of 24, three choices out of 23 possible classmates give a ceiling of about 13%. The number is for comparing criteria with each other, or the same class at different times, not to be read as an absolute percentage.

Subgroups and communities

The app identifies groups in two different ways, and it is worth not confusing them.

Cohesive subgroups

Sets of three or more pupils who all choose one another, in both directions. This is a demanding, literal criterion: in graph theory these are cliques in the graph of mutual choices. When the list shows "Leonor · Francisca · Ana", it means each of the three chose the other two and was chosen by them.

Communities (the node colour)

The "Subgroup" colouring comes from a different computation, by modularity, using the Louvain algorithm — the same one Gephi uses. It looks for the division of the class that maximises links within each group relative to what chance alone would produce. Unlike cohesive subgroups, here every pupil is assigned to some group, including those sitting on the border between two.

How to use each Cohesive subgroups are verifiable facts, pupil by pupil: you can confirm each one in the drawing. Communities are a statistical interpretation, useful for seeing the overall arrangement of the class, but in which borderline cases may fall either way.

Reading with care

  • A sociogram is a photograph, not a film. It shows preferences declared on one day. Repeat the exercise later in the year to see what changed.
  • The criterion changes everything. A pupil can be a star for working and go unnoticed for socialising. Always compare criteria before forming a view about anyone.
  • Choices are not friendships. A pupil may be chosen for being good at maths rather than for being a friend.
  • Mind the missing responses. If many forms are missing, the drawing is incomplete in ways that are not visible: a pupil may look isolated only because whoever would have chosen them did not answer.
  • Do not show the sociogram to pupils, and do not label them aloud from it. It exists for the teacher to decide working groups, seating and who needs attention.
Part V

Saving and printing

Taking the work out of the app.

The .nni project

The Save button in the top bar, or Ctrl/⌘+S, writes a .nni file with everything needed to resume work: the sheet data, the column matching, the criterion names, the drawing options and the exact position of every pupil, including any you dragged by hand. Inside it is JSON, so it can be read in a text editor.

To reopen it, use the same route as any other file: Import data → File. The sociogram comes back exactly as it was, without recomputing the layout.

Where the file goes In Chrome and Edge the app asks where to save and, from then on, Ctrl/⌘+S rewrites that same file; to pick another one, use "Save project as…" in the Export menu. Safari and Firefox do not give web pages that ability, so there each save is an ordinary download to the usual folder. In Safari you can ask to be prompted every time under Settings → General → File download location → Ask for each download.

Printing

Print assembles an A4 document, landscape or portrait, with up to three pages:

  1. The sociogram, with a complete legend and a note on how to read it.
  2. The table of measures, pupil by pupil.
  3. The sociometric reading: reciprocal pairs, cohesive subgroups, most chosen, pupils with no choices, unreturned choices and the notes about the data.

Each block can be turned off before printing. For PDF, choose Save as PDF in the system print dialog.

Exporting

FormatWhat it is for
PNG / SVGDropping into a report. SVG is vector: it scales without losing sharpness.
Measures CSVWorking with the indices in a spreadsheet.
Matrix CSVThe classic sociometric matrix: who chooses whom.
GEXFOpening the same graph in Gephi.

Privacy

Everything runs on the teacher's computer. The local server does exactly one thing over the network: ask Google for the contents of the sheet when you click Import. There is no database, no accounts, and nothing is sent anywhere.

Even so, remember that a sociogram holds personal data about minors and reveals social relationships. Keep the exported files with the same care as grade sheets, and do not leave them on a shared computer.