Skip to content

gaoyuanliang/covid19_knowledge_graph

Repository files navigation

Covid 19 Knowledge Graph with Neo4j

Building a Knowledge graph of covid19 on neo4j, from the data of Wikipedia data, Wikidata, by SPARQL querying

If you are working on similar projects, I am happy to help. Contact me by [email protected]

installation

installation of Neo4j

wget http://neo4j.com/artifact.php?name=neo4j-community-3.5.12-unix.tar.gz
tar -xf 'artifact.php?name=neo4j-community-3.5.12-unix.tar.gz'
cd neo4j-community-3.5.12
bin/neo4j start

go to url

http://localhost:7474/

bolt://localhost:7687
user name:neo4j
password neo4j

reset new password to

neo4j1

installation of pyspark and neo4j package

pip3 install pyspark
pip3 install neo4j

download this package

git clone https://github.com/gaoyuanliang/covid19_knowledge_graph.git
cd covid19_knowledge_graph

data collection

collect the entities and relationships of covid 19 from wikibase by SPARQL queries at https://query.wikidata.org/

SELECT ?s ?sLabel ?sAltLabel ?st ?stLabel 
?rp ?rpLabel 
?o ?oLabel ?oAltLabel ?ot ?otLabel 
WHERE
{
?s wdt:P361 wd:Q83741704 .
?s ?r ?o .
?s wdt:P31 ?st .
?o wdt:P31 ?ot .
?rp wikibase:directClaim ?r . 
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

SELECT ?s ?sLabel ?sAltLabel ?st ?stLabel 
?rp ?rpLabel 
?o ?oLabel ?oAltLabel ?ot ?otLabel 
WHERE
{
?o wdt:P361 wd:Q83741704 .
?s ?r ?o .
?s wdt:P31 ?st .
?o wdt:P31 ?ot .
?rp wikibase:directClaim ?r . 
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

building knowledge graph at neo4j

ingest the data into neo4j

python3 jessica_covid_knowledge_graph.py

check the kowledge graph

go to http://localhost:7474/ to see the results

build use cases from neo4j

ongoing

TODO list

Contact

I am actively looking for a data science/AI related job. If you have such an opportunity, thank you so much for contacting me. I am ready for an interview at any time. My email is [email protected]