diff --git a/.gitattributes b/.gitattributes index a673f63..5a3a3f1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +data/GIS/**/*.csv filter=lfs diff=lfs merge=lfs -text data/processed/bicycle_velocity_by_zone.csv filter=lfs diff=lfs merge=lfs -text data/processed/walk_velocity_by_zone.csv filter=lfs diff=lfs merge=lfs -text data/GIS/GIS_data_zones.csv filter=lfs diff=lfs merge=lfs -text diff --git a/data/processed/bicycle_velocity_by_zone.csv b/data/processed/bicycle_velocity_by_zone.csv index 9703514..859666f 100644 --- a/data/processed/bicycle_velocity_by_zone.csv +++ b/data/processed/bicycle_velocity_by_zone.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a0ec8446cfea73ef75aaa4efb05cff84811aafb7bfa66977d86f945d98de952 -size 722220 +oid sha256:1c5f140c442287e5387361464b33b8eba93386bfb269b5e005aaeed7cf82f5f0 +size 109789093 diff --git a/data/processed/walk_velocity_by_zone.csv b/data/processed/walk_velocity_by_zone.csv index 71ffe51..69e370c 100644 --- a/data/processed/walk_velocity_by_zone.csv +++ b/data/processed/walk_velocity_by_zone.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbd51a5c43a686841fd08838f73d0150989b05c6dee994ac3dcd846e68dbae90 -size 712109 +oid sha256:9c901b47ab6726f188492165c7633a2ca526481e32f03549c8332896fd5ef131 +size 113391555 diff --git a/scripts/gis_global_analysis.ipynb b/scripts/gis_global_analysis.ipynb index 8c7b317..b213d2a 100644 --- a/scripts/gis_global_analysis.ipynb +++ b/scripts/gis_global_analysis.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 15, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -25,7 +25,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -116,7 +116,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -150,7 +150,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -161,7 +161,7 @@ "Name: urban_rural, dtype: int64" ] }, - "execution_count": 18, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -184,7 +184,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -213,7 +213,7 @@ "Name: slope_1, dtype: float64" ] }, - "execution_count": 19, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, @@ -262,7 +262,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -289,7 +289,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -300,7 +300,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -321,7 +321,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -330,7 +330,7 @@ "" ] }, - "execution_count": 23, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" }, @@ -371,7 +371,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 10, "metadata": {}, "outputs": [], "source": [ @@ -399,21 +399,18 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "load_attempt = 25 # kg\n", "\n", - "calculate_distance = 0\n", + "calculate_distance = 1\n", "if calculate_distance:\n", " # Calculate the bicycle distance\n", " import sys\n", " from pathlib import Path\n", "\n", - "# Map the road types in df_zones to Crr values\n", - "df_zones['Crr'] = df_zones['dominant_road_type'].map(crr_mapping)\n", - "\n", " # Resolve project root and update sys.path\n", " project_root = Path().resolve().parent\n", " sys.path.append(str(project_root))\n", @@ -476,7 +473,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -549,30 +546,9 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 13, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 3.338853\n", - "1 2.810578\n", - "2 2.989990\n", - "3 2.249984\n", - "4 3.017698\n", - "5 2.166688\n", - "6 2.172357\n", - "7 2.077768\n", - "8 2.116220\n", - "9 3.188453\n", - "Name: max distance walking, dtype: float64" - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "time_gathering_water = 16\n", "df_zones[\"max distance cycling\"] = df_zones[\"average_velocity_bicycle\"] * time_gathering_water / 2 # max distance achievable (not round trip, just the distance from home to water source)\n", @@ -582,7 +558,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -628,24 +604,24 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "count 9986.000000\n", - "mean 2479.965865\n", - "std 7757.335516\n", - "min 6.042776\n", - "25% 480.276669\n", - "50% 1195.803226\n", - "75% 2362.037534\n", - "max 193064.436593\n", + "count 1.481674e+06\n", + "mean 1.646975e+03\n", + "std 8.653241e+03\n", + "min 0.000000e+00\n", + "25% 6.560864e+00\n", + "50% 4.893252e+01\n", + "75% 5.727339e+02\n", + "max 1.127543e+06\n", "Name: zone_pop_unpiped, dtype: float64" ] }, - "execution_count": 26, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -665,7 +641,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -712,7 +688,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -784,7 +760,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -5148,7 +5124,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -6918,7 +6894,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -8632,7 +8608,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 21, "metadata": {}, "outputs": [ { @@ -10385,7 +10361,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -10479,7 +10455,7 @@ "max 51604.171664 30764.025415 99238.791662" ] }, - "execution_count": 35, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -10524,7 +10500,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 23, "metadata": {}, "outputs": [ { @@ -13343,7 +13319,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [