Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amanda: update packages from shared_utils to calitp_data_analysis #909

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cell_coverage/A1_provider_prep.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from shared_utils import utils
from calitp_data_analaysis import utils
import geopandas as gpd
import dask.dataframe as dd
import dask_geopandas as dg
Expand Down
4 changes: 2 additions & 2 deletions cell_coverage/A2_other.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from shared_utils import geography_utils
from shared_utils import utils
from calitp_data_analaysis import geography_utils
from calitp_data_analaysis import utils
import geopandas as gpd
import dask.dataframe as dd
import dask_geopandas as dg
Expand Down
4 changes: 1 addition & 3 deletions cell_coverage/A3_analysis.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import A1_provider_prep
import A2_other

from shared_utils import geography_utils
from calitp_data_analaysis import geography_utils, utils, calitp_color_palette as cp
import geopandas as gpd
import shapely.wkt

import dask.dataframe as dd
import pandas as pd
from shared_utils import utils

# Times
import datetime
from loguru import logger

# Charts
from shared_utils import calitp_color_palette as cp
import altair as alt

"""
Expand Down
2 changes: 1 addition & 1 deletion cell_coverage/analysis_buses.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"import altair as alt\n",
"import geopandas as gpd\n",
"import pandas as pd\n",
"from shared_utils import geography_utils, utils"
"from calitp_data_analaysis import geography_utils, utils"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion cell_coverage/analysis_overlay_routes_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"import pandas as pd\n",
"import shapely.wkt\n",
"from calitp.sql import to_snakecase\n",
"from shared_utils import geography_utils, utils\n",
"from calitp_data_analaysis import geography_utils, utils\n",
"from calitp.storage import get_fs\n",
"fs = get_fs()"
]
Expand Down
2 changes: 1 addition & 1 deletion cell_coverage/provider_prep_clip.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"import A2_other\n",
"import A3_analysis\n",
"from calitp.sql import to_snakecase\n",
"from shared_utils import geography_utils, utils"
"from calitp_data_analaysis import geography_utils, utils"
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions cell_coverage/provider_prep_sjoin.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"import dask_geopandas as dg\n",
"import geopandas as gpd\n",
"import pandas as pd\n",
"from shared_utils import geography_utils\n",
"from shared_utils import utils\n",
"from calitp_data_analaysis import geography_utils, utils\n",
"import folium\n",
"\n",
"from calitp.sql import to_snakecase\n",
Expand Down
2 changes: 0 additions & 2 deletions consolidated_app/data_cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

# import shared_utils
from calitp_data_analysis.sql import to_snakecase
# from shared_utils import utils
# from siuba import *

GCS_FILE_PATH = "gs://calitp-analytics-data/data-analyses/consolidated_applications/"
Caltrans_shape = "https://gis.data.ca.gov/datasets/0144574f750f4ccc88749004aca6eb0c_0.geojson?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D"
Expand Down
2 changes: 1 addition & 1 deletion consolidated_app/free_fare.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"import altair as alt\n",
"import utilities\n",
"from calitp_data_analysis.sql import to_snakecase\n",
"from shared_utils import styleguide"
"from calitp_data_analaysis import styleguide"
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions consolidated_app/lessons_learned.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@
"import altair as alt\n",
"import branca\n",
"import folium\n",
"import shared_utils\n",
"import utilities\n",
"from calitp import *\n",
"from shared_utils import altair_utils, styleguide\n",
"from calitp_data_analaysis import styleguide\n",
"from siuba import *"
]
},
Expand Down
7 changes: 2 additions & 5 deletions consolidated_app/script_testing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
"import geopandas as gpd\n",
"import numpy as np\n",
"import pandas as pd\n",
"import shared_utils\n",
"from calitp import *\n",
"from shared_utils import utils\n",
"from siuba import *\n",
"from calitp_data_analaysis import utils\n",
"\n",
"GCS_FILE_PATH = \"gs://calitp-analytics-data/data-analyses/consolidated_applications/\"\n",
"Caltrans_shape = \"https://gis.data.ca.gov/datasets/0144574f750f4ccc88749004aca6eb0c_0.geojson?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D\"\n",
Expand Down Expand Up @@ -1370,7 +1367,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
3 changes: 1 addition & 2 deletions consolidated_app/utilities.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import altair as alt
from shared_utils import calitp_color_palette as cp
from shared_utils import styleguide
ffrom calitp_data_analaysis import calitp_color_palette as cp,import styleguide

'''
Non-Chart Functions
Expand Down
3 changes: 1 addition & 2 deletions grant_freq/cleaning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"import pandas as pd\n",
"import shared_utils\n",
"from calitp_data_analysis.sql import to_snakecase\n",
"from shared_utils import calitp_color_palette as cp\n",
"from shared_utils import geography_utils, styleguide\n",
"from calitp_data_analaysis import calitp_color_palette as cp, geography_utils, styleguide\n",
"\n",
"pd.options.display.max_columns = 100\n",
"pd.options.display.max_rows = 100\n",
Expand Down
4 changes: 1 addition & 3 deletions grant_freq/funding_amounts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
"metadata": {},
"outputs": [],
"source": [
"# from shared_utils import altair_utils\n",
"from shared_utils import calitp_color_palette as cp\n",
"from shared_utils import styleguide"
"from calitp_data_analaysis import calitp_color_palette as cp, styleguide"
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions grant_misc/A3_visuals.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"import pandas as pd\n",
"\n",
"from calitp_data_analysis.sql import to_snakecase\n",
"from shared_utils import calitp_color_palette\n",
"from shared_utils import styleguide"
"from calitp_data_analysis import calitp_color_palette, styleguide"
]
},
{
Expand Down
7 changes: 2 additions & 5 deletions grant_misc/B2_funding_amounts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"from shared_utils import altair_utils\n",
"from shared_utils import geography_utils\n",
"from shared_utils import calitp_color_palette as cp\n",
"from shared_utils import styleguide"
"from calitp_data_analysis import geography_utils, calitp_color_palette as cp, styleguide"
]
},
{
Expand Down Expand Up @@ -2330,7 +2327,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.9.13"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
2 changes: 1 addition & 1 deletion lctop/A1_data_prep.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#General packages
import pandas as pd
import geopandas as gpd
from shared_utils import geography_utils, utils
from calitp_data_analysis import geography_utils, utils
from calitp_data_analysis.sql import to_snakecase

#For saving geojson to GCS
Expand Down
2 changes: 1 addition & 1 deletion lctop/firstlook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"from shared_utils import geography_utils, utils\n",
"from calitp_data_analysis import geography_utils, utils\n",
"from calitp_data_analysis.sql import to_snakecase\n",
"import os\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion project_list/_sb1_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pandas as pd
import _harmonization_utils
from calitp_data_analysis.sql import to_snakecase
from shared_utils import utils
from calitp_data_analysis import utils

url_pt1 = "https://odpsvcs.dot.ca.gov/arcgis/rest/services/RCA/RCA_Projects_032022/FeatureServer/"
url_pt2 = "/query?where=1%3D1&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=*+&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&gdbVersion=&historicMoment=&returnDistinctValues=false&returnIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&multipatchOption=&resultOffset=&resultRecordCount=&returnTrueCurves=false&sqlFormat=none&f=geojson"
Expand Down
2 changes: 1 addition & 1 deletion project_list/add_sb1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"import pandas as pd\n",
"import _harmonization_utils \n",
"from calitp_data_analysis.sql import to_snakecase\n",
"from shared_utils import utils"
"from calitp_data_analysis import utils"
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions tircp/A6_zev.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import A1_data_prep

import altair as alt
from shared_utils import calitp_color_palette as cp
from shared_utils import styleguide
from calitp_data_analysis import calitp_color_palette as cp, styleguide

#import re
#from nltk import ngrams
Expand Down
1 change: 0 additions & 1 deletion tircp/A_START_HERE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"import A1_data_prep\n",
"import A5_crosswalks as crosswalks\n",
"import A6_zev\n",
"# import numpy as np\n",
"import pandas as pd\n",
"from calitp_data_analysis.sql import to_snakecase\n",
"\n",
Expand Down
5 changes: 2 additions & 3 deletions tircp/requests/Interim_Expenditures_Solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"import numpy as np\n",
"import pandas as pd\n",
"import TIRCP_functions\n",
"from siuba import *\n",
"from calitp import *\n",
"from calitp_data_analysis.sql to_snakecase\n",
"\n",
"GCS_FILE_PATH = \"gs://calitp-analytics-data/data-analyses/tircp/\"\n",
"\n",
Expand Down Expand Up @@ -3988,7 +3987,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
Loading