| Type: | Package | 
| Title: | Get Pedestrian Frequency Data from the 'Hystreet' Project | 
| Date: | 2022-11-24 | 
| Version: | 0.0.3 | 
| Maintainer: | Johannes Friedrich <Johannes.Friedrich@posteo.de> | 
| Description: | An R API wrapper for the 'Hystreet' project https://hystreet.com. 'Hystreet' provides pedestrian counts in different cities in Germany. | 
| URL: | https://github.com/JohannesFriedrich/hystReet | 
| BugReports: | https://github.com/JohannesFriedrich/hystReet/issues | 
| License: | GPL-2 | 
| Depends: | R (≥ 3.5.0), httr, jsonlite, lubridate | 
| Suggests: | dplyr, ggplot2, htmltools, knitr, rmarkdown, scales | 
| LazyData: | true | 
| RoxygenNote: | 7.2.2 | 
| Encoding: | UTF-8 | 
| VignetteBuilder: | knitr | 
| NeedsCompilation: | no | 
| Packaged: | 2022-11-24 18:11:34 UTC; johannes | 
| Author: | Johannes Friedrich [aut, cre] | 
| Repository: | CRAN | 
| Date/Publication: | 2022-11-27 13:00:02 UTC | 
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 | 
Create request to Hystreet API
Description
Create request to Hystreet API
Usage
.create_hystreet_request(API_key = NULL, hystreetId = NULL, query = NULL)
Arguments
| API_key | [character]: API key to get access to Hystreet API | 
| hystreetId | [integer]: Id of a hystreet location | 
| query | [list]: Querys to get data for specific date. Use with argument path = c("from", "to", "resolution"). | 
Value
[data.frame] with parsed data from hystreet API
Function version
0.0.3
Author(s)
Johannes Friedrich, Yannik Buhl
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  | 
| query | list (optional): A list with queries. Up do date the following queries are supported: 
 | 
| no_metadata | logical (optional): If set to  | 
| 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  | 
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