Tutov1/fr: Difference between revisions

From Resistance in Belgium
(Created page with "== <span style="color:#158f68;">1. Introduction to SPARQL</span> == Using SPARQL is like being a detective in a vast archive collection. Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria. In the context of ''Resistance in Belgium'', SPARQL makes it easier to access data on resistance members: place of birth, residence, official recognition statuses, or affiliation wit...")
 
No edit summary
Line 1: Line 1:
<translate>
<!--T:1-->
== <span style="color:#158f68;">1. Introduction to SPARQL</span> ==
== <span style="color:#158f68;">1. Introduction to SPARQL</span> ==


<!--T:2-->
Using SPARQL is like being a detective in a vast archive collection.   
Using SPARQL is like being a detective in a vast archive collection.   
Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria.
Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria.


<!--T:3-->
In the context of ''Resistance in Belgium'', SPARQL makes it easier to access data on resistance members: place of birth, residence, official recognition statuses, or affiliation with resistance organizations.
In the context of ''Resistance in Belgium'', SPARQL makes it easier to access data on resistance members: place of birth, residence, official recognition statuses, or affiliation with resistance organizations.


<!--T:4-->
'''With SPARQL, you can:'''
'''With SPARQL, you can:'''
* Filter and cross-reference information;
* Filter and cross-reference information;
Line 12: Line 18:
* Generate visualizations to better interpret your results.
* Generate visualizations to better interpret your results.


<!--T:5-->
This approach gives you valuable autonomy in analyzing the dataset. You can not only extract name lists, but also identify complex relationships, such as individuals affiliated with multiple organizations or holding various recognition statuses.
This approach gives you valuable autonomy in analyzing the dataset. You can not only extract name lists, but also identify complex relationships, such as individuals affiliated with multiple organizations or holding various recognition statuses.


<!--T:6-->
SPARQL gives you the superpower coveted by researchers everywhere: asking ultra-specific questions and getting answers within milliseconds. Of course, like any superpower, it takes a bit of practice to master.   
SPARQL gives you the superpower coveted by researchers everywhere: asking ultra-specific questions and getting answers within milliseconds. Of course, like any superpower, it takes a bit of practice to master.   
But don’t worry—this tutorial is here to guide you and turn challenges into opportunities.   
But don’t worry—this tutorial is here to guide you and turn challenges into opportunities.   
Who said archival research had to be dusty?
Who said archival research had to be dusty?


<!--T:7-->
<span style="color:#158f68;"><b>Ready to master the force of SPARQL? Let’s go.</b></span>
<span style="color:#158f68;"><b>Ready to master the force of SPARQL? Let’s go.</b></span>


----
----


<!--T:8-->
== <span style="color:#158f68;">2. Strategy for Your First Queries</span> ==
== <span style="color:#158f68;">2. Strategy for Your First Queries</span> ==


<!--T:9-->
Now that you have a general idea of what SPARQL is, here’s a strategy to help you get started with your research.
Now that you have a general idea of what SPARQL is, here’s a strategy to help you get started with your research.


<!--T:10-->
There are tools that assist in writing SPARQL queries, but to gain autonomy and flexibility, it’s often more effective to start from an existing query and adapt it to your needs.
There are tools that assist in writing SPARQL queries, but to gain autonomy and flexibility, it’s often more effective to start from an existing query and adapt it to your needs.


<!--T:11-->
This approach allows you to:
This approach allows you to:
* Save time;
* Save time;
Line 33: Line 46:
* Personalize your research with precision.
* Personalize your research with precision.


<!--T:12-->
'''To get started, you can:'''
'''To get started, you can:'''
* Consult our examples of SPARQL queries;
* Consult our examples of SPARQL queries;
* Use artificial intelligence tools capable of generating queries based on your needs.
* Use artificial intelligence tools capable of generating queries based on your needs.


<!--T:13-->
This tutorial will guide you through the basics of SPARQL and teach you how to identify the key elements needed to adapt an existing query effectively.
This tutorial will guide you through the basics of SPARQL and teach you how to identify the key elements needed to adapt an existing query effectively.


----
----


<!--T:14-->
== <span style="color:#158f68;">3. The Basics of a SPARQL Query</span> ==
== <span style="color:#158f68;">3. The Basics of a SPARQL Query</span> ==


<!--T:15-->
A SPARQL query is built around two essential components:
A SPARQL query is built around two essential components:


Line 48: Line 65:
* '''WHERE''' – filters the data by setting specific conditions that the results must meet.
* '''WHERE''' – filters the data by setting specific conditions that the results must meet.


<!--T:16-->
=== Simple Example ===
=== Simple Example ===


<!--T:17-->
Here’s a query that retrieves the first and last names of people in the database.   
Here’s a query that retrieves the first and last names of people in the database.   
Lines starting with <code>#</code> are comments to help explain each part of the query.
Lines starting with <code>#</code> are comments to help explain each part of the query.
Line 62: Line 81:
</syntaxhighlight>
</syntaxhighlight>


<!--T:18-->
'''Explanation:'''
'''Explanation:'''
1. <code>SELECT ?nom ?prenom</code>: specifies that we want to display the values of the <code>?nom</code> and <code>?prenom</code> variables.
1. <code>SELECT ?nom ?prenom</code>: specifies that we want to display the values of the <code>?nom</code> and <code>?prenom</code> variables.
2. <code>WHERE { ... }</code>: defines the conditions the data must meet to be included in the results.
2. <code>WHERE { ... }</code>: defines the conditions the data must meet to be included in the results.


<!--T:19-->
'''Line-by-line breakdown:'''
'''Line-by-line breakdown:'''
* <code>?personne wdt:P1 wd:Q2</code>: selects items classified as human beings (P1 = item type, Q2 = person).
* <code>?personne wdt:P1 wd:Q2</code>: selects items classified as human beings (P1 = item type, Q2 = person).
Line 72: Line 92:
* <code>wdt:P2 ?prenom</code>: retrieves the first name of the person.
* <code>wdt:P2 ?prenom</code>: retrieves the first name of the person.


<!--T:20-->
You now know the foundation of any SPARQL query.   
You now know the foundation of any SPARQL query.   
You’ll be able to adapt them to your needs by selecting the right variables and adding filters, extra columns, or advanced options.
You’ll be able to adapt them to your needs by selecting the right variables and adding filters, extra columns, or advanced options.
</translate>

Revision as of 19:13, 31 March 2025

1. Introduction to SPARQL

Using SPARQL is like being a detective in a vast archive collection. Instead of browsing through each document one by one, you use a query language that lets you instantly retrieve information that matches your criteria.

In the context of Resistance in Belgium, SPARQL makes it easier to access data on resistance members: place of birth, residence, official recognition statuses, or affiliation with resistance organizations.

With SPARQL, you can:

  • Filter and cross-reference information;
  • Customize your searches with specific criteria;
  • Extract precise data without manually browsing thousands of records;
  • Generate visualizations to better interpret your results.

This approach gives you valuable autonomy in analyzing the dataset. You can not only extract name lists, but also identify complex relationships, such as individuals affiliated with multiple organizations or holding various recognition statuses.

SPARQL gives you the superpower coveted by researchers everywhere: asking ultra-specific questions and getting answers within milliseconds. Of course, like any superpower, it takes a bit of practice to master. But don’t worry—this tutorial is here to guide you and turn challenges into opportunities. Who said archival research had to be dusty?

Ready to master the force of SPARQL? Let’s go.


2. Strategy for Your First Queries

Now that you have a general idea of what SPARQL is, here’s a strategy to help you get started with your research.

There are tools that assist in writing SPARQL queries, but to gain autonomy and flexibility, it’s often more effective to start from an existing query and adapt it to your needs.

This approach allows you to:

  • Save time;
  • Avoid common errors;
  • Personalize your research with precision.

To get started, you can:

  • Consult our examples of SPARQL queries;
  • Use artificial intelligence tools capable of generating queries based on your needs.

This tutorial will guide you through the basics of SPARQL and teach you how to identify the key elements needed to adapt an existing query effectively.


3. The Basics of a SPARQL Query

A SPARQL query is built around two essential components:

  • SELECT – defines which information to display in the results.
  • WHERE – filters the data by setting specific conditions that the results must meet.

Simple Example

Here’s a query that retrieves the first and last names of people in the database. Lines starting with # are comments to help explain each part of the query.

SELECT ?nom ?prenom
WHERE {
  ?personne wdt:P1 wd:Q2 ;    # Selects people
            wdt:P3 ?nom ;    # Retrieves last name
            wdt:P2 ?prenom . # Retrieves first name
}

Explanation: 1. SELECT ?nom ?prenom: specifies that we want to display the values of the ?nom and ?prenom variables. 2. WHERE { ... }: defines the conditions the data must meet to be included in the results.

Line-by-line breakdown:

  • ?personne wdt:P1 wd:Q2: selects items classified as human beings (P1 = item type, Q2 = person).
  • wdt:P3 ?nom: retrieves the last name of the person.
  • wdt:P2 ?prenom: retrieves the first name of the person.

You now know the foundation of any SPARQL query. You’ll be able to adapt them to your needs by selecting the right variables and adding filters, extra columns, or advanced options.