GithubHelp home page GithubHelp logo

cities-cif's Introduction

Cities Indicator Framework

The Cities Indicator Framework (CIF) is a set of Python tools to make it easier to calculate zonal statistics for cities by providing a standardized set of data layers for inputs and a common framework for using those layers to calculate indicators.

Quick start

Installation

  • pip install git+https://github.com/wri/cities-cif/releases/latest gives you the latest stable release.
  • pip install git+https://github.com/wri/cities-cif gives you the main branch with is not stable.

PR Review

  1. Prerequisites
  2. Git
  3. https://cli.github.com/
    • On MacOS I recommend the Homebrew option
    • If you don't have an ssh key, it will install one for you
  4. Conda (or Mamba) to install dependencies
    • If you have Homebrew brew install --cask miniconda

Dependencies

There are 2 ways to install dependencies. Choose one...

Conda

conda env create -f environment.yml

Setuptools

python setup.py NOTE: If you are using this method you may want to use something like pyenv to manage Python environments

Credentials

To run the module,

  1. You need access to Google Earth Engine
  2. Install https://cloud.google.com/sdk/docs/install

Interactive development

For most people working in a notebook or IDE the script should walk you thourgh an interactive authentication process. You will just need to be logged in to your Google account that has access to GEE in your browser.

Programatic access

If you have issues with this or need to run the script as part of an automated workflow we have a GEE-enabled GCP service account that can be used. Get in touch with Saif or Chris to ask about getting the credetials.

Set the following environment variables:

  • GOOGLE_APPLICATION_CREDENTIALS: The path of GCP credentials JSON file containing your private key.
  • GOOGLE_APPLICATION_USER: The email for your GCP user.

For example, you could set the following in your ~/.zshrc file:

export GOOGLE_APPLICATION_USER=developers@citiesindicators.iam.gserviceaccount.com
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials/file

How to contribute

All are welcome to contribute by creating a Pull Request. We try to follow the Github Flow workflow.

See PR Review for more details and options on how to review a PR.

See the developer docs to learn more about how to add data layers and indicators.

cities-cif's People

Contributors

arshdoda avatar chrowe avatar jterry64 avatar kcartier-wri avatar s-ai-f avatar tedw0ng avatar weiqi-tori avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.