Skip to content

Commit

Permalink
Merge pull request #26 from CDCgov/whitew-battelle1
Browse files Browse the repository at this point in the history
Remove the 443 port from the url of the API calls
  • Loading branch information
whitew-battelle authored May 31, 2024
2 parents 081e787 + 295fcf7 commit 4a20723
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions R/get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ get_data<-



url <- paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/getCoreHolder/",
url <- paste0("https://ephtracking.cdc.gov/apigateway/api/v1/getCoreHolder/",
SL_df_complete[gch,]$measureId,"/",
SL_df_complete[gch,]$stratificationLevelId,"/", #stratification level id
smoothing, "/",
Expand All @@ -414,7 +414,7 @@ get_data<-

}else{

url <- paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/getCoreHolder/",
url <- paste0("https://ephtracking.cdc.gov/apigateway/api/v1/getCoreHolder/",
SL_df_complete[gch,]$measureId,"/",
SL_df_complete[gch,]$stratificationLevelId,"/", #stratification level id
smoothing, "/",
Expand Down
2 changes: 1 addition & 1 deletion R/list_GeographicItems.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ list_GeographicItems <- function(measure,
function(gg){

url <- paste0(
"https://ephtracking.cdc.gov:443/apigateway/api/v1/geographicItems/",
"https://ephtracking.cdc.gov/apigateway/api/v1/geographicItems/",
meas_ID[gg],"/",geo_typeID[gg],"/",rollup)

if(!is.null(token) &
Expand Down
2 changes: 1 addition & 1 deletion R/list_GeographicTypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ list_GeographicTypes <- function(measure,

GL_list <- purrr::map( 1:length(meas_ID), function(geolev){

url <- paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/geographicTypes/",
url <- paste0("https://ephtracking.cdc.gov/apigateway/api/v1/geographicTypes/",
meas_ID[geolev])

if(!is.null(token) &
Expand Down
2 changes: 1 addition & 1 deletion R/list_StratificationLevels.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ list_StratificationLevels <-
#ephtracking.cdc.gov/apigateway/api/{version}/stratificationlevel/
# {measureId}/{geographicTypeId}/{isSmoothed}[?apiToken]

url <- paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/stratificationlevel/",
url <- paste0("https://ephtracking.cdc.gov/apigateway/api/v1/stratificationlevel/",
GL_list_sub$measureId[i],"/",
GL_list_sub$geographicTypeId[i],"/",
smoothing)
Expand Down
2 changes: 1 addition & 1 deletion R/list_StratificationTypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ list_StratificationTypes <-
# ephtracking.cdc.gov/apigateway/api/{version}/stratificationTypes/{measureId}/{geographicTypeId}/
# {isSmoothed}[?apiToken]

url <- paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/stratificationTypes/",
url <- paste0("https://ephtracking.cdc.gov/apigateway/api/v1/stratificationTypes/",
GL_list_sub$measureId[i],"/",
GL_list_sub$geographicTypeId[i],"/",smoothing)

Expand Down
2 changes: 1 addition & 1 deletion R/list_content_areas.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ list_content_areas <- function(token=NULL){
}


url <- "https://ephtracking.cdc.gov:443/apigateway/api/v1/contentareas/json"
url <- "https://ephtracking.cdc.gov/apigateway/api/v1/contentareas/json"

if(!is.null(token) &
is.character(token)){
Expand Down
2 changes: 1 addition & 1 deletion R/list_geographies.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ list_geographies<-function(measure=NA,

geo_list <- purrr::map(1:length(meas_ID),
function(gg){
geo<-httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/geography/",
geo<-httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/geography/",
meas_ID[gg],"/",geo_type_ID[gg],"/",rollup))
geo_cont<-jsonlite::fromJSON(rawToChar(geo$content))
geo_cont$Measure_ID<-meas_ID[gg]
Expand Down
2 changes: 1 addition & 1 deletion R/list_geography_types.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ list_geography_types<-function(measure=NA,

GL_list<-purrr::map(1:length(meas_ID), function(geolev){
GL<-
httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/geographicLevels/",
httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/geographicLevels/",
meas_ID[geolev]))

GL_cont<-jsonlite::fromJSON(rawToChar(GL$content))
Expand Down
2 changes: 1 addition & 1 deletion R/list_measures.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ list_measures <- function(indicator=NA,



measures_url <- "https://ephtracking.cdc.gov:443/apigateway/api/v1/measuresearch"
measures_url <- "https://ephtracking.cdc.gov/apigateway/api/v1/measuresearch"


if(!is.null(token) &
Expand Down
2 changes: 1 addition & 1 deletion R/list_stratification_levels.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ list_stratification_levels<-
SL_list<-purrr::map(1:length(meas_ID), function(strlev){

SL<-
httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/stratificationlevel/",
httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/stratificationlevel/",
meas_ID[strlev],"/",geo_type_ID[strlev],"/",smoothing))
SL_cont<-jsonlite::fromJSON(rawToChar(SL$content))
SL_cont$Measure_ID<-meas_ID[strlev]
Expand Down
2 changes: 1 addition & 1 deletion R/list_stratification_values.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ list_stratification_values <-
MS_list<-purrr::map(1:length(meas_ID),function(measstrat){

MS<-
httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/measurestratification/",
httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/measurestratification/",
meas_ID[measstrat],"/",
geo_type_ID[measstrat],"/",smoothing))

Expand Down
2 changes: 1 addition & 1 deletion R/list_temporal.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ list_temporal <- function(measure=NA,
temp_list<-purrr::map(1:nrow(geo_parentid_table), function(tp){

temp<-
httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/temporal/",
httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/temporal/",
geo_parentid_table$Measure_ID[tp],"/",
geo_parentid_table$Geo_Type_ID[tp],"/",
geo_filter,"/",geo_parentid_table$parentGeographicId[tp]))
Expand Down
6 changes: 3 additions & 3 deletions R/update_inventory.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ update_inventory<-function(){
message("Downloading inventory...")

CAs_raw <-
httr::GET("https://ephtracking.cdc.gov:443/apigateway/api/v1/contentareas/json")
httr::GET("https://ephtracking.cdc.gov/apigateway/api/v1/contentareas/json")
CAs<-jsonlite::fromJSON(rawToChar(CAs_raw$content))
CA_id<-CAs$id

Expand All @@ -35,7 +35,7 @@ update_inventory<-function(){

inds_list<-list()
for(ind in 1:length(CA_id)){
inds <- httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/indicators/",CA_id[ind]))
inds <- httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/indicators/",CA_id[ind]))
inds_list[[ind]] <- jsonlite::fromJSON(rawToChar(inds$content))
inds_list[[ind]]$Content_Area <- CA_id[ind]
}
Expand All @@ -49,7 +49,7 @@ update_inventory<-function(){
meas_list<-list()
for(mezr in 1:length(ind_id)){
meas<-
httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/measures/",
httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/measures/",
ind_id[mezr]))
meas_list[[mezr]]<-jsonlite::fromJSON(rawToChar(meas$content))
meas_list[[mezr]]$Indicator<-ind_id[mezr]
Expand Down
6 changes: 3 additions & 3 deletions data-raw/create_measures_indicators_CAs_inventory.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


CAs_raw<-
httr::GET("https://ephtracking.cdc.gov:443/apigateway/api/v1/contentareas/json")
httr::GET("https://ephtracking.cdc.gov/apigateway/api/v1/contentareas/json")
CAs<-jsonlite::fromJSON(rawToChar(CAs_raw$content))
CA_id<-CAs$id

Expand All @@ -11,7 +11,7 @@ CA_id<-CAs$id

inds_list<-list()
for(ind in 1:length(CA_id)){
inds<-httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/indicators/",CA_id[ind]))
inds<-httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/indicators/",CA_id[ind]))
inds_list[[ind]]<-jsonlite::fromJSON(rawToChar(inds$content))
inds_list[[ind]]$Content_Area<-CA_id[ind]
}
Expand All @@ -25,7 +25,7 @@ ind_id<-Inds$id
meas_list<-list()
for(mezr in 1:length(ind_id)){
meas<-
httr::GET(paste0("https://ephtracking.cdc.gov:443/apigateway/api/v1/measures/",
httr::GET(paste0("https://ephtracking.cdc.gov/apigateway/api/v1/measures/",
ind_id[mezr]))
meas_list[[mezr]]<-jsonlite::fromJSON(rawToChar(meas$content))
meas_list[[mezr]]$Indicator<-ind_id[mezr]
Expand Down

0 comments on commit 4a20723

Please sign in to comment.