Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
COVID-19-Data-Integration
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Ivy Wang
COVID-19-Data-Integration
Commits
e550edd0
Commit
e550edd0
authored
3 years ago
by
Arshana Jain
Committed by
Ivy Wang
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add comments
parent
acc1251d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
run_daily.py
+16
-0
16 additions, 0 deletions
run_daily.py
run_main_initial.py
+7
-1
7 additions, 1 deletion
run_main_initial.py
with
23 additions
and
1 deletion
run_daily.py
+
16
−
0
View file @
e550edd0
# Daily instructions:
# 1. Pull from the Github repo.
# 2. Run `python run_daily.py`.
# 3. Push to the Github repo.
# This script should be run once daily.
# For safety's sake, and because data sources may not update at the same time everyday,
# the daily update scripts typically check that the previous two days of data have already been added to the db
# and add those days if they are missing.
# So you shouldn't need to worry about running this script at the same time every day
# (and may be able to get away with missing a day).
# But that is just a precaution and is NOT guaranteed for future scripts
# so PLEASE RUN EVERYDAY!
# Ideal vision: This all gets moved to a server that runs the scripts automatically everyday.
from
daily_data_scripts.daily_europe
import
daily_italy
,
daily_ukraine
from
daily_data_scripts.daily_global
import
daily_jhu
...
...
This diff is collapsed.
Click to expand it.
run_main_initial.py
+
7
−
1
View file @
e550edd0
# This script should only be run once at the initialization of the database.
# It includes creating the tables and populating them with all the initial data.
# After this, run the run_daily.py script once a day to stay up-to-date.
# NOTE: If you ever fall out of date by more than a day or two,
# either write your own scripts to catch up or start fresh with this script!
import
sqlite3
import
pandas
as
pd
conn
=
sqlite3
.
connect
(
'
sqlite_db
'
)
c
=
conn
.
cursor
()
#
TODO Namibia's country code is currently being read as NULL; wait for SQLServer and then debug
#
Create all tables.
c
.
execute
(
'''
CREATE TABLE Countries(
country_code VARCHAR(3) PRIMARY KEY,
...
...
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