# Path: sitegeist/data/census/loading.py
# def _chunks(l, n):
# def reset():
# def load_tracts():
# def load_tract_records(keys):
# def load():
# 
# Path: sitegeist/data/epa/loading.py
# def load():
# 
# Path: sitegeist/data/locations/loading.py
# def _dl_path():
# def name_func(state, field):
#     def inner(feature):
# def slug_func(field):
#     def inner(feature):
# def label_point_func(feature):
#     def avg(items):
# def reset():
# def load_tracts():
# def load_zcta_boundaries():
# def load_tract_boundaries():
# def load(force=False):
# 
# Path: sitegeist/data/schools/loading.py
# DATA_URL = "http://nces.ed.gov/ccd/data/zip/sc091a_csv.zip"
# def load():
# 
# Path: sitegeist/data/conf.py
# def load_config(path):


import os
import sys
    import argparse
from sitegeist.data.census import loading as census_loading
from sitegeist.data.epa import loading as epa_loading
from sitegeist.data.locations import loading as locations_loading
from sitegeist.data.schools import loading as schools_loading
from sitegeist.data import conf


SOURCES = {
    "census": census_loading,
    "epa": epa_loading,
    "locations": locations_loading,
    "schools": schools_loading,
}

if __name__ == "__main__":


    parser = argparse.ArgumentParser(description="Load Sitegeist data sources")

    parser.add_argument("sources", metavar="SOURCES", nargs="+",
                       help="one or more source: %s" % ", ".join(sorted(SOURCES.keys())))

    parser.add_argument("-c", "--config", dest="config", metavar='PATH',
                       help="path to config file")
    parser.add_argument("-d", "--dryrun", dest="dryrun", action="store_true",
                       help="load data source, but do not save to database")

    args = parser.parse_args()

    if args.config:
        path = os.path.abspath(os.path.expandvars(os.path.expanduser(args.config)))
        conf.load_config(path)


# Path: sitegeist/data/census/loading.py
# def _chunks(l, n):
# def reset():
# def load_tracts():
# def load_tract_records(keys):
# def load():
# 
# Path: sitegeist/data/epa/loading.py
# def load():
# 
# Path: sitegeist/data/locations/loading.py
# def _dl_path():
# def name_func(state, field):
#     def inner(feature):
# def slug_func(field):
#     def inner(feature):
# def label_point_func(feature):
#     def avg(items):
# def reset():
# def load_tracts():
# def load_zcta_boundaries():
# def load_tract_boundaries():
# def load(force=False):
# 
# Path: sitegeist/data/schools/loading.py
# DATA_URL = "http://nces.ed.gov/ccd/data/zip/sc091a_csv.zip"
# def load():
# 
# Path: sitegeist/data/conf.py
# def load_config(path):


# Path: sitegeist/data/load.py
import os
import sys
    import argparse
from sitegeist.data.census import loading as census_loading
from sitegeist.data.epa import loading as epa_loading
from sitegeist.data.locations import loading as locations_loading
from sitegeist.data.schools import loading as schools_loading
from sitegeist.data import conf



SOURCES = {
    "census": census_loading,
    "epa": epa_loading,
    "locations": locations_loading,
    "schools": schools_loading,
}

if __name__ == "__main__":


    parser = argparse.ArgumentParser(description="Load Sitegeist data sources")

    parser.add_argument("sources", metavar="SOURCES", nargs="+",
                       help="one or more source: %s" % ", ".join(sorted(SOURCES.keys())))

    parser.add_argument("-c", "--config", dest="config", metavar='PATH',
                       help="path to config file")
    parser.add_argument("-d", "--dryrun", dest="dryrun", action="store_true",
                       help="load data source, but do not save to database")

    args = parser.parse_args()

    if args.config:
        path = os.path.abspath(os.path.expandvars(os.path.expanduser(args.config)))
        conf.load_config(path)


    for source in args.sources: