Skip to main content

A friendly package to download traffic count data from Telraam.net.

Project description

A friendly Python package to download traffic count data from Telraam.net.

The telraam_data package enables you to retrieve traffic count data from the Telraam Project API into pandas.DataFrame objects.

Examples

Downloading hourly counts for one segment

from telraam_data import download_segment
data = download_segment(segment_id=1003073114, fmt="per-hour")
data.to_excel("hourly-counts.xls")

Downloading daily counts for all segments

data = download_segment(segment_id="all", fmt="per-day")
data.to_csv("daily-counts.csv")

Plotting weekly average counts for all segments

data = download_segment("all", time_start="2020-01-01 00:00:00Z",
                        time_end="2021-01-01 00:00:00Z", fmt="per-day")
weekly_average = data.set_index('date').resample('7D').mean() * 7
weekly_average.plot(y=["car", "bike", "pedestrian"], marker='o')

Installation

If you have a working version of Python on your system, you can install the package using:

pip install telraam-data

Notes

  • This is a third-party package not officially affiliated with the Telraam project.

  • The Telraam API is documented at https://telraam-api.net.

  • Telraam’s data is made available under the CC BY 4.0 license. Thanks Telraam!

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

telraam-data-0.2.2.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file telraam-data-0.2.2.tar.gz.

File metadata

  • Download URL: telraam-data-0.2.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for telraam-data-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7b9a6cc0f1420bb02188e044ac16af8d474644f368156e60f1231e1598ecb713
MD5 fd04f43a87870c41ff0e0acda9ef1374
BLAKE2b-256 0f498fdeb4d74cb9178e5c1e192f516803811427488e82e345c112f5716362f6

See more details on using hashes here.

Supported by

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