Probably not the best way to learn about coding. I was able to finally get the development space up and running, which was an adventure for the first-timer.
I am working on learning how to modify existing examples to make my own apps. The first step is using a COVID API (Covid Act Now) to pull the test positivity rate. I took the bitcoin example and tried to modify it to work. But getting an error code.
US_COUNTY_COVID = “https://api.covidactnow.org/v2/counties.json?apiKey=api key”
rep = http.get(US_COUNTY_COVID)
if rep.status_code != 200:
fail(“Covid request failed with status %d”, rep.status_code)
rate = rep.json()["US"]["WA"]["King County"]["testPositivityRatio"] return render.Root( child = render.Text("%d Cases" % rate) )
Ironically I found a walk-through using a COVID API from India that I was able to get to work but struggling here as I dive into this more. Any insight on why this is throwing me the “got string, want int” error?