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.
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:
| Question | Header in the sheet |
|---|---|
| Identification | Pupil name |
| Criterion 1 | Who would you like to work with? [1st choice] |
… [2nd choice] · … [3rd choice] | |
| Criterion 2 | Who would you invite for a weekend? [1st choice] |
… [2nd choice] · … [3rd choice] | |
| Optional | Gender |
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:
| Warning | What 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. |
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.
| Mark | Meaning |
|---|---|
| Arrow | Runs from whoever chooses to whoever was chosen. |
| Number in the circle | Choices received under that criterion. |
| Circle size | Proportional to whatever is set in "Node size". |
| Circle colour | Whatever 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 dash | Which criterion the choice belongs to — only when viewing "All criteria". |
| Dashed red outline | A pupil nobody chose. |
| Dashed dark outline | A pupil who was named but did not answer the questionnaire. |
| Square / circle | Gender, 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
| Gesture | What 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 background | Clears the selection. |
| Drag a pupil | Moves them. They stay where you put them, and the automatic layout stops moving them. |
| Drag the background | Pans the drawing. |
| Mouse wheel | Zooms in and out. |
| Hover | Shows 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.
| Keys | What they do |
|---|---|
| / or Ctrl/⌘+K | Search for a pupil. |
| Ctrl/⌘+S | Save the project. |
| Ctrl/⌘+P | Print. |
| F | Fit the drawing. |
| [ and ] | Collapse the side panels. |
| Esc | Clear 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
| Option | What 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 reciprocity | Paints returned choices green. |
| Highlight isolated | Red outline on those who received no choices. |
| Avoid overlap | Pushes nodes apart so names do not cover each other. |
| Spacing and text size | To 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.
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.
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 question | The layout |
|---|---|
| How is this class organised? | ForceAtlas2 |
| Who is most and least sought after? | Concentric target |
| The class is small and the drawing is cramped | Fruchterman–Reingold |
| I need to check name by name | Grid |
It is worth viewing the same class in two layouts before deciding what to conclude: what one hides, the other usually shows.
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:
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.
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.
| Status | Criterion | Reading |
|---|---|---|
| Star | z ≥ 1.25 | Well above the class average. There are usually one or two. |
| Popular | z > 0.25 | Above average. |
| Average | received choices, z ≤ 0.25 | At or near the average. |
| Neglected | 0 received, but made choices | Takes part but is chosen by nobody. Worth attention. |
| Isolated | 0 received and 0 made | Outside the network of relations under this criterion. |
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.
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
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.
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.
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.
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.
Printing
Print assembles an A4 document, landscape or portrait, with up to three pages:
- The sociogram, with a complete legend and a note on how to read it.
- The table of measures, pupil by pupil.
- 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
| Format | What it is for |
|---|---|
| PNG / SVG | Dropping into a report. SVG is vector: it scales without losing sharpness. |
| Measures CSV | Working with the indices in a spreadsheet. |
| Matrix CSV | The classic sociometric matrix: who chooses whom. |
| GEXF | Opening 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.