Title: | R Wrapper for Istanbul Municipality Open Data Portal |
Version: | 0.0.2 |
Description: | Call wrappers for Istanbul Metropolitan Municipality's Open Data Portal (Turkish: İstanbul Büyükşehir Belediyesi Açık Veri Portalı) at https://data.ibb.gov.tr/en/. |
License: | MIT + file LICENSE |
URL: | https://github.com/berkorbay/ibb |
BugReports: | https://github.com/berkorbay/ibb/issues |
Depends: | R (≥ 3.4) |
Imports: | dplyr, httr, jsonlite, rlang (≥ 0.1.2), magrittr, tibble, tidyselect |
Suggests: | testthat (≥ 2.1.0), covr, roxygen2 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
NeedsCompilation: | no |
Packaged: | 2021-02-17 11:56:14 UTC; bo |
Author: | Berk Orbay [aut, cre], Emrah Er [ctb] |
Maintainer: | Berk Orbay <orbayb@mef.edu.tr> |
Repository: | CRAN |
Date/Publication: | 2021-02-17 15:50:09 UTC |
ibb: R Wrapper for Istanbul Municipality Open Data Portal
Description
Call wrappers for Istanbul Metropolitan Municipality's Open Data Portal (Turkish: İstanbul Büyükşehir Belediyesi Açık Veri Portalı) at <https://data.ibb.gov.tr/en/>.
Author(s)
Maintainer: Berk Orbay berk.orbay@algopoly.com
See Also
Useful links:
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Fundamental Call Function
Description
Fundamental call function of (almost) all IBB Open Data Portal (exceptions apply)
Usage
call_data_ibb(
call_phrase = "",
root_url = "https://data.ibb.gov.tr/api/3/action/"
)
Arguments
call_phrase |
Suffix of the call url. |
root_url |
Root of the calls. |
Change Language to English
Description
Changes API language to English
Usage
change_language_to_english()
Get All Data Sources
Description
Get All Data Sources
Usage
get_all_data_sources(get_all_info = FALSE)
Arguments
get_all_info |
If TRUE return the whole list, otherwise just return the required result data frame. |
Get Info on All Data Sources
Description
Get Info on All Data Sources
Usage
get_all_detailed_info(verbose = FALSE)
Arguments
verbose |
If TRUE, it prints the track of the data being imported. |
Get Data Frame from Resource ID Value
Description
Given a data resource ID, this function returns the data frame.
Usage
get_data_frame_ibb(resource_id, limit = "", return_json = FALSE)
Arguments
resource_id |
Resource ID of the wanted data set. Run get_all_detailed_info to see the available IDs |
limit |
Maximum number of records |
return_json |
If TRUE, return a json string instead of a data frame. |
Examples
## Not run:
get_data_frame_ibb("99d1edb6-a889-4e69-be7b-21a3f90101f1")
## End(Not run)
Get Info on a Data Source
Description
Get Info on a Data Source
Usage
get_detailed_info_on_data_source(package_id, get_all_info = FALSE)
Arguments
package_id |
Package ID taken from the package list. Run get_all_detailed_info to see the available IDs |
get_all_info |
If TRUE return the whole list, otherwise just return the required result data frame. |
Examples
## Not run:
get_detailed_info_on_data_source("594ca91d-0c71-41da-b50a-c7cd30fab67a")
## End(Not run)
Environmental Monitoring and Control Data Based on Location in 2020
Description
It contains environmental monitoring and control data with 13 parameters, measured in 15-minute periods in 38 pre-determined locations in Istanbul for 2020.
Usage
get_environmental_monitoring_and_control_data(
params = list(limit = Sys.getenv("IBB_QUERY_LIMIT"))
)
Arguments
params |
List of parameters |
Examples
## Not run:
get_environmental_monitoring_and_control_data(params = list(limit = 5))
## End(Not run)
ibbWiFi Daily Data Usage
Description
Data set contains info about number of locations, number of subscribers, number of sessions, number of devices, data usage and usage duration.
Usage
get_ibb_wifi_daily_data_usage(
params = list(limit = Sys.getenv("IBB_QUERY_LIMIT"))
)
Arguments
params |
List of parameters |
ibbWiFi Daily New Subscribers
Description
Data set of new subscribers
Usage
get_ibb_wifi_daily_new_subscribers(
params = list(limit = Sys.getenv("IBB_QUERY_LIMIT"))
)
Arguments
params |
List of parameters |
ibbWiFi New Subscribers by Location
Description
Data set of new subscribers by subscription location
Usage
get_ibb_wifi_new_subscribers_by_location(
params = list(limit = Sys.getenv("IBB_QUERY_LIMIT"))
)
Arguments
params |
List of parameters |
Water Outage Complaints and Response Numbers by District in 2019
Description
Contains information on the number of complaints and responses to water outages and responses from all districts and neighborhoods across Istanbul in 2019, from the Istanbul Water and Sewerage Administration (İSKİ) call center.
Usage
get_iski_call_center_complaint_stats(
params = list(limit = Sys.getenv("IBB_QUERY_LIMIT"))
)
Arguments
params |
List of parameters |
Examples
## Not run:
get_iski_call_center_complaint_stats(params = list(limit = 5))
## End(Not run)
Get ISPARK Locations
Description
Get ISPARK Locations
Usage
get_ispark_locations(params = list(limit = Sys.getenv("IBB_QUERY_LIMIT")))
Arguments
params |
List of parameters |
Examples
## Not run:
get_ispark_locations(params = list(limit = 5))
## End(Not run)
Park, Garden and Green Area Data for 2019
Description
Includes the number of parks, number of trees maintained, number of sports grounds, length of sports fields, number of playgrounds, number of trees planted, and type of green areas in Istanbul in 2019.
Usage
get_park_garden_green_area_data(
params = list(limit = Sys.getenv("IBB_QUERY_LIMIT"))
)
Arguments
params |
List of parameters |
Examples
## Not run:
get_park_garden_green_area_data(params = list(limit = 5))
## End(Not run)
List of Data Sources
Description
Data frame containing all resource ids and data sources of IBB Open Data Portal
Usage
ibb_data_sources
Format
An object of class tbl_df
(inherits from tbl
, data.frame
) with 205 rows and 23 columns.
Set Query Limit
Description
Sets maximum number of returned results
Usage
set_query_limit(limit = 100)
Arguments
limit |
Limit of the maximum results |
Tidy eval helpers
Description
-
sym()
creates a symbol from a string andsyms()
creates a list of symbols from a character vector. -
enquo()
andenquos()
delay the execution of one or several function arguments.enquo()
returns a single quoted expression, which is like a blueprint for the delayed computation.enquos()
returns a list of such quoted expressions. -
expr()
quotes a new expression locally. It is mostly useful to build new expressions around arguments captured withenquo()
orenquos()
:expr(mean(!!enquo(arg), na.rm = TRUE))
. -
as_name()
transforms a quoted variable name into a string. Supplying something else than a quoted variable name is an error.That's unlike
as_label()
which also returns a single string but supports any kind of R object as input, including quoted function calls and vectors. Its purpose is to summarise that object into a single label. That label is often suitable as a default name.If you don't know what a quoted expression contains (for instance expressions captured with
enquo()
could be a variable name, a call to a function, or an unquoted constant), then useas_label()
. If you know you have quoted a simple variable name, or would like to enforce this, useas_name()
.
To learn more about tidy eval and how to use these tools, visit https://tidyeval.tidyverse.org and the Metaprogramming section of Advanced R.