Skip to content

Commit

Permalink
fix on my computer ...
Browse files Browse the repository at this point in the history
  • Loading branch information
defuneste committed Dec 13, 2024
1 parent 61807c0 commit 91fdfa6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cori.data.fcc
Title: Process FCC data
Version: 0.1.0
Version: 0.1.1
Authors@R:
person(given="Olivier", family="Leroy", email="[email protected]", role = c("aut", "cre"))
Description: Functions to get and process FCC data.
Expand Down
11 changes: 6 additions & 5 deletions R/get_nbm_available.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' paste0("https://broadbandmap.fcc.gov/nbm/",
#' "map/api/national_map_process/nbm_get_data_download/")
#' ```
#' @param get_data_url a string providing NBM filing API.
#' @param get_root_url a string providing NBM filing API.
#' @param user_agent a string set up by default
#'
#' @return A data frame.
Expand All @@ -16,12 +16,13 @@
#' head(nbm_data)

get_nbm_available <- function(
get_data_url = paste0("https://broadbandmap.fcc.gov/nbm/map/",
get_root_url = paste0("https://broadbandmap.fcc.gov/nbm/map/",
"api/national_map_process/nbm_get_data_download/"),
user_agent = the$user_agent) {

# get csv to dl only get a table with all link to be downloaded
get_csv_to_dl <- function(release_file, release_nb) {
get_data_url <- paste0(get_data_url,
get_data_url <- paste0(get_root_url,
release_file[release_nb, "process_uuid"])
# h <- curl::new_handle()
# curl::handle_setheaders(h, "User-Agent" = user_agent)
Expand All @@ -37,7 +38,7 @@ get_nbm_available <- function(
"-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8' ",
"-H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' ",
"-H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' ",
"-H 'Referer: https://broadbandmap.fcc.gov/data-download'",
"-H 'Referer: https://broadbandmap.fcc.gov/data-download' ",
"-H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: none' -H 'Sec-Fetch-User: ?1' ",
"-H 'Sec-GPC: 1' -H 'Priority: u=0, i' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'TE: trailers'"
),
Expand All @@ -64,4 +65,4 @@ get_nbm_available <- function(

slim_all_data <- all_data[, col_to_keep]
return(slim_all_data)
}
}
4 changes: 2 additions & 2 deletions man/get_nbm_available.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91fdfa6

Please sign in to comment.