JacobWeinbren / Canadian-Census

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:TypeScript 60.3%Language:Astro 19.9%Language:Python 15.9%Language:Shell 2.5%Language:JavaScript 1.4%