Package 'hystReet'

Title: Get Pedestrian Frequency Data from the 'Hystreet' Project
Description: An R API wrapper for the 'Hystreet' project <https://hystreet.com>. 'Hystreet' provides pedestrian counts in different cities in Germany.
Authors: Johannes Friedrich [aut, cre]
Maintainer: Johannes Friedrich <[email protected]>
License: GPL-2
Version: 0.0.3
Built: 2025-02-28 07:19:32 UTC
Source: https://github.com/johannesfriedrich/hystreet

Help Index


hystReet

Description

An R API wrapper for the hystreet project. Download and analyse environmental data provided by https://hystreet.com/

Details

Package: hystReet
Type: Package
Version: 0.0.3
Date: 2022-11-24
License: GPL-2

Downloaded data for the vignette

Description

Downloaded data for the vignette

Format

[data.frame] with all available stations in March 2020

Author(s)

Johannes Friedrich


Downloaded data for the vignette

Description

Downloaded data for the vignette

Format

[data.frame] with pedestrians counta from January 2019

Author(s)

Johannes Friedrich


Get station IDs of the Hystreet project

Description

Get station IDs of the Hystreet project

Usage

get_hystreet_locations(API_token = NULL)

Arguments

API_token

character (optional): API key to get access to Hystreet API

Value

data.frame with parsed data from hystreet API

Function version

0.0.2

Author(s)

Johannes Friedrich

Examples

## Not run: 
 get_hystreet_locations()

## End(Not run)

Get data from a specific location from the Hystreet Project via Hystreet API

Description

Get data from a specific location from the Hystreet Project via Hystreet API

Usage

get_hystreet_station_data(
  hystreetId = NULL,
  query = NULL,
  no_metadata = FALSE,
  API_token = NULL
)

Arguments

hystreetId

integer (required): ID of the requested station. See get_hystreet_locations() for an overview of available IDs.

query

list (optional): A list with queries. Up do date the following queries are supported:

  • from: datetime of earliest measurement (default: today 00:00:00:): e.g. "2018-10-01 12:00:00" or "2018-10-01"

  • to : datetime of latest measurement (default: today 23:59:59): e.g. "2018-01-12 12:00:00" or "2018-12-01"

  • resolution: Resolution for the measurement grouping (default: hour): "day", "hour", "month", "week"

no_metadata

logical (optional): If set to TRUE, the result contains no meta data but only a clean data frame with the measurements of the requested station. Defaults to FALSE.

API_token

character (optional): API key to get access to Hystreet API

Value

data.frame with parsed data from hystreet API

Function version

0.0.3

Author(s)

Johannes Friedrich, Yannik Buhl

Examples

## Not run: 
## request data of the current day of station with hystreetId 71
get_hystreet_station_data(71)

## request data of December 2018 with resolution "day"
get_hystreet_station_data(
   hystreetId = 71, 
   query = list(from = "2018-12-01", to = "2018-12-31", resolution = "day"))
 
## End(Not run)

Get statistics from the Hystreet Project via Hystreet API

Description

Get statistics from the Hystreet Project via Hystreet API

Usage

get_hystreet_stats(verbose = FALSE, API_token = NULL)

Arguments

verbose

logical (optional): Show more verbose output?

API_token

character (optional): API key to get access to Hystreet API

Value

data.frame with parsed data from hystreet API

Function version

0.0.2

Author(s)

Johannes Friedrich

Examples

## Not run: 
 get_hystreet_stats(TRUE)

## End(Not run)

Downloaded data for the vignette

Description

Downloaded data for the vignette

Format

[list] with results from location 71 in december 2018

Author(s)

Johannes Friedrich


Downloaded data for the vignette

Description

Downloaded data for the vignette

Format

[data.frame] with all available locaations (03/27/2020)

Author(s)

Johannes Friedrich


Downloaded data for the vignette

Description

Downloaded data for the vignette

Format

[data.frame] with pedestrians counta/day

Author(s)

Johannes Friedrich


Read downloaded data from the hystreet webpage to data.frames

Description

Read downloaded data from the hystreet webpage to data.frames

Usage

read_hystreet_csv(path, ...)

Arguments

path

character (required): path to the downloaded csv file

...

(optional): arguments passed to utils::read.csv2()

Value

data.frame with parsed data from hystreet API

Function version

0.0.1

Author(s)

Johannes Friedrich

Examples

## Not run: 
## read data from downloaded csv file data
df <- hystReet::read_hystreet_csv("~/Downloads/hystreet.csv")

 
## End(Not run)

Set your API token for the Hystreet API

Description

Set your API token for the Hystreet API

Usage

set_hystreet_token(API_token = NULL)

Arguments

API_token

character (required): API key to get access to Hystreet API

Value

Set environment variable

Function version

0.0.1

Author(s)

Johannes Friedrich