Skip to content

JacobWeinbren/Canadian-Census

Repository files navigation

Canadian Census Data Processing

Notes

  • Variables are worked out as a proportion of the total variable (i.e, their heading)
  • Calculated variables (e.g., median age) are retained
  • Total variables are retained

Sources

File Summaries

  • scripts/menu_list.py: Parses CSV to extract and structure characteristics.
  • scripts/clean.py: Filters menu items based on valid IDs from the CSV.
  • scripts/computed_values.py: Identifies and collects calculated variables from the CSV.
  • scripts/intersect.py: Generates map data by intersecting areas and buildings.
  • data/census/: Contains the raw census data in CSV format.
  • src/database.ts: Processes CSV files and updates Redis.
  • src/server.ts: Sets up an Express server to serve map tiles.
  • src/statistics.ts: Calculates percentiles for menu items.

Build and Run

  1. Install dependencies:
npm install
pip install -r requirements.txt
  1. Build the TypeScript code:
npm run build
  1. Generate menu items and statistics:
python scripts/menu_list.py
npm run statistics
python scripts/clean.py
  1. Generate map data:
python scripts/intersect.py
  1. Create the database:
npm run create
  1. Start the server:
npm run start

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published