Watts-College / cpp-529-fall-2022

https://watts-college.github.io/cpp-529-fall-2022/
0 stars 1 forks source link

API Error - Lab 2 #7

Open CynthiaLteif opened 2 years ago

CynthiaLteif commented 2 years ago

@AntJam-Howell

Every time I try to run the CenDF code I get this error. My code is attached

Error: Your API call has errors. The API message returned is <!doctype html>HTTP Status 404 ? Not Found

HTTP Status 404 ? Not Found

.

image

AntJam-Howell commented 2 years ago

@CynthiaLteif can you try:

library(tidycensus)
library(tidyverse)
library(viridis)

census_api_key("8eab9b16f44cb26460ecbde164482194b7052772")

Var<-c("B19013_001","B25077_001")

c(Median household Income, Median Housing Value)
CenDF <- get_acs(geography = "county",
variables = Var,
year = 2017,
survey = "acs5",
geometry = TRUE,
shift_geo = TRUE)
CynthiaLteif commented 2 years ago

Error: unexpected symbol in "c(Median household" @AntJam-Howell

AntJam-Howell commented 2 years ago

@CynthiaLteif should be a # in front, some reason it was commented out of my post. Should be:

c(Median household Income, Median Housing Value)

AntJam-Howell commented 2 years ago

@CynthiaLteif but add the # to comment it out (its just a note to tell you what the variables are that are being loaded in).

CynthiaLteif commented 2 years ago

API error remains the same @AntJam-Howell

CynthiaLteif commented 2 years ago

I noticed I was doing an error, it worked out now, thanks a lot! @AntJam-Howell