Jump to content
Toggle sidebar
UNITApedia
Search
English
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Talk
Contributions
Navigation
Main Page
User Guide
Documentation
Viewpoints
Structural
Strategic
Beneficiary
Semantic
Infrastructure
Data
Beneficiaries
UNITA Participants
GEMINAE
Collectives
Agile Management Guide
Quality Management Process
Tools
What links here
Related changes
Special pages
Page information
Page values
In other languages
Editing
Documentation
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
More
Read
Edit
Edit source
View history
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Data Access and Consumption == === MediaWiki for Data Retrieval === MediaWiki serves as the primary front-end for displaying and interacting with UNITApedia data. Its [https://www.mediawiki.org/wiki/Extension:External_Data External Data extension] allows the wiki to query the [https://unitapedia.univ-unita.eu/pga/ PostgreSQL] datamart directly, retrieving the latest processed data (e.g., indicators, event counts, user engagement metrics). ==== External Data Extension ==== <pre> $wgExternalDataSources['DW_UNITAData_DEMOJAN25_T125'] = [ 'server' => 'datawarehouse', 'type' => 'postgres', 'name' => 'datamart', 'user' => getenv('DATABASE_USERNAME'), 'password' => getenv('DATABASE_PASSWORD'), 'prepared' => <<<'POSTGRE' SELECT * FROM public.t125 ORDER BY id ASC; POSTGRE ]; </pre> * Defines a named data source (<code>DW_UNITAData_DEMOJAN25_T125</code>) pointing to the datamart database. * Uses prepared SQL statements for efficient and secure queries. * Data retrieval is performed via parser functions like <code>#get_db_data</code> to pull records into wiki pages. ==== Custom Namespaces ==== * <code>DataSrc</code> (ID 810) is used for storing and managing data imports. * <code>Doc</code> (ID 800) holds documentation or supplementary content. * These namespaces help organize data separately from content pages, and control access/edit permissions as needed. ==== Example Page for Data Import ==== <pre> {{#get_db_data: db=DW_UNITAData_DEMOJAN25_T125 |data=id=id,People_active=people_active,entry_date=date |cache seconds=0 }} {{#store_external_table: DW_UNITAData_DEMOJAN25_T125 |id={{{id}}} |People_active={{{People_active}}} |entry_date={{{entry_date}}} }} {{#ask: [[-Has subobject::{{FULLPAGENAME}}]] |?id |?People_active |?entry_date |class=datatable |format=datatables |mainlabel=- |header=show }} </pre> * <code>#get_db_data</code> fetches rows from <code>datamart.public.t125</code>. * <code>#store_external_table</code> writes these rows into Semantic MediaWiki subobjects, enabling semantic queries. * <code>#ask</code> displays the results in a dynamic DataTables format. [[File:DataSrcNamespace.png|thumb|930px|center|DataSrc Namespace Demo]] === MediaWiki for Dashboards and Reports === MediaWiki’s flexibility allows you to build custom dashboards for stakeholders using a combination of extensions (e.g., [https://www.mediawiki.org/wiki/Extension:PageForms PageForms], [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto], [https://www.mediawiki.org/wiki/Extension:Cargo Cargo], [https://www.mediawiki.org/wiki/Extension:Maps Maps], [https://www.mediawiki.org/wiki/Extension:Charts Charts]). You can present numeric indicators, graphs, and charts inline on wiki pages. ==== MediaWiki-Based Dashboards ==== * '''Charts and Graphs''': Extensions like [https://www.mediawiki.org/wiki/Extension:Graph Graph], [https://www.mediawiki.org/wiki/Extension:Maps Maps], or [https://www.mediawiki.org/wiki/Extension:Timeline Timeline] can visually represent indicator trends (e.g., monthly website traffic, number of participants at events). * '''Interactive Tables''': The DataTables format (shown above) enables sorting, filtering, and pagination of tabular data. ==== Key Performance Indicators (KPIs) ==== * The system tracks various KPIs such as <q>Percentage of deliverables submitted on time</q>, <q>Number of participants in matching events</q>, and <q>Website traffic volume</q>. * These metrics can be displayed as gauges, time-series charts, or tables, depending on stakeholder needs. [[File:Graphs example.png|thumb|930px|center|Graphs Extension]]
Summary:
Please note that all contributions to UNITApedia are considered to be released under the Creative Commons Zero (public domain) (see
UNITApedia:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Debug data: