Comments (1)
I think we had this for the state-level but not county.
## Get total cases today, find the date that was half of that
today = ((nyt_state_cases %>% arrange(desc(date)))[1, 1])$date
cases_today = ((nyt_state_cases %>% arrange(desc(date)))[1, 4])$cases
last_half_day = ((nyt_state_cases %>% arrange(desc(date)) %>% filter(cases < (cases_today / 2)))[1, 1])$date
print("Doubling every X days")
print(today - last_half_day)
This was the code, which calculates the last day when the total case count was less than half of the current value. It first gets the current number of cases, then filters the dataframe so only days with less than half of that remain, then grabs the most recent row remaining.
from covid_tracker.
Related Issues (20)
- Add State-Level Mobility Data HOT 1
- Reformat Left Navigation Panel for Drop Downs
- Version 2.5 Narrative
- Integrate OverHaul data HOT 3
- "Notable Circumstances" Tab on County Explorer
- Add "Excess Mortality" Data
- Add County Comparison feature
- Add Trend Line for % of Positive Tests Over Time HOT 1
- Add Trend Line for Hospitalization Rate Over Time HOT 1
- Add state rate of transmission data HOT 1
- Add data about congregate setting vs. community transmission
- Fix Test Positive Label Under Data Documentation HOT 1
- Change "Recovered" and "Active" to estimates HOT 1
- Remove County-Level ILI/CLI HOT 2
- County Explorer DSHS Request
- Map to show which counties are "hot spots" for case growth in the past week HOT 6
- Add Population Health Charts HOT 4
- Harris County ICU beds availability not working under County Explorer HOT 5
- Asks from Dell Med: 1) county trends on the Covid related ER visits (7d rolling average); 2) new lab confirmed covid admissions by county & region (7d rolling average); testing trend by county similar to what's on state page HOT 3
- County Testing Trends
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covid_tracker.