All Projects → lennertVanSever → graphcountries

lennertVanSever / graphcountries

Licence: other
An easy to use GraphQL API to query country-related data for free and without restrictions

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to graphcountries

world
A Laravel package which provides a list of the countries, states, cities, currencies, timezones and languages.
Stars: ✭ 479 (+685.25%)
Mutual labels:  currencies, timezones, countries-api
networkx-neo4j
NetworkX API for Neo4j Graph Algorithms.
Stars: ✭ 98 (+60.66%)
Mutual labels:  neo4j, graph-algorithms
Neo4j Graph Algorithms
Efficient Graph Algorithms for Neo4j
Stars: ✭ 713 (+1068.85%)
Mutual labels:  neo4j, graph-algorithms
blogs
Jupyter notebooks that support my graph data science blog posts at https://bratanic-tomaz.medium.com/
Stars: ✭ 153 (+150.82%)
Mutual labels:  neo4j, graph-algorithms
Sentiment Analysis Twitter Microservices Example
A sample application that demonstrates how to build a graph processing platform to analyze sources of emotional influence on Twitter.
Stars: ✭ 45 (-26.23%)
Mutual labels:  neo4j, graph-algorithms
Neo4j Apoc Procedures
Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            
Stars: ✭ 1,291 (+2016.39%)
Mutual labels:  neo4j, graph-algorithms
Kglab
Graph-Based Data Science: an abstraction layer in Python for building knowledge graphs, integrated with popular graph libraries – atop Pandas, RDFlib, pySHACL, RAPIDS, NetworkX, iGraph, PyVis, pslpython, pyarrow, etc.
Stars: ✭ 98 (+60.66%)
Mutual labels:  neo4j, graph-algorithms
Graph Data Science
Source code for the Neo4j Graph Data Science library of graph algorithms.
Stars: ✭ 251 (+311.48%)
Mutual labels:  neo4j, graph-algorithms
hdx-python-country
Utilities to map between country and region codes and names and to match administrative level names from different sources. Also utilities for foreign exchange enabling obtaining current and historic FX rates for different currencies
Stars: ✭ 16 (-73.77%)
Mutual labels:  currencies, countries-api
datatheque.com
a data science blog
Stars: ✭ 12 (-80.33%)
Mutual labels:  neo4j
nest-neo4j
A NestJS module for integrating with Neo4j
Stars: ✭ 54 (-11.48%)
Mutual labels:  neo4j
gram-js
Gram in javascript.
Stars: ✭ 21 (-65.57%)
Mutual labels:  neo4j
mazes
A comprehensive library of algorithms for creating perfect mazes.
Stars: ✭ 64 (+4.92%)
Mutual labels:  graph-algorithms
neo4j.cr
Pure-Crystal implementation of Neo4j's Bolt protocol
Stars: ✭ 29 (-52.46%)
Mutual labels:  neo4j
Erdos.jl
A library for graph analysis written Julia.
Stars: ✭ 37 (-39.34%)
Mutual labels:  graph-algorithms
d3js-neo4j-example
Some of D3.js v5 example pages visualize the result from Neo4j
Stars: ✭ 37 (-39.34%)
Mutual labels:  neo4j
pheno4j
Pheno4j: a graph based HPO to NGS database
Stars: ✭ 31 (-49.18%)
Mutual labels:  neo4j
django-test-addons
Testing support for different database system like Mongo, Redis, Neo4j, Memcache, Django Rest Framework for django
Stars: ✭ 20 (-67.21%)
Mutual labels:  neo4j
uconfig
Lightweight, zero-dependency, and extendable configuration management library for Go
Stars: ✭ 53 (-13.11%)
Mutual labels:  flags
cytoscape.js-fcose
fCoSE: a fast Compound Spring Embedder
Stars: ✭ 94 (+54.1%)
Mutual labels:  graph-algorithms

Graph countries

Use GraphQL to query country-related data, free of charge and without restrictions. The data is the same as restcountries.eu with extra emoji's for flags because who doesn't like emoji's?

Explore the playground

Some example queries:

You can also select, paginate, filter, search and order any entity, the options are endless.

Once you have your desired query you can fetch the data like any other GraphQL endpoint but you probably want to use something like appolo client.

fetch('https://countries-274616.ew.r.appspot.com', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: `
    query {
      CallingCode {
        name
        countries {
          name
        }
      }
    }

` }),
})
  .then(res => res.json())
  .then(res => console.log(res.data));

How it works

The data from restcountries.eu is scraped with a JS script and inserted into a Neo4j graph database. Afterwards the GraphQL schema is automagically infered by the awesome neo4j-graphql-js package. We add some custom cypher queries to the schema to make the shortest path and distance data possible. Finally an Apollo server is used to create the GraphQL endpoint and playground.

Self hosting

It's quite straightforward to host the API yourself, unfortunately I can't share a read only user to the Neo4j database since I don't have a Neo4j enterprise license so you will need your own Neo4j graph database

Prerequisites:

Getting started:

  1. Clone this repo and navigate to it

  2. Create an .env file on the project root folder with your Neo4j credentials and an optional apollo engine API key

    ENGINE_API_KEY=REPLACE_ME_WITH_YOUR_APOLLO_ENGINE_API_KEY
    BOLT_ADDRESS=REPLACE_ME_WITH_YOUR_NEO4J_BOLT_ADDRESS
    DB_USERNAME=REPLACE_ME_WITH_YOUR_NEO4J_USERNAME
    DB_PASSWORD=REPLACE_ME_WITH_YOUR_NEO4J_PASSWORD
    
  3. Download the dependencies, run npm install

  4. Populate the Neo4j graph database, run npm run dataScraping. When this command is done, you will get an infered schema file in the graphql repo, you can use this to optionally change the main schema.graphql file in the same repo

  5. Start the GraphQL in dev mode, run npm run dev

  6. Visit http://localhost:8080/ to discover your self hosted API, have fun!

Graphql voyager

You can also explore the schema with graphql-voyager

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].