{"id":13567042,"url":"https://github.com/datadesk/census-map-downloader","last_synced_at":"2025-04-10T11:40:35.754Z","repository":{"id":36499409,"uuid":"195479867","full_name":"datadesk/census-map-downloader","owner":"datadesk","description":"Easily download U.S. census maps","archived":false,"fork":false,"pushed_at":"2023-02-23T19:50:43.000Z","size":447,"stargazers_count":31,"open_issues_count":10,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T23:24:49.858Z","etag":null,"topics":["census","data-journalism","journalism","mapping-la-pipeline","maps","news","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadesk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-06T00:15:20.000Z","updated_at":"2024-08-01T13:24:20.809Z","dependencies_parsed_at":"2024-08-01T13:39:32.619Z","dependency_job_id":null,"html_url":"https://github.com/datadesk/census-map-downloader","commit_stats":{"total_commits":94,"total_committers":6,"mean_commits":"15.666666666666666","dds":0.4787234042553191,"last_synced_commit":"417f02ae0fcd98868b980e50f5abd472a1c74309"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":"palewire/python-open-source-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Fcensus-map-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Fcensus-map-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Fcensus-map-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadesk%2Fcensus-map-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadesk","download_url":"https://codeload.github.com/datadesk/census-map-downloader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248210604,"owners_count":21065575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["census","data-journalism","journalism","mapping-la-pipeline","maps","news","python"],"created_at":"2024-08-01T13:02:22.307Z","updated_at":"2025-04-10T11:40:35.735Z","avatar_url":"https://github.com/datadesk.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# census-map-downloader\n\nEasily download U.S. census maps\n\n## Installation\n\n```bash\npipenv install census-map-downloader\n```\n\n## Command line usage\n\n```\nUsage: censusmapdownloader [OPTIONS] COMMAND [ARGS]...\n\n  Easily download U.S. census maps\n\nOptions:\n  --data-dir TEXT  The folder where you want to download the data\n  --year INTEGER   The vintage of data to download. By default it gets the\n                   latest year. Not all data are available for every year.\n\n  --help           Show this message and exit.\n\nCommands:\n  blocks                   Download blocks\n  congress-carto           Download cartographic congressional districts\n  counties                 Download counties\n  counties-carto           Download cartographic counties\n  countysubdivision        Download cartographic county subdivisions\n  legislative-lower-carto  Download cartographic state legislative...\n  legislative-upper-carto  Download cartographic state legislative...\n  places                   Download places\n  states-carto             Download cartographic states\n  tracts                   Download tracts\n  zctas                    Download ZCTAs\n```\n\n## Examples\n\nHere's an example of downloading all counties\n\n```bash\ncensusmapdownloader counties\n```\n\nYou can specify the download directory with --data-dir\n\n```bash\ncensusmapdownloader --data-dir ./my-special-folder/ counties\n```\n\n## Contributing\n\nInstall dependencies for development\n\n```bash\npipenv install --dev\n```\n\nRun tests\n\n```bash\npipenv run python test.py\n```\n\n### Adding additional years to a dataset\n\nDownloader classes for different geography types are defined in modules of {code}`census_map_downloader.geotypes`. For example, the downloader for counties is {code}`census_map_downloader.geotypes.counties.CountiesDownloader`.\n\nIf the URL and fields in a shapefile are the same as those for years that are already supported, you can just add the year to the {code}`YEAR_LIST` attribute.\n\nIf the fields are the same, but the URL changes between groups of years, add logic to the {code}`url` property method of the downloader classes to alter the URL based on {code}`self.year`.\n\nIf the fields and URL change from year to year, consider creating classes for each year and delegating to {code}`census_map_downloader.geotypes.tracts.TractsDownloader` is an example of a class that uses this approach.\n\n## Developing the CLI\n\nThe command-line interface is implemented using Click and setuptools. To install it locally for development inside your virtual environment, run the following installation command, as [prescribed by the Click documentation](https://click.palletsprojects.com/en/7.x/setuptools/#setuptools-integration).\n\n```bash\npipenv run pip install --editable .\n```\n\n## Links\n\n* Issues: [github.com/datadesk/census-map-downloader/issues](https://github.com/datadesk/census-map-downloader/issues)\n* Packaging: [pypi.python.org/pypi/census-map-downloader](https://pypi.python.org/pypi/census-map-downloader)\n* Testing: [github.com/datadesk/census-map-downloader/actions](https://github.com/datadesk/census-map-downloader/actions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadesk%2Fcensus-map-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadesk%2Fcensus-map-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadesk%2Fcensus-map-downloader/lists"}