Skip to content

Github mirror of "labs/tools/WdTmCollab" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Notifications You must be signed in to change notification settings

wikimedia/labs-tools-WdTmCollab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WdTmCollab

Wikidata Transmedia Collaboration Explorer

WdTmCollab is a tool which leverages Wikidata's structured film and television data to analyze their partnerships, identifying frequent collaborators and shared projects while extending insights to directors and producers for a comprehensive view of industry dynamics.


Table of Contents


About the Project

This tool visualizes connections in the film industry using data from Wikidata. It helps users explore:

  • Actor Collaborations: Who works with whom frequently?
  • Shared Productions: Which movies/shows feature specific pairings?
  • Industry Dynamics: Insights into directors and producers.

Deployed Application: https://wdtmcollab.toolforge.org

Tech Stack

Getting Started

Follow these instructions to set up the project locally.

Prerequisites

  • Node.js (v20 or higher recommended)
  • npm, yarn, pnpm, or bun

Installation

  1. Clone the repository:

    git clone https://gerrit.wikimedia.org/r/admin/repos/labs/tools/WdTmCollab
    cd WdTmCollab
  2. Install dependencies:

    npm install

Running Locally

Start the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

API Documentation

The WdTmCollab API provides endpoints for accessing Wikidata film and television data.

Base URL

https://wdtmcollab-api.toolforge.org

Headers

All API requests should include the following headers:

{
  "Content-Type": "application/json",
  "Accept": "application/json"
}

Response Format

Success responses return JSON data. Errors return a standard error object.

Error Example:

{
  "error": "Error description",
  "message": "Detailed error message",
  "status": 400
}

Endpoints

Actors

GET /actors/search

Search for actors by name.

Parameter Type Required Description
name string Yes The name of the actor to search for.

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/actors/search?name=Tom%20Hanks"
GET /actors/details/{id}

Get detailed information about a specific actor.

Parameter Type Required Description
id string Yes The Wikidata ID of the actor (e.g., Q2263).

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/actors/details/Q2263"
GET /actors/co-actors

Get co-actors for a given actor.

Parameter Type Required Default Description
actor1Id string Yes - The Wikidata ID of the actor.
limit integer No 20 Number of results to return.
offset integer No 0 Number of results to skip.

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/actors/co-actors?actorId=Q2263&limit=8"
GET /actors/popular

Get a list of popular actors.

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/actors/popular"

Productions

GET /productions/search

Search for productions (movies/TV) by title.

Parameter Type Required Description
title string Yes The title of the production to search for.

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/productions/search?title=Forrest%20Gump"
GET /productions/shared

Get productions shared between two actors.

Parameter Type Required Description
actor1Id string Yes The Wikidata ID of the first actor.
actor2Id string Yes The Wikidata ID of the second actor.

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/productions/shared?actor1Id=Q2263&actor2Id=Q27205"
GET /productions/shared-actors

Get shared actors between two movies.

Parameter Type Required Description
movie1 string Yes The Wikidata ID of the first movie.
movie2 string Yes The Wikidata ID of the second movie.

Example:

curl -X GET "https://wdtmcollab-api.toolforge.org/productions/shared-actors?movie1=Q43274&movie2=Q223423"

Errors & Rate Limiting

  • Status Codes:

    • 200 OK: Request successful.
    • 400 Bad Request: Missing parameters or invalid format.
    • 404 Not Found: Resource not found.
    • 429 Too Many Requests: Rate limit exceeded.
    • 500 Internal Server Error: Server error.
  • Rate Limiting: Fair usage policies apply. If exceeded, a 429 status is returned.

Accessibility

WdTmCollab is committed to digital accessibility.

Features

  • Skip to Content: Bypass navigation for keyboard users.
  • Keyboard Navigation: Full support for interactive elements.
  • Semantic HTML: Optimized for screen readers.

Testing

Automated accessibility tests use axe-playwright.

npx playwright test src/tests/accessibility.spec.ts

About

Github mirror of "labs/tools/WdTmCollab" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 12

Languages