Skip to content

Commit

Permalink
Update to Map SDK 2.0 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
abstractalgo authored Apr 25, 2024
1 parent 66dc2dd commit d5c57e3
Show file tree
Hide file tree
Showing 28 changed files with 172 additions and 174 deletions.
6 changes: 3 additions & 3 deletions python-notebooks/01 - Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `sidecar`: Jupyter sidecar widget to allow rendering Foursquare Studio in a sidebar.\n",
"- `pandas`: DataFrame library\n",
"\n",
Expand All @@ -50,7 +50,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' sidecar pandas"
" !pip install 'foursquare.map_sdk>=1.0' sidecar pandas"
]
},
{
Expand All @@ -68,7 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"from sidecar import Sidecar\n",
"import pandas as pd"
]
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/02 - Local maps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: the Studio Map SDK\n",
"- `foursquare.map-sdk`: the Studio Map SDK\n",
"- `requests`: for making HTTP requests\n",
"- `pandas`: DataFrame library\n",
"\n",
Expand All @@ -50,7 +50,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' requests pandas"
" !pip install 'foursquare.map_sdk>=1.0' requests pandas"
]
},
{
Expand All @@ -68,7 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"from uuid import uuid4\n",
"import pandas as pd\n",
"import requests"
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/03 - Layers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `pandas`: DataFrame library\n",
"\n",
"If running this notebook in Binder, these dependencies should already be installed. If running in Colab, the next cell will install these dependencies."
Expand All @@ -49,7 +49,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas"
" !pip install 'foursquare.map_sdk>=1.0' pandas"
]
},
{
Expand All @@ -67,7 +67,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"import pandas as pd\n",
"from uuid import uuid4"
]
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/04 - Filters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `pandas`: DataFrame library\n",
"\n",
"If running this notebook in Binder, these dependencies should already be installed. If running in Colab, the next cell will install these dependencies."
Expand All @@ -49,7 +49,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas"
" !pip install 'foursquare.map_sdk>=1.0' pandas"
]
},
{
Expand All @@ -67,7 +67,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"import pandas as pd\n",
"import ipywidgets as widgets\n",
"from uuid import uuid4"
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/05 - Timeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `pandas`: DataFrame library\n",
"\n",
"If running this notebook in Binder, these dependencies should already be installed. If running in Colab, the next cell will install these dependencies."
Expand All @@ -49,7 +49,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas"
" !pip install 'foursquare.map_sdk>=1.0' pandas"
]
},
{
Expand All @@ -67,7 +67,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"from datetime import datetime\n",
"import pandas as pd\n",
"from uuid import uuid4"
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/06 - Crossfilter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `pandas`: DataFrame library\n",
"- `plotly`: graph plotting library\n",
"\n",
Expand All @@ -50,7 +50,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas 'plotly>=5.10.0'"
" !pip install 'foursquare.map_sdk>=1.0' pandas 'plotly>=5.10.0'"
]
},
{
Expand All @@ -68,7 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"import pandas as pd\n",
"import plotly.graph_objects as go\n",
"from uuid import uuid4"
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/07 - Eventhandling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"\n",
"If running this notebook in Binder, these dependencies should already be installed. If running in Colab, the next cell will install these dependencies."
]
Expand All @@ -39,7 +39,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0'"
" !pip install 'foursquare.map_sdk>=1.0'"
]
},
{
Expand All @@ -55,7 +55,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"import ipywidgets as widgets"
]
},
Expand Down
4 changes: 2 additions & 2 deletions python-notebooks/08 - Tensorflow_prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas numpy scikit-learn scipy seaborn matplotlib tensorflow"
" !pip install 'foursquare.map_sdk>=1.0' pandas numpy scikit-learn scipy seaborn matplotlib tensorflow"
]
},
{
Expand Down Expand Up @@ -120,7 +120,7 @@
"from tensorflow.keras import Sequential\n",
"from tensorflow.keras.layers import Dense\n",
"\n",
"from unfolded.map_sdk import create_map"
"from foursquare.map_sdk import create_map"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions python-notebooks/09 - Suitability_Analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas numpy scikit-learn seaborn matplotlib h3 catboost missingno"
" !pip install 'foursquare.map_sdk>=1.0' pandas numpy scikit-learn seaborn matplotlib h3 catboost missingno"
]
},
{
Expand Down Expand Up @@ -91,7 +91,7 @@
"from catboost import CatBoostRegressor\n",
"from sklearn.cluster import KMeans\n",
"from sklearn.model_selection import train_test_split\n",
"from unfolded.map_sdk import create_map"
"from foursquare.map_sdk import create_map"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/10 - Kuwala Popularity Correlation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `pandas`: DataFrame library\n",
"- `h3`: Hexagonal hierarchical geospatial indexing system\n",
"- `geojson`: Helpers for working with GeoJSON data\n",
Expand All @@ -79,7 +79,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' pandas h3 geojson 'pandas-profiling>=3'"
" !pip install 'foursquare.map_sdk>=1.0' pandas h3 geojson 'pandas-profiling>=3'"
]
},
{
Expand All @@ -99,7 +99,7 @@
"import pandas as pd\n",
"from geojson import Polygon\n",
"from pandas_profiling import ProfileReport\n",
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"from uuid import uuid4"
]
},
Expand Down
10 changes: 5 additions & 5 deletions python-notebooks/11 - Pytorch Trip Duration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"- `category_encoders`\n",
"- `torch`\n",
"- `missingno`\n",
"- `unfolded.map-sdk`\n",
"- `foursquare.map-sdk`\n",
"- `unfolded.data-sdk`\n",
"\n",
"If running this notebook in Binder, these dependencies should already be installed. If running in Colab, the next cell will install these dependencies. In another environment, you'll need to make sure these dependencies are available by running the following `pip` command in a shell.\n",
"\n",
"```bash\n",
"pip install xarray dask netCDF4 bottleneck tqdm dask-ml pandas seaborn matplotlib scikit-learn category_encoders torch missingno unfolded.map-sdk unfolded.data-sdk\n",
"pip install xarray dask netCDF4 bottleneck tqdm dask-ml pandas seaborn matplotlib scikit-learn category_encoders torch missingno foursquare.map-sdk unfolded.data-sdk\n",
"```\n",
"\n",
"This notebook was originally tested with the following package versions, but likely works with a broad range of versions:\n",
Expand All @@ -76,7 +76,7 @@
"- category_encoders==2.2.2\n",
"- torch==1.9.1 \n",
"- missingno==0.5.0 \n",
"- unfolded.map-sdk==0.5.0\n",
"- foursquare.map-sdk==0.5.0\n",
"- unfolded.data-sdk==0.5.0"
]
},
Expand All @@ -90,7 +90,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' xarray dask netCDF4 bottleneck tqdm dask-ml pandas seaborn matplotlib scikit-learn category_encoders torch missingno unfolded.data-sdk"
" !pip install 'foursquare.map_sdk>=1.0' xarray dask netCDF4 bottleneck tqdm dask-ml pandas seaborn matplotlib scikit-learn category_encoders torch missingno unfolded.data-sdk"
]
},
{
Expand Down Expand Up @@ -127,7 +127,7 @@
"from sklearn.model_selection import train_test_split\n",
"from sklearn.preprocessing import MinMaxScaler\n",
"from sklearn.metrics import mean_absolute_error, mean_absolute_percentage_error\n",
"from unfolded.map_sdk import create_map"
"from foursquare.map_sdk import create_map"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions python-notebooks/Effects.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"\n",
"This notebook requires the following Python dependencies:\n",
"\n",
"- `unfolded.map-sdk`: The Studio Map SDK\n",
"- `foursquare.map-sdk`: The Studio Map SDK\n",
"- `pandas`: DataFrame library\n",
"- `requests`: HTTP request library for retrieving data from a URL\n",
"\n",
Expand All @@ -34,7 +34,7 @@
"# If in Colab, install this notebook's required dependencies\n",
"import sys\n",
"if \"google.colab\" in sys.modules:\n",
" !pip install 'unfolded.map_sdk>=1.0' requests pandas"
" !pip install 'foursquare.map_sdk>=1.0' requests pandas"
]
},
{
Expand All @@ -52,7 +52,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import create_map\n",
"from foursquare.map_sdk import create_map\n",
"import pandas as pd\n",
"import requests"
]
Expand Down
4 changes: 2 additions & 2 deletions python-notebooks/experimental/bokeh-data-sdk.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# Studio Map SDK with Data SDK and Bokeh\n",
"This example illustrates how to fetch the data that is published on our map and with our Data SDK visualize it on a chart with [Bokeh library](https://docs.bokeh.org/en/latest/index.html)\n",
"\n",
"This example is using the beta [unfolded.map-sdk](https://pypi.org/project/unfolded.map-sdk/) module in Jupyter to enable map loading"
"This example is using the beta [foursquare.map-sdk](https://pypi.org/project/foursquare.map-sdk/) module in Jupyter to enable map loading"
]
},
{
Expand All @@ -16,7 +16,7 @@
"metadata": {},
"outputs": [],
"source": [
"from unfolded.map_sdk import StudioMap"
"from foursquare.map_sdk import StudioMap"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ sidecar
tensorflow
torch
unfolded.data-sdk>=0.7.0
unfolded.map-sdk>=1.0.0
foursquare.map-sdk>=2.0.0
xarray
2 changes: 1 addition & 1 deletion typescript-examples/annotations-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@unfolded/map-sdk": "^1.13.0",
"@foursquare/map-sdk": "2.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
3 changes: 2 additions & 1 deletion typescript-examples/annotations-example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FC, useEffect, useRef } from "react";
import { createMap } from "@unfolded/map-sdk";
import { createMap } from "@foursquare/map-sdk";
import { editorContent } from "./editor-content";

export const App: FC = () => {
Expand All @@ -8,6 +8,7 @@ export const App: FC = () => {
useEffect(() => {
const initMap = async () => {
const map = await createMap({
apiKey: "<your-api-key>",
container: containerRef.current!,
});

Expand Down
Loading

0 comments on commit d5c57e3

Please sign in to comment.