Comments (4)
Thanks for flagging this. We seem to have an issue with the way we pull forward data internally. It is fine for days up to 31 May (I think), but breaks after that. We have identified the cause and just figuring out the best way to fix it.
from covid-policy-tracker.
I think we have this fixed now; let me know if you still see an issue.
-Toby
from covid-policy-tracker.
Thanks, Toby,
will check and get back to you tomorrow. If you find it useful, here is my code snippet I use to pad the data which also prints could country ISO3's and number of days missing.
dfOxCGRT = pd.read_csv("./OxCGRT_latest.csv")[["CountryCode","Date","StringencyIndexForDisplay"]]
dfOxCGRT.rename(columns={'StringencyIndexForDisplay':'string_idx'},inplace=True)
dfOxCGRT["date"] = pd.to_datetime(dfOxCGRT.Date,format="%Y%m%d")
del dfOxCGRT["Date"]
alldf = []
for country_code in dfOxCGRT.CountryCode.unique():
ddf = dfOxCGRT[(dfOxCGRT.CountryCode == country_code)&(dfOxCGRT.string_idx>=0)]
if len(ddf)<= 0:
continue
last_entry = ddf.date.max()
age = pd.to_datetime(datetime.date.today()-datetime.timedelta(days=1))-last_entry
age_days = int(age.total_seconds()/86400)
if age_days > 1:
string_idx = ddf[ddf.date == last_entry].string_idx.values[0]
print("{} {} ({})".format(country_code,age_days,string_idx),end="..")
alldata = []
for i in range(age_days+1):
newdate = last_entry+datetime.timedelta(days=i)#).date()
alldata.append({"CountryCode":country_code,
"string_idx":string_idx,
"date":newdate})
alldf.append(ddf.append(pd.DataFrame(alldata)))
else:
print("{} OK".format(country_code),end="..")
alldf.append(ddf)
dfOxCGRT_padded = pd.DataFrame().append(alldf)
dfOxCGRT_padded.reset_index(inplace=True)
del dfOxCGRT_padded["index"]
dfOxCGRT_padded.to_parquet("./OxCGRT_timeseries_all.parquet")
from covid-policy-tracker.
StringencyIndexForDisplay now is padded as intended, issue is closed.
Thanks for your help!
Klaus
from covid-policy-tracker.
Related Issues (20)
- Spain confirmed cases seem wrong
- Germany C5 200
- South Africa Gathering
- Germany: massively wrong C* values since at least Dec 2021
- Italy: curfews are not in place in orange zones anymore
- Your feedback form is broken HOT 1
- Save data as .parquet files
- Data Update
- Stringency Index
- No index in csv
- Shows data only for the first 80 countries alphabetically
- Vanuatu moved to the level 1 HOT 4
- Travel restrictions
- How can I connect with anyone from the project team and get a response?
- Confirmed cases for Australia doesnt look right
- StringencyIndex_Average no longer updated?
- China value for V2_5-15 on 10-22-2022 is incorrect
- Fiscal support Czech Republic incorrectly appears as 0?
- How can i get a national average using provincial data in China
- P
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-policy-tracker.