Git Product home page Git Product logo

citychef's Introduction

City Chef

Welcome to City Chef, here you can build your own city.

City Chef is a collection of methodologies for essentially just randomly generating data, but where the data generating process (DGP) produces outputs, with distributions a real city. The code is intended for use in an interactive (ipython) environment.

The original motivation behind this project was to provide some synthetic data for this cool project and paper.

Check out my article for a detailed walk through the project.

Features

City Chef can synthesis cities with the following features:

Facilities - activity locations, such as households, workplaces and hospitals

Road Networks

Road Transit Routes

Rail Transit Network and Routes

Zones - statistical zones based on the city density

Population - agents, with consistent household attributes

Activity Plans - simple activity based plans for each agent

Motivation

The motivation behind this project is to fill a gap in availability of city data - because of privacy issues, commercial constraints, or because the quality and quantity of data required is not available. We also use City Chef for making small data for tests or toy examples, where we'd rather not use full city scale data. Included in this project are two such example applications:

1. OSM & GTFS Generator

Build a city with a road network and generate bus routes. Apply spatial noise to the networks. Output the road network to OSM format. Output the bus routes to GTFS.

We use this generator for making test case data for our big network combining tools.

Example

2. Census & Travel Survey Generator

Build a full city with facilities, statistical areas, road and transit networks. Use this city to generate households of persons with complex underlying distributions of attributes. Output household travel survey data with simple activity and mode choice. Output census marginal statistics. Output commuter OD matrix.

We use this generator for population synthesis experiments.

Example

Installation

python3.7 ipython7.0.1

after git clone:

cd citychef
pip3 install -r requirements.txt
pip3 install -e .

This project is WIP and more a collection of methods than a API, so we apologise in advance for environment pains.

pyproj: The GeoPandas library requires pyproj as a dependency. This can be a bit of a pain to install. For Mac OSX, activate the environment City Chef lives in and run the following commands before installation:

pip3 install cython
pip3 install git+https://github.com/jswhit/pyproj.git

On Windows, pre-compiled wheels of pyproj can be found on this page. Manually install the correct pyproj wheel within your environment using pip.

Critique/ideas/TODO

Technical

  • no doc strings
  • very little logging
  • no tests
  • needs epsg conversions (osm and gtfs)
  • needs better structure/API
  • many of the classes and methods share features
  • bad module names
  • speed vs detail trade-off

Theoretical

  • accessibility calculation is simplistic
  • activity plan synthesis is only simple tour based
  • facility locations only contain a single facility
  • transit route synthesis is pretty bad, especially for trains

More broadly City Chef uses directed tree like causation for the DGPs. This is primarily for simplicity/speed. But means that circular causation is only synthesised one way, for example, the feedback between facility locations and network.

citychef's People

Contributors

fredshone avatar shanenak avatar stasmix avatar andreweland 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.