History of turkish_program_preferences
The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.
[entries] Add the date when each entry was added, and remove icon_hash beff7c9
The dates are those of the commits that first added the entries' files (2020-08-11 for the entries of the initial commit); renamed entries keep the date of their first name. Changed: none
diff --git a/entries/turkish_program_preferences/__init__.py b/entries/turkish_program_preferences/__init__.py
index 4a64e0f..00b6abf 100644
--- a/entries/turkish_program_preferences/__init__.py
+++ b/entries/turkish_program_preferences/__init__.py
@@ -31,7 +31,7 @@ The network has the following properties:
tags = ['Economic', 'Preferences', 'Weighted']
url = 'https://github.com/volkantunali/network-datasets/tree/master/higher-edu-prog-co-preference'
citation = [('V. Tunalı, E. Güvenoğlu, "Complex Network Analysis Approach to Examining Undergraduate Program Preferences." Bitlis Eren Üniversitesi Fen Bilimleri Dergisi 8(1), 176-186 (2019)', 'https://doi.org/10.17798/bitlisfen.448039')]
-icon_hash = '5cf0357e51da6551647427a7'
+date_added = '2026-10-25'
upstream_license = None
upstream_prefix = 'https://raw.githubusercontent.com/volkantunali/network-datasets/6b34712b92a2004d097359db0f8e21f24beab30f/higher-edu-prog-co-preference'
files = [('co-preference-edges-weighted.txt', None, None)]
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) bc3dbbd
The lists of properties at the end of the descriptions marked edge properties with "Edge" but left node properties unmarked, or grouped them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property was often unclear. Every item now starts with (Node), (Edge) or (Graph), followed by the property names, a colon and the explanation, one item per property or group of properties; qualifications (kinds of nodes, networks) follow the names in parentheses. Properties that were only named got a short explanation, and a few items that named the wrong kind of property were corrected.
diff --git a/entries/turkish_program_preferences/__init__.py b/entries/turkish_program_preferences/__init__.py
index 62a0a68..4a64e0f 100644
--- a/entries/turkish_program_preferences/__init__.py
+++ b/entries/turkish_program_preferences/__init__.py
@@ -26,8 +26,8 @@ A node is a program (profession) name, and a directed edge from A to B means tha
The network has the following properties:
-- Nodes: `name`, the program name (in Turkish).
-- Edges: `weight`, the number of preferences for program B by the students placed in programs named A in 2017 (summed over universities)."""
+- (Node) `name`: the program name (in Turkish).
+- (Edge) `weight`: the number of preferences for program B by the students placed in programs named A in 2017 (summed over universities)."""
tags = ['Economic', 'Preferences', 'Weighted']
url = 'https://github.com/volkantunali/network-datasets/tree/master/higher-edu-prog-co-preference'
citation = [('V. Tunalı, E. Güvenoğlu, "Complex Network Analysis Approach to Examining Undergraduate Program Preferences." Bitlis Eren Üniversitesi Fen Bilimleri Dergisi 8(1), 176-186 (2019)', 'https://doi.org/10.17798/bitlisfen.448039')]
[entries] Remove unneeded code from the entries 2c69f19
Unneeded "global files" statements, unused imports and variables, f-strings without placeholders, duplicate keys in foodweb_little_rock (keeping the order and the values used), and the second definition of get_lines() in twitter_higgs. Nothing changes in the networks or descriptions. Changed: none
diff --git a/entries/turkish_program_preferences/__init__.py b/entries/turkish_program_preferences/__init__.py
index 17673be..62a0a68 100644
--- a/entries/turkish_program_preferences/__init__.py
+++ b/entries/turkish_program_preferences/__init__.py
@@ -44,7 +44,6 @@ def fetch_upstream(force=False):
@coerce_props()
@annotate()
def parse(alts=None):
- global files
name = __name__.split(".")[-1]
for fname, alt, fmt in files:
if alts is not None and alt not in alts:
[entries] New entry: turkish_program_preferences f724946
diff --git a/entries/turkish_program_preferences/__init__.py b/entries/turkish_program_preferences/__init__.py
new file mode 100644
index 0000000..17673be
--- /dev/null
+++ b/entries/turkish_program_preferences/__init__.py
@@ -0,0 +1,65 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+from .. import *
+
+title = "Turkish undergraduate program co-preferences (2017)"
+description = """Directed network of co-preferences among undergraduate programs in Turkey, compiled by V. Tunalı and E. Güvenoğlu. When applying to Turkish universities after the national entrance exam, students submit a ranked list of the programs they prefer. The data were crawled from the Higher Education Program Atlas portal (YÖK Atlas) of the Turkish Council of Higher Education, which lists, for each of the 23,245 programs offered by 207 universities, the other programs that the students placed in that program in 2017 had also included in their preference lists, with the number of such preferences. Program names were normalized to the bare profession name (removing language-of-instruction, scholarship and similar variants), merging the programs with the same name across universities, and invalid names were removed, yielding 622 programs and 72,571 directed co-preference pairs. To filter out weak relations, only the (at most) 10 most co-preferred programs of each program were kept.
+
+A node is a program (profession) name, and a directed edge from A to B means that B is among the 10 programs most often also preferred by students placed in program A.
+
+The network has the following properties:
+
+- Nodes: `name`, the program name (in Turkish).
+- Edges: `weight`, the number of preferences for program B by the students placed in programs named A in 2017 (summed over universities)."""
+tags = ['Economic', 'Preferences', 'Weighted']
+url = 'https://github.com/volkantunali/network-datasets/tree/master/higher-edu-prog-co-preference'
+citation = [('V. Tunalı, E. Güvenoğlu, "Complex Network Analysis Approach to Examining Undergraduate Program Preferences." Bitlis Eren Üniversitesi Fen Bilimleri Dergisi 8(1), 176-186 (2019)', 'https://doi.org/10.17798/bitlisfen.448039')]
+icon_hash = '5cf0357e51da6551647427a7'
+upstream_license = None
+upstream_prefix = 'https://raw.githubusercontent.com/volkantunali/network-datasets/6b34712b92a2004d097359db0f8e21f24beab30f/higher-edu-prog-co-preference'
+files = [('co-preference-edges-weighted.txt', None, None)]
+
+def fetch_upstream(force=False):
+ return fetch_upstream_files(__name__.split(".")[-1], upstream_prefix, files,
+ force)
+
+@cache_network()
+@coerce_props()
+@annotate()
+def parse(alts=None):
+ global files
+ name = __name__.split(".")[-1]
+ for fname, alt, fmt in files:
+ if alts is not None and alt not in alts:
+ continue
+ # Tab-separated lines: source program, target program, count
+ with open_upstream_file(name, fname, "r", encoding="utf-8-sig") as f:
+ edges = []
+ for line in f:
+ line = line.rstrip("\r\n")
+ if not line:
+ continue
+ s, t, w = line.split("\t")
+ edges.append((s, t, int(w)))
+ g = Graph(directed=True)
+ g.ep.weight = g.new_ep("int")
+ g.vp.name = g.add_edge_list(edges, hashed=True, hash_type="string",
+ eprops=[g.ep.weight])
+ yield alt, g