Skip to content
Snippets Groups Projects
Commit e550edd0 authored by Arshana Jain's avatar Arshana Jain Committed by Ivy Wang
Browse files

add comments

parent acc1251d
No related branches found
No related tags found
No related merge requests found
# 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 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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment