Created
September 29, 2022 14:09
-
-
Save elipousson/92861281d9b70e6c05b8c0c986e5903d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# read_sf_felt( | |
# "https://felt.com/embed/map/Example-Greatest-Bowling-Alleys-in-the-US-W9A04huJxTSCxfESYhkY9AOA" | |
# ) | |
read_sf_felt <- function(url) { | |
req <- | |
httr2::request( | |
url | |
) | |
resp <- | |
httr2::req_perform( | |
req | |
) | |
data <- | |
xml2::as_list( | |
httr2::resp_body_html( | |
resp | |
) | |
) | |
data <- | |
jsonlite::parse_json( | |
data$html$body$div$div[[1]] | |
) | |
data | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment