NCG613: Data Analytics Project
Kevin Credit
2026
This repository contains lab materials for NCG613: Data Analytics Project at Maynooth University. The practicals contained here cover data analytics and causal inference methods using Python on open data.
Important: This repository is for distribution of course materials. You should create your own personal copy to work with (not edit the main repository directly).
- Click the "Fork" button at the top-right of this GitHub page
- This creates your own copy under your GitHub account
- Clone YOUR fork to your computer (see cloning instructions below)
- Work in your fork - you can make any changes you want!
- Click the green "Code" button at the top of this page
- Select "Download ZIP"
- Extract the ZIP file to a location on your computer (e.g., Documents/Courses/)
- You now have your own local copy to work with!
If you just want to follow along without making changes:
Using GitHub Desktop:
- Download GitHub Desktop
- Sign in with your GitHub account
- File → Clone Repository → URL tab
- Enter:
https://github.com/kcredit/NCG613 - Choose save location → Click "Clone"
Using command line:
git clone https://github.com/kcredit/NCG613.git
cd NCG613One data file is too large for GitHub and must be downloaded separately from Zenodo:
Required file: OutputAreas.geojson (used in Practicals 7, 8, and 9)
Download instructions:
- Visit: https://zenodo.org/records/18198787
- Click "Download" next to
OutputAreas.geojson(or download all files) - Save the file to the
data/folder in your course directory - Final location should be:
NCG613/data/OutputAreas.geojson
File details:
- Size: 298 MB
- Format: GeoJSON
- Contents: Output Area boundaries for London with census data
- Required for: Practicals 7, 8, and 9
After getting your copy and downloading the data file, install the required Python packages:
Option A: Using Anaconda Navigator (Easiest for beginners)
Anaconda provides a user-friendly interface for managing Python. You'll need to use the command line briefly for installation, but Navigator handles everything else:
-
Download and install Anaconda
-
Open Anaconda Navigator (find it in your applications)
-
Click Environments (left sidebar) → Create button (bottom)
- Name:
NCG613 - Python version: 3.10 or higher
- Click Create
- Name:
-
With
NCG613environment selected, click the▶️ button → Open Terminal -
In the terminal window that opens, run these two commands:
cd path/to/NCG613 pip install -r requirements.txtTip: Replace
path/to/NCG613with the actual path where you saved the course files. See below for more detail. -
Wait for installation to complete (may take 5-10 minutes), then close the terminal
-
Back in Navigator, click Home (left sidebar)
-
Select
NCG613from the dropdown at top (important!) -
Click Launch under Jupyter Notebook
-
Navigate to
notebooks/folder and start working!
Once set up, you'll only use Navigator's buttons - no more command line needed for daily use.
Option B: Command line only (For users comfortable with terminal/command prompt)
# Navigate to your copy of the repository
cd `path/to/NCG613`
# Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install required packages
pip install -r requirements.txt
# Launch Jupyter
jupyter notebookThis is faster to set up but requires command line comfort. You'll use terminal commands each time you work.
- Open Finder
- Navigate to where you saved NCG613 folder
- Right-click (or Control+click) on the NCG613 folder
- Select New Terminal at Folder
- The terminal window that opens will be set to that location
Alternative Mac method:
- Find the NCG613 folder in Finder
- Drag and drop the folder into Terminal after typing
cd - The path appears automatically!
- Open File Explorer
- Navigate to where you saved NCG613 folder
- Click on the address bar at the top (shows the path)
- Press Ctrl+C to copy
- In Command Prompt, type:
cd(with a space) then Ctrl+V
Alternative Windows method:
- Navigate to NCG613 folder in File Explorer
- Click in the address bar and type
cmd - Press Enter
- Command Prompt opens already in that directory! (no cd needed)
Even easier:
- Open GitHub Desktop
- Make sure NCG613 repository is selected (dropdown at top-left)
- Click Repository menu → Open in Terminal (Mac) or Open in Command Prompt (Windows)
- Terminal opens already in the right directory!
Your NCG613 folder is likely in one of these places:
Mac:
cd ~/Documents/NCG613
cd ~/Desktop/NCG613
cd ~/Documents/GitHub/NCG613Windows:
cd C:\Users\YourUsername\Documents\NCG613
cd C:\Users\YourUsername\Desktop\NCG613
cd C:\Users\YourUsername\Documents\GitHub\NCG613Replace YourUsername with your actual Windows username.
If you used Option A (Anaconda Navigator):
Every time you want to work on the practicals:
- Open Anaconda Navigator
- Make sure
NCG613is selected in the dropdown at the top (this activates your environment) - Click Launch under Jupyter Notebook
- Navigate to
notebooks/and open your files
If you used Option B (Command line):
Every time you want to work:
cd path/to/NCG613
source venv/bin/activate # On Windows: venv\Scripts\activate
jupyter notebookWhen new materials are added to the main repository, you can update your copy:
If you forked the repository on GitHub:
Your fork doesn't automatically update. To get new materials:
- Go to YOUR fork on GitHub
- Click "Sync fork" → "Update branch"
- Then pull the changes to your local copy:
- GitHub Desktop: Click "Fetch origin" → "Pull origin"
- Command line:
git pull
If you downloaded as ZIP:
Simply download the latest ZIP file again and extract it (or just download new individual files you need).
If you cloned directly (Option C above):
cd NCG613
git pullNCG613/
├── notebooks/ # Jupyter notebooks for practicals
├── data/ # Course datasets
│ ├── hpdemo.csv
│ ├── OutputAreas.geojson # ← Download this from Zenodo!
│ └── ...
├── README.md # This file
└── requirements.txt # Python dependencies
- Practical 1: Python Basics for Data Analytics
- Practical 6: Mapping and Exploring Spatial Data
- Practical 7: Regression Models for Spatial Data
- Practical 8: Statistical Causal Inference
- Practical 9: Causal Machine Learning in CausalML
Most data files are included in the repository. However:
✓ Included in repository:
hpdemo.csv- All small data files (<100 MB)
OutputAreas.geojson→ https://zenodo.org/records/18198787- Required for Practicals 7, 8, and 9
- Place in
data/folder after downloading
All notebooks use relative paths (e.g., ../data/hpdemo.csv) so they'll work once files are in the correct locations.
- Open Anaconda Navigator (or use command line)
- Select the
NCG613environment - Launch Jupyter Notebook
- Navigate to the
notebooks/folder - Click on any
.ipynbfile to open and run it
- Press
Shift + Enterto run a cell - Press
EscthenAto insert a cell above - Press
EscthenBto insert a cell below - Press
EscthenDDto delete a cell - Click "Kernel" → "Restart & Clear Output" to start fresh
Solution: Download the file from Zenodo (see Section 2 above) and place it in the data/ folder.
Solution:
- Make sure you're using Python 3.10 or higher:
python --version - Try installing packages one at a time to identify which is failing
- Check that you have sufficient disk space (~2-3 GB needed)
- On Windows, you may need to install Visual C++ Build Tools
Solution:
- Restart the kernel: Kernel → Restart
- Check available RAM (some spatial operations need 4-8 GB)
- Try running cells one at a time rather than "Run All"
Solution:
- Close and reopen your terminal/command prompt
- Or use Anaconda Navigator instead of command line
- On Mac/Linux, run:
source ~/anaconda3/bin/activate
- Python 3.10+
- Jupyter Notebook or JupyterLab
- Required packages are listed in
requirements.txt - ~3-4 GB free disk space for packages and data
- ~4-8 GB RAM recommended for spatial analysis
If you encounter issues:
- Check the Troubleshooting section above
- Ensure all requirements are installed:
pip list | grep [package-name] - Make sure
OutputAreas.geojsonis downloaded and in thedata/folder - Try restarting the Jupyter kernel
- Consult the course Moodle page
- Ask in class or during office hours
- Python Documentation
- Jupyter Documentation
- Pandas Documentation
- GeoPandas Documentation
- Anaconda Documentation
- GitHub Guides
This section is for instructors or collaborators who want to contribute improvements:
- Fork this repository
- Create a feature branch (
git checkout -b feature-name) - Make your changes
- Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature-name) - Create a Pull Request
Students should not submit pull requests - instead, work in your own fork or local copy!
MIT License
Copyright (c) 2026 Kevin Credit
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Course materials developed by Kevin Credit for NCG613: Data Analytics Project at Maynooth University. Some materials adapted from exercises originally created by Prof. Chris Brunsdon.
