ghing / census-data

Reusable Census data that can be useful to multiple projects.
3 stars 1 forks source link

Load Equal Employment Opportunity Tabulation table ALL1W #3

Closed ghing closed 2 years ago

ghing commented 2 years ago

More documentation about this tabulation is available at Equal Employment Opportunity Tabulation.

Subtasks

ghing commented 2 years ago

When trying to download the county-level data:

pipenv run mycensusdatadownloader --data-dir data --year 2018 occupation_by_sex_race_for_worksite_geo counties

I get this exception and traceback:

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Loading .env environment variables...
Traceback (most recent call last):
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/bin/mycensusdatadownloader", line 33, in <module>
    sys.exit(load_entry_point('census-data', 'console_scripts', 'mycensusdatadownloader')())
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/GHing/workspace/census-data/census_data/cli.py", line 328, in counties
    ctx.obj["runner"].download_counties()
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/census_data_downloader/core/decorators.py", line 29, in inner
    downloader = downloader_klass(table_config, year)
  File "/Users/GHing/.local/share/virtualenvs/census-data-biLmy46W/lib/python3.9/site-packages/census_data_downloader/core/geotypes.py", line 44, in __init__
    self.api = getattr(Census(self.config.CENSUS_API_KEY, year=year), self.config.source)
AttributeError: 'Census' object has no attribute 'eeo'
ghing commented 2 years ago

I think this error is because I hadn't implemented census_data.core.tables.NonACSBaseTableConfig.download_counties(), which in turn requires implementing census_data.core.geotypes.NonACSCountiesDownloader.

ghing commented 2 years ago

Closed as of ab4abeb.