Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BSTIM Covid19 - Copy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jens Henrik Goebbert
BSTIM Covid19 - Copy
Commits
cedf971e
Commit
cedf971e
authored
4 years ago
by
Pascal
Browse files
Options
Downloads
Patches
Plain Diff
Revert "small script to retro-fit map.csv to include RKI data"
This reverts commit
73b980df
.
parent
2826f3ce
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/add_rki_to_map.py
+0
-34
0 additions, 34 deletions
src/add_rki_to_map.py
with
0 additions
and
34 deletions
src/add_rki_to_map.py
deleted
100644 → 0
+
0
−
34
View file @
2826f3ce
import
os
import
pickle
as
pkl
import
pandas
as
pd
data
=
pd
.
read_csv
(
'
../data/diseases/covid19.csv
'
,
sep
=
'
,
'
,
encoding
=
'
iso-8859-1
'
,
index_col
=
0
)
data
.
index
=
[
pd
.
Timestamp
(
date
)
for
date
in
data
.
index
]
with
open
(
'
../data/counties/counties.pkl
'
,
'
rb
'
)
as
f
:
counties
=
pkl
.
load
(
f
)
shared_assets
=
'
/p/project/covid19dynstat/shared_assets/
'
figures
=
os
.
path
.
join
(
shared_assets
,
'
figures/
'
)
dates
=
next
(
os
.
walk
(
figures
))[
1
]
# errors if the RKI based csv is out of date with the available folders
for
date
in
dates
:
map_csv_path
=
os
.
path
.
join
(
figures
,
date
,
'
map.csv
'
)
map_rki
=
data
.
loc
[
date
.
replace
(
'
_
'
,
'
-
'
)].
values
.
astype
(
'
float64
'
)
for
(
i
,
(
key
,
_
))
in
enumerate
(
counties
.
items
()):
n_people
=
counties
[
key
][
'
demographics
'
][(
'
total
'
,
2018
)]
map_rki
[
i
]
=
map_rki
[
i
]
/
n_people
*
100000
map_data
=
pd
.
read_csv
(
map_csv_path
,
index_col
=
0
)
map_data
[
"
newInf100k_RKI
"
]
=
list
(
map_rki
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment