OpenRefine: Difference between revisions

From EU Knowledge Graph
Jump to navigation Jump to search
(Created page with "This page contains instructions to connect OpenRefine to edit this Wikibase. # Requirements - local installation of OpenRefine - an account on the EuKnowledgeGraph allowing t...")
 
No edit summary
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page contains instructions to connect OpenRefine to edit this Wikibase.
This page contains instructions to connect OpenRefine to edit the EU Knowledge Graph. We offer a reconciliation service against the EU Knowledge Graph that makes it easy to use OpenRefine.


# Requirements
=== Requirements ===
- local installation of OpenRefine
* an account on the EU Knowledge Graph allowing to make edits. Request one here [mailto:CNECT-ECDORIS@ec.europa.eu CNECT-ECDORIS@ec.europa.eu].
- an account on the EuKnowledgeGraph allowing to make edits


# Setup
=== Setup ===
- Download OpenRefine (we tested with version ???)
 
* [https://openrefine.org/download.html Download OpenRefine] (we tested with version 3.5.2, version 3.7.0 is NOT working)
 
* Upload your data. For example
** Create Project
** Select Clipboard
** Insert the data in the Table below
**Next
**Create Project
 
{| class="wikitable"
|+
|entity
|program cci
|website
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463293</nowiki>
|2014GR16M1OP001
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/Greece/2014GR16M1OP001</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463518</nowiki>
|2014TC16I5CB001
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB001</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463519</nowiki>
|2014TC16I5CB002
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB002</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463520</nowiki>
|2014TC16I5CB003
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB003</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q4294076</nowiki>
|2014TC16I5CB004
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB004</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463524</nowiki>
|2014TC16I5CB005
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB005</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463525</nowiki>
|2014TC16I5CB006
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB006</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463526</nowiki>
|2014TC16I5CB007
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB007</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463529</nowiki>
|2014TC16I5CB008
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB008</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463530</nowiki>
|2014TC16I5CB009
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB009</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463531</nowiki>
|2014TC16I5CB010
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB010</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463534</nowiki>
|2014TC16M4TN001
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16M4TN001</nowiki>
|-
|<nowiki>https://linkedopendata.eu/entity/Q2463535</nowiki>
|2014TC16M4TN002
|<nowiki>https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16M4TN002</nowiki>
|}
 
=== Configure the EU Knowledge Graph as a Wikibase ===
* On the top right click on the Extensions Wikidata button and select "Select Wikibase instance"
* Add Wikibase
* Paste
<syntaxhighlight lang="json">
{
  "version":"1.0",
  "mediawiki":{
      "name":"EU Knowledge Graph",
      "root":"https://linkedopendata.eu/wiki/",
      "main_page":"https://linkedopendata.eu/wiki/Main_Page",
      "api":"https://linkedopendata.eu/w/api.php"
  },
  "wikibase":{
      "site_iri":"https://linkedopendata.eu/entity/",
      "tag":"",
      "maxlag":5,
      "properties":{
        "instance_of":"P35",
        "subclass_of":"P302"
      },
      "constraints":{
        "property_constraint_pid":"P861",
        "exception_to_constraint_pid":"P406",
        "constraint_status_pid":"P1150",
        "mandatory_constraint_qid":"Q236765",
        "suggestion_constraint_qid":"Q236827",
        "distinct_values_constraint_qid":"Q196794"
      }
  },
  "reconciliation":{
      "endpoint":"https://openrefine-reconciliation.linkedopendata.eu/${lang}/api"
  },
  "editgroups":{
      "url_schema":"([[:toollabs:editgroups/b/OR/${batch_id}|details]])"
  }
}
</syntaxhighlight>
 
* Press "Add Wikibase" and the EU Knowledge Graph will appear in the list as one options to choose.
 
=== Reconcile your data ===
 
In general follow the [https://docs.openrefine.org/manual/wikibase/reconciling instructions on OpenRefine] for these steps. Here is just an example:
 
* Choose the column "entity" and click on "Reconcile -> Use Values as Identifiers"
* Then the column will be completely reconcile
 
=== Model your data using the Wikibase Schema ===
In general follow the [https://docs.openrefine.org/manual/wikibase/schema-alignment instructions on OpenRefine] for these steps. Here is just an example:
 
* Click on the schema tab
* Click on "add item".
* Drag and drop "entity" to the field "item"
* Click on "add statement" and find the property "CCI ID" (P1367)
* Drag and drop the column name "program cci" to the statement item
* You can now do the same for the website column with the property "info Regio url" (P1742)
* You can now check if you have some issues with the import by checking the "Issues" tab or see a preview of what you've done.
 
=== Upload your data ===
In general follow the [https://docs.openrefine.org/manual/wikibase/uploading instructions on OpenRefine] for these steps. Here is just an example:
* In the upper right click on Wikidata -> Upload Edits to Wikibase
* Log in
* Upload Edits
 
The data you ingested is now available in the EU Knowledge Graph!

Latest revision as of 08:34, 27 February 2023

This page contains instructions to connect OpenRefine to edit the EU Knowledge Graph. We offer a reconciliation service against the EU Knowledge Graph that makes it easy to use OpenRefine.

Requirements

Setup

  • Upload your data. For example
    • Create Project
    • Select Clipboard
    • Insert the data in the Table below
    • Next
    • Create Project
entity program cci website
https://linkedopendata.eu/entity/Q2463293 2014GR16M1OP001 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/Greece/2014GR16M1OP001
https://linkedopendata.eu/entity/Q2463518 2014TC16I5CB001 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB001
https://linkedopendata.eu/entity/Q2463519 2014TC16I5CB002 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB002
https://linkedopendata.eu/entity/Q2463520 2014TC16I5CB003 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB003
https://linkedopendata.eu/entity/Q4294076 2014TC16I5CB004 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB004
https://linkedopendata.eu/entity/Q2463524 2014TC16I5CB005 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB005
https://linkedopendata.eu/entity/Q2463525 2014TC16I5CB006 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB006
https://linkedopendata.eu/entity/Q2463526 2014TC16I5CB007 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB007
https://linkedopendata.eu/entity/Q2463529 2014TC16I5CB008 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB008
https://linkedopendata.eu/entity/Q2463530 2014TC16I5CB009 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB009
https://linkedopendata.eu/entity/Q2463531 2014TC16I5CB010 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16I5CB010
https://linkedopendata.eu/entity/Q2463534 2014TC16M4TN001 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16M4TN001
https://linkedopendata.eu/entity/Q2463535 2014TC16M4TN002 https://ec.europa.eu/regional_policy/EN/atlas/programmes/2014-2020/europe/2014TC16M4TN002

Configure the EU Knowledge Graph as a Wikibase

  • On the top right click on the Extensions Wikidata button and select "Select Wikibase instance"
  • Add Wikibase
  • Paste
{
   "version":"1.0",
   "mediawiki":{
      "name":"EU Knowledge Graph",
      "root":"https://linkedopendata.eu/wiki/",
      "main_page":"https://linkedopendata.eu/wiki/Main_Page",
      "api":"https://linkedopendata.eu/w/api.php"
   },
   "wikibase":{
      "site_iri":"https://linkedopendata.eu/entity/",
      "tag":"",
      "maxlag":5,
      "properties":{
         "instance_of":"P35",
         "subclass_of":"P302"
      },
      "constraints":{
         "property_constraint_pid":"P861",
         "exception_to_constraint_pid":"P406",
         "constraint_status_pid":"P1150",
         "mandatory_constraint_qid":"Q236765",
         "suggestion_constraint_qid":"Q236827",
         "distinct_values_constraint_qid":"Q196794"
      }
   },
   "reconciliation":{
      "endpoint":"https://openrefine-reconciliation.linkedopendata.eu/${lang}/api"
   },
   "editgroups":{
      "url_schema":"([[:toollabs:editgroups/b/OR/${batch_id}|details]])"
   }
}
  • Press "Add Wikibase" and the EU Knowledge Graph will appear in the list as one options to choose.

Reconcile your data

In general follow the instructions on OpenRefine for these steps. Here is just an example:

  • Choose the column "entity" and click on "Reconcile -> Use Values as Identifiers"
  • Then the column will be completely reconcile

Model your data using the Wikibase Schema

In general follow the instructions on OpenRefine for these steps. Here is just an example:

  • Click on the schema tab
  • Click on "add item".
  • Drag and drop "entity" to the field "item"
  • Click on "add statement" and find the property "CCI ID" (P1367)
  • Drag and drop the column name "program cci" to the statement item
  • You can now do the same for the website column with the property "info Regio url" (P1742)
  • You can now check if you have some issues with the import by checking the "Issues" tab or see a preview of what you've done.

Upload your data

In general follow the instructions on OpenRefine for these steps. Here is just an example:

  • In the upper right click on Wikidata -> Upload Edits to Wikibase
  • Log in
  • Upload Edits

The data you ingested is now available in the EU Knowledge Graph!