Giter Site home page Giter Site logo

stellar-py's Introduction

stellar-py

Branch Build Coverage Docs
master Build Status Coverage Status Documentation Status
devel Build Status Coverage Status Documentation Status

Introduction

This repository hosts stellar-py, the Python Client for the Stellar Graph Analytics platform developed by CSIRO Data61.

The Stellar Python Client can perform the following functions:

  • Connect to the main Stellar platform
  • Ingest data from a CSV into a graph format
  • Perform entity resolution on the graph
  • Run a machine learning model to predict node attributes
  • Convert a graph into a networkx object

If you are interested in running the entire Stellar platform, please refer to the instructions on the main Stellar repository.

Requirements

Creating and setting up an environment to use stellar-py using Anaconda:

  1. Download and install Anaconda 3 from http://continuum.io
  2. Create a Conda environment. The following command creates an environment called stellar and installs pip.
    conda create --name stellar pip
    
  3. Activate the new environment.
    source activate stellar
    
  4. Install stellar-py using pip.
    pip install git+git://github.com/data61/stellar-py
    

You can also skip straight to 4. if you would like to install in an existing environment.

Basic Usage

Ingest from a single data source with columns (ID, FIRST_NAME, SURNAME, AGE) as vertices

import stellar as st

# create session
ss = st.create_session(url="stlr://12.34.56.78")

# create graph schema
schema = st.create_schema().add_node_type(
    name='Person',
    attribute_types={
        'first name': 'string',
        'last name': 'string',
        'age': 'integer'
    }
)

# configure data source
node_map = schema.node['Person'].create_map(
    path='people.csv',
    column='ID',
    map_attributes={
        'first name': 'FIRST_NAME',
        'last name': 'SURNAME',
        'age': 'AGE'
    }
)

# create graph 
graph = ss.ingest(schema=schema, mappings=[node_map], label='people')

Other examples

Examples can be found here

Additional Documentation

Visit http://stellar-py.readthedocs.io for a more in-depth guide and API references.

License

Copyright 2018 CSIRO Data61

Licensed under the Apache License, Version 2.0 (the "License"); you may not use the files included in this repository except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

stellar-py's People

Contributors

kjun9 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.