Skip to content

Commit 47bd193

Browse files
committed
Merge branch 'nqulizada835-update-env'
2 parents dedc6dd + 179b6ac commit 47bd193

17 files changed

+16065
-2627
lines changed

README.md

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# (Replace_with_your_title) Cookbook
1+
# Bias Correction of Crowdsourced Bicycle Count Data Cookbook
22

3-
<img src="thumbnails/thumbnail.png" alt="thumbnail" width="300"/>
3+
<img src="thumbnails/biascorr_thumbnail.png" alt="thumbnail" width="300"/>
44

55
[![nightly-build](https://github.com/ProjectPythia/cookbook-template/actions/workflows/nightly-build.yaml/badge.svg)](https://github.com/ProjectPythia/cookbook-template/actions/workflows/nightly-build.yaml)
6-
[![Binder](https://binder.projectpythia.org/badge_logo.svg)](https://binder.projectpythia.org/v2/gh/ProjectPythia/cookbook-template/main?labpath=notebooks)
6+
[![Binder](https://binder.projectpythia.org/badge_logo.svg)](https://binder.projectpythia.org/v2/gh/ProjectPythia/BiasCorrectionCrowdsourcedData-cookbook/main?labpath=notebooks)
77
[![DOI](https://zenodo.org/badge/475509405.svg)](https://zenodo.org/badge/latestdoi/475509405)
88

99
_See the [Cookbook Contributor's Guide](https://projectpythia.org/cookbook-guide) for step-by-step instructions on how to create your new Cookbook and get it hosted on the [Pythia Cookbook Gallery](https://cookbooks.projectpythia.org)!_
1010

11-
This Project Pythia Cookbook covers ... (replace `...` with the main subject of your cookbook ... e.g., _working with radar data in Python_)
11+
This Project Pythia Cookbook covers **bias correction of crowdsourced bicycle ridership data (Strava) using traditional count sources (EcoCounter)** in Northwest Arkansas, incorporating spatial clustering, multivariate regression, and residual analysis.
1212

1313
## Motivation
1414

15-
(Add a few sentences stating why this cookbook will be useful. What skills will you, "the chef", gain once you have reached the end of the cookbook?)
15+
This cookbook provides a reproducible workflow to identify, quantify, and correct bias in Strava bicycle count data using EcoCounter ground-truth data. You'll learn how to clean and merge weekly count data, engineer features, model spatial-temporal patterns, and evaluate model performance using regression and clustering methods.
1616

1717
## Authors
1818

19-
[First Author](https://github.com/first-author1), [Second Author](https://github.com/second-author2), etc. _Acknowledge primary content authors here_
19+
[Nelofar Qulizada](https://github.com/nqulizada835)
2020

2121
### Contributors
2222

@@ -26,15 +26,23 @@ This Project Pythia Cookbook covers ... (replace `...` with the main subject of
2626

2727
## Structure
2828

29-
(State one or more sections that will comprise the notebook. E.g., _This cookbook is broken up into two main sections - "Foundations" and "Example Workflows."_ Then, describe each section below.)
29+
This cookbook is broken up into two main sections: **"Data Preprocessing and Exploratory Analysis"** and **"Modeling and Bias Correction"**.
3030

31-
### Section 1 ( Replace with the title of this section, e.g. "Foundations" )
31+
### Section 1: Data Preprocessing and Exploratory Analysis
3232

33-
(Add content for this section, e.g., "The foundational content includes ... ")
33+
Includes:
34+
- Loading and merging weekly EcoCounter and Strava data
35+
- Creating spatial hexbin aggregations
36+
- Visualizing counts over time and space
37+
- Exploring potential covariates
3438

35-
### Section 2 ( Replace with the title of this section, e.g. "Example workflows" )
39+
### Section 2: Modeling and Bias Correction
3640

37-
(Add content for this section, e.g., "Example workflows include ... ")
41+
Includes:
42+
- Building linear regression models to predict EcoCounter counts
43+
- Performing seasonal regression breakdowns
44+
- Visualizing spatial clustering of residuals
45+
- Generating interactive maps and outputs
3846

3947
## Running the Notebooks
4048

@@ -48,43 +56,18 @@ The simplest way to interact with a Jupyter Notebook is through
4856
important for now. All you need to know is how to launch a Pythia
4957
Cookbooks chapter via Binder. Simply navigate your mouse to
5058
the top right corner of the book chapter you are viewing and click
51-
on the rocket ship icon, (see figure below), and be sure to select
59+
on the rocket ship icon, and be sure to select
5260
“launch Binder”. After a moment you should be presented with a
53-
notebook that you can interact with. I.e. you’ll be able to execute
54-
and even change the example programs. You’ll see that the code cells
55-
have no output at first, until you execute them by pressing
56-
{kbd}`Shift`\+{kbd}`Enter`. Complete details on how to interact with
57-
a live Jupyter notebook are described in [Getting Started with
58-
Jupyter](https://foundations.projectpythia.org/foundations/getting-started-jupyter).
61+
notebook that you can interact with.
5962

6063
Note, not all Cookbook chapters are executable. If you do not see
6164
the rocket ship icon, such as on this page, you are not viewing an
6265
executable book chapter.
6366

64-
6567
### Running on Your Own Machine
6668

67-
If you are interested in running this material locally on your computer, you will need to follow this workflow:
68-
69-
(Replace "cookbook-example" with the title of your cookbooks)
69+
If you are interested in running this material locally on your computer, follow this workflow:
7070

71-
1. Clone the `https://github.com/ProjectPythia/cookbook-example` repository:
72-
73-
```bash
74-
git clone https://github.com/ProjectPythia/cookbook-example.git
75-
```
76-
77-
1. Move into the `cookbook-example` directory
78-
```bash
79-
cd cookbook-example
80-
```
81-
1. Create and activate your conda environment from the `environment.yml` file
82-
```bash
83-
conda env create -f environment.yml
84-
conda activate cookbook-example
85-
```
86-
1. Move into the `notebooks` directory and start up Jupyterlab
71+
1. Clone the repository:
8772
```bash
88-
cd notebooks/
89-
jupyter lab
90-
```
73+
git clone https://github.com/ProjectPythia/BiasCorrectionCrowdsourcedData-cookbook.git

_gallery_info.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
thumbnail: thumbnail.png
1+
thumbnail: BiasCorrectionCrowdsourcedData-cookbook/thumbnails/biascorr_thumbnail.png
22
tags:
33
domains:
4-
- sampledomain
4+
- transportation
5+
- urban-analytics
6+
- geospatial-analysis
57
packages:
6-
- samplepackage
8+
- pandas
9+
- numpy
10+
- matplotlib
11+
- seaborn
12+
- scikit-learn
13+
- folium
14+

environment.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: biascorr
1+
name: biascorr-cookbook-dev
22
channels:
33
- conda-forge
44
dependencies:
55
- python=3.11
66
- pandas
7+
- geopandas
78
- numpy
9+
- h3
810
- matplotlib
911
- statsmodels
1012
- scikit-learn
11-
- jupyter
13+
- jupyter
14+
- mystmd
15+
- jupyterlab-myst

figures/obs_vs_pred_test.png

59.1 KB
Loading

0 commit comments

Comments
 (0)