Skip to main content

Python access to the CityIQ api.

Project description

This module and command line tool provides access to the CityIQ API, with particular focus on getting metadata and parking events. The interface includes a basic access object for getting metadata and events, a scraper object for mass downloading events, and a command line tool for downloading and processing events.

Quickstart

Install the module with pip:

pip install cityiq

Then generate a configuration file with:

ciq_config  -w

Edit the file with your credentials and other information for your system. The default file is configured for the San Diego system, but you may have to update the client id and password.

You can list the nodes, assets and locations in the system with the ciq_nodes program:

ciq_nodes --locations # display locations a JSON lines
ciq_nodes --cameras # display camera assets as JSON lines
# etc

You can also dump all assets or all locations to CSV files.

ciq_nodes -A assets.csv
ciq_nodes -L locations.csv

Getting events is a two step process, and can be done with either the CLI programs or the Python API. To get events with the CLI, fors download them to the cache. The cache location is defined in the configuration file, and should have at least 100GB of free space.

First, download and cache the events. The download will run for all of the assets that have the given event, over the whole time range. On the San Diego system, time ranges longer than a few months can take days to download.

ciq_events -e BICYCLE -s 2020-01-01 -f 2020-02-01

The downloaded data is stored in the cache as CSV files, which you can load directly in which pandas or dask, or convert to one CSV file per asset:

ciq_events -e BICYCLE -s 2020-01-01 -f 2020-02-01

Devlopment

Committing

The project scaffold gets the version number for the module from git. To get the version number:

$ python setup.py --version

Set the version with a tag. The version numbers are specified with PEP440

$ git tag 0.0.1

Remember to push tags to the remote with git push --tags

Publishing

Publish the project to to PyPI with twine:

pip install twine
twine upload dist/*

Scaffolding

This project has been set up using PyScaffold 3.1. For details and usage information on PyScaffold see https://pyscaffold.org/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cityiq-0.1.5.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cityiq-0.1.5-py2.py3-none-any.whl (30.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cityiq-0.1.5.tar.gz.

File metadata

  • Download URL: cityiq-0.1.5.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for cityiq-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3014801bb5e118f91adc485712d8f576ca68621dc6a296505b0414d4adca998b
MD5 79065ef5045e4139eb0e9036256aa042
BLAKE2b-256 05bea1d3147bb96b72a157f7be9d9c6fab914f36452fa18723c9fa81b0eac3c6

See more details on using hashes here.

File details

Details for the file cityiq-0.1.5-py2.py3-none-any.whl.

File metadata

  • Download URL: cityiq-0.1.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for cityiq-0.1.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7e6aac5beb8c7ebbc02cdf1b0c4cbcdcc780f44b3263b22a056b9dce4dd96671
MD5 dc510e482ca32e62e406500ea5c510d5
BLAKE2b-256 488209dec52e8f3d23dde164a239402fb32a4657bcaa5f9ba7deeb69b29ce3aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page