Learn R Programming

rsocialwatcher (version 0.1.1)

'Facebook Marketing API' Social Watcher

Description

Facilitates querying data from the ‘Facebook Marketing API', particularly for social science research . Data from the 'Facebook Marketing API' has been used for a variety of social science applications, such as for poverty estimation (Marty and Duhaut (2024) ), disease surveillance (Araujo et al. (2017) ), and measuring migration (Alexander, Polimis, and Zagheni (2020) ). The package facilitates querying the number of Facebook daily/monthly active users for multiple location types (e.g., from around a specific coordinate to an administrative region) and for a number of attribute types (e.g., interests, behaviors, education level, etc). The package supports making complex queries within one API call and making multiple API calls across different locations and/or parameters.

Copy Link

Version

Install

install.packages('rsocialwatcher')

Monthly Downloads

149

Version

0.1.1

License

MIT + file LICENSE

Maintainer

Robert Marty

Last Published

May 6th, 2024

Functions in rsocialwatcher (0.1.1)

map_param_vec

Map Parameters over Vector Converts a vector into a map_param object. When a map_param object is entered as a parameter in query_fb_marketing_api(), query_fb_marketing_api() makes a separate API query for each item within map_param (ie, for each item in the original vector entered into map_param). A map_param object is structured as a list, where the map_param class triggers the query_fb_marketing_api function to make a separate API query for each item in the list.
get_fb_parameter_ids

Get Facebook Parameter IDs
get_location_coords

Get Coordinates/Geometries for Valid Location Keys
query_fb_marketing_api

Query 'Facebook Marketing' API
get_fb_suggested_radius

Get Suggested Radius
map_param

Map Parameters within query_fb_marketing_api() Groups input into a map_param object. When a map_param object is entered as a parameter in query_fb_marketing_api(), query_fb_marketing_api() makes a separate API query for each item within map_param. A map_param object is structured as a list, where the map_param class triggers the query_fb_marketing_api function to make a separate API query for each item in the list.