Council Member District Information
Council.nyc.gov/districts/
- While in the
district_data
directory, runpython districts.py convert
.- This command will create the
single_district_json
andsingle_district_geojson
directories if they do not exist. - It will also create the CSV source file (downloading it from a Google Sheet) if it does not exist.
- Finally, the command will convert the CSV to a JSON file.
- This command will create the
python districts.py legistar
will merge the master JSON file with the following datasets from Legistar:- Person data - personal and contact information for each council member.
- Committee data - all committees the council member is on during the current session.
python districts.py json
will do the following:- Merge GeoJSON data from City Planning to the master JSON file.
- Create separate files for each district in the
single_district_json
directory.
python districts.py geojson
will do the reverse of Step 3:- Merge the master JSON file with the GeoJSON from City Planning
- Create separate files for each district in the
single_district_geojson
directory.
python districts.py no_geo
create a JSON file similar tocm_master_file.json
, but will not include GeoJSON data:python districts.py check
will just confirm that there are 51 objects in the JSON and GeoJSON.
NOTE: Each command is dependent on the previous command as it assumes the files made from previous commands exist.
- Script will prompt you for the GeoJSON URL so that everything will be dynamic.