diff --git a/cartoframes/data/observatory/catalog.py b/cartoframes/data/observatory/catalog.py index 4553f12b8..a79021683 100644 --- a/cartoframes/data/observatory/catalog.py +++ b/cartoframes/data/observatory/catalog.py @@ -6,7 +6,7 @@ from .country import Country from .geography import Geography from .subscriptions import Subscriptions -from .repository.constants import COUNTRY_FILTER, CATEGORY_FILTER, GEOGRAPHY_FILTER +from .repository.constants import COUNTRY_FILTER, CATEGORY_FILTER, GEOGRAPHY_FILTER, PROVIDER_FILTER from ...auth import Credentials, defaults @@ -112,6 +112,21 @@ def geography(self, geography_id): self.filters[GEOGRAPHY_FILTER] = filter_value return self + def provider(self, provider_id): + """Add a provider filter to the current Catalog instance + + Args: + provider_id (str): + Id value of the provider to be used for filtering the Catalog. + + Returns: + :py:class:`CatalogList ` + + """ + + self.filters[PROVIDER_FILTER] = provider_id + return self + def clear_filters(self): """Remove the current filters from this Catalog instance.""" diff --git a/docs/developer-center/guides/02-Quickstart-Part-1.md b/docs/developer-center/guides/02-Quickstart-Part-1.md new file mode 100644 index 000000000..ac17123bc --- /dev/null +++ b/docs/developer-center/guides/02-Quickstart-Part-1.md @@ -0,0 +1,165 @@ +## Quickstart Part 1 + +Hi! Glad to see you made it to the Quickstart Guide! In this guide you are introduced to how CARTOframes can be used by data scientists in spatial analysis workflows. Using bike share data, this guide walks through some common steps a data scientist takes to answer the following question: **are the company's bike share stations placed in optimal locations?** + +Before you get started, we encourage you to have [your environment ready](/developers/cartoframes/guides/Install-CARTOframes-in-your-Notebooks) so you can get a feel for the library by using it. If you don’t have your environment set-up yet, check out this guide first. You will need: + +- A Python Notebook environment +- The CARTOframes library installed + +### Spatial analysis scenario + +Let's say you work for a bike share company in Arlington, Virginia and you want to better understand how your stations around the city are being used, and if these stations are placed in optimal locations. + +To begin, let's outline a workflow: + +- Explore your company's data +- Discover and enrich data thanks to the CARTO catalog +- Analyse if the current bike stations are placed in optimal locations +- And finally, share the results of your analysis with your team + +Let's get started! + +### Explore your company's data + +You will be using [this dataset](https://github.com/CartoDB/cartoframes/tree/develop/docs/developer-center/guides/quickstart/arlington_bikeshare_july_agg.geojson) in [GeoJSON](https://geojson.org) format to start your exploration. It contains information about the bike stations around the city of Arlington. As a first exploratory step, you read it into a Jupyter Notebook using a [Geopandas GeoDataframe](http://geopandas.org/reference/geopandas.GeoDataFrame.html). + +```py +import geopandas as gpd + +arlington_file = 'arlington_bikeshare_july_agg.geojson' +bikeshare_df = gpd.read_file(arlington_file) +bikeshare_df.head(3) +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
num_bike_dropoffsnum_bike_pickupstotal_eventsstation_idlongitudelatitudegeometry
017820438231000-77.05314438.858726POINT (-77.05314 38.85873)
122227649831001-77.05373838.857216POINT (-77.05374 38.85722)
2839710154931002-77.04921838.856372POINT (-77.04922 38.85637)
+ +By only reading the data into a geodataframe you aren't able to see at a glance where the stations are. So let's visualize it in a map! + +> Note: In case your data hasn't been geocoded before, you can do it thanks to our Location Data Services. Learn how to geocode your data reading the [Data Services reference](/developers/cartoframes/reference/#heading-Data-Services). + +You can visualize your geodataframes using the Map and Layer classes. You can take a look at our [reference section](/developers/cartoframes/reference/) or check the [visualization examples](/developers/cartoframes/examples/) to know all the visualization possibilities and which data sources are supported. + +```py +from cartoframes.viz import Map, Layer + +Map(Layer(bikeshare_df)) +``` + +![Explore Points Layer - Bikeshare Data](../img/guides/quickstart/explore_points_layer.png) + +Great! We have a map! + +Now, that you have a better sense of about where the stations are located, it's time to continue with the exploration. The next question to answer is which stations around the city are most active. To visualize this on the map, you can use a CARTOframes layer helper. Using the column `total_events`, which is the number of dropoffs and pickups at each station for the past month, let’s try a visualization helper called `size_continuous_layer` to size each station by that value: + +```py +from cartoframes.viz.helpers import size_continuous_layer + +Map(size_continuous_layer(bikeshare_df, 'total_events')) +``` + +![Explore Helper Method](../img/guides/quickstart/explore_helper.png) + +Good job! Now, just taking a look, you can see where are the stations with more activity. Also, thanks to be using a helper, we get a legend out of it. + +To learn more about visualizating your data, about how to add legends, pop-ups, widgets and how to do it faster thanks to helpers, check the [visualization examples](/developers/cartoframes/examples/#example-add-default-widget). + +Now, let's add another legend with the census polygons: + +```py +census_track = 'census_track.geojson' +census_track_df = gpd.read_file(census_track) + +Map(Layer(census_track_df)) +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OBJECTIDFULLTRACTIDTRACTIDgeometry
0151013102901102901POLYGON ((-77.09099 38.84516, -77.08957 38.844...
1251013103000103000POLYGON ((-77.08558 38.82992, -77.08625 38.828...
2351013102902102902POLYGON ((-77.09520 38.84499, -77.09442 38.844...
+ +And finally, let's combine both layers in the same visualization: + +```py +Map([ + Layer(census_track_df), + size_continuous_layer(bikeshare_df, 'total_events') +]) +``` + +![Combine Layers](../img/guides/quickstart/combine_layers.png) \ No newline at end of file diff --git a/docs/developer-center/guides/02-Quickstart.md b/docs/developer-center/guides/02-Quickstart.md deleted file mode 100644 index f46691b7e..000000000 --- a/docs/developer-center/guides/02-Quickstart.md +++ /dev/null @@ -1,176 +0,0 @@ -## Quickstart - -> Note: Before starting, please take into account this version is in `Beta` and, therefore, some things may change in the next release. - -Hi! Glad to see you made it to the Quickstart Guide! In this guide you are introduced to how CARTOframes can be used by data scientists in spatial analysis workflows. Using bike share data, this guide walks through some common steps a data scientist takes to answer the following question: **are the company's bike share stations placed in optimal locations?** - -Before you get started, we encourage you to have [your environment ready](https://github.com/CartoDB/cartoframes#install-instructions) so you can get a feel for the library by using it. If you don’t have your environment set-up yet, check out this guide first. You will need: - -- A Python Notebook environment -- The CARTOframes library installed - -### Spatial analysis scenario - -Let's say you work for a bike share company in Arlington, Virginia and you want to better understand how your stations around the city are being used, and if these stations are placed in optimal locations. - -To begin, let's outline a workflow: - -- Explore your company's data -- Discover and enrich data thanks to the CARTO catalog -- Analyse if the current bike stations are placed in optimal locations -- And finally, share the results of your analysis with your team - -Let's get started! - -### Explore your company's data - -You will be using [this dataset](https://github.com/CartoDB/cartoframes/tree/develop/docs/developer-center/guides/quickstart/arlington_bikeshare_july_agg.geojson) in [GeoJSON](https://geojson.org) format to start your exploration. It contains information about the bike stations around the city of Arlington. As a first exploratory step, you read it into a Jupyter Notebook using a [Geopandas GeoDataframe](http://geopandas.org/reference/geopandas.GeoDataFrame.html). - -```py -import geopandas as gpd -arlington_file = 'arlington_bikeshare_july_agg.geojson' -bikeshare_df = gpd.read_file(arlington_file) -bikeshare_df.head(3) -``` - -![Bikeshare data](../img/guides/quickstart/initial_dataframe.png) - -By only reading the data into a geodataframe you aren't able to see at a glance where the stations are. So let's visualize it in a map! - -> Note: In case your data hasn't been geocoded before, you can do it thanks to our Location Data Services. Learn how to geocode your data reading the [Data Services reference](/developers/cartoframes/reference/#heading-Data-Services). -You can visualize your geodataframes using the Map and Layer classes. You can take a look at our [reference section](/developers/cartoframes/reference/) or check the [visualization examples](/developers/cartoframes/examples/) to know all the visualization possibilities and which data sources are supported. - -```py -from cartoframes.viz import Map, Layer -Map(Layer(bikeshare_df)) -``` - -![Bikeshare data](../img/guides/quickstart/explore_layer.png) - -Great! We have a map! - -Now, that you have a better sense of about where the stations are located, it's time to continue with the exploration. The next question to answer is which stations around the city are most active. To visualize this on the map, you can use a CARTOframes layer helper. Using the column `total_events`, which is the number of dropoffs and pickups at each station for the past month, let’s try a visualization helper called `size_continuous_layer` to size each station by that value: - -```py -from cartoframes.viz.helpers import size_continuous_layer -Map(size_continuous_layer(bikeshare_df, 'total_events')) -``` - -![Bikeshare data](../img/guides/quickstart/explore_helper.png) - -Good job! Now, just taking a look, you can see where are the stations with more activity. Also, thanks to be using a helper, we get a legend out of it. - -To learn more about visualizating your data, about how to add legends, pop-ups, widgets and how to do it faster thanks to helpers, check the [visualization examples](/developers/cartoframes/examples/#example-add-default-widget). - -### Discover and enrich data thanks to the CARTO catalog - -You already know where your company stations are and their activity, now you want to know if they are in optimal locations. You start thinking about which data could be valuable to validate that and decide to check if there can be any correlation with households with no car data. Let's see how CARTOframes can help you finding that data and enrich yours. - -First, we will use the CARTO [data observatory](/developers/cartoframes/reference/#heading-Data-Observatory) to discover the data we want, data about households with no cars. - -```py -from cartoframes.data.observatory.catalog import Catalog -from cartoframes.data import enrichment -countries = Catalog().countries -usa_datasets = countries.get("usa").datasets -acs_demo_tracts = usa_datasets.iloc[84] -acs_no_car = acs_demo_tracts.variables().iloc[[88]] -``` - -Now that we have found the data we were looking for, let's filter out our area of intereset, Arlington. To do that, first we need to load Arlington's boundaries (they can be found [here](https://gisdata-arlgis.opendata.arcgis.com/datasets/census-tract-2010-polygons?geometry=-77.761%2C38.787%2C-76.772%2C38.974)): - -```py -arlington_tracts = gpd.read_file('./data/tracts/1/Census_Tract_2010_Polygons.shp').to_crs({'init': 'epsg:4326'}) -``` - -![Arlington tracts](../img/guides/quickstart/arlington_tracts.png) - -Let's continue enriching that area with the data we found before. To be able to do so, you have to log in to CARTO. You will need to create an API key and use the method `set_default_credentials` to create a session. If you haven't created an API key yet, check the [authentication reference](/developers/cartoframes/reference/#heading-Authentication) to learn how to get it. - -Note: If you don't have an account yet, you can get a [free account](https://carto.com/help/getting-started/student-accounts/) if you are a student or [get a trial](https://carto.com/signup/) if you aren't. - -```py -from cartoframes.auth import set_default_credentials -set_default_credentials(username='your_username', api_key='your_api_key') -``` - -Now, that you are logged in, let's enrich the Arlington tracts with the households with no car data and visualize them with another layer helper, the `color_continuous_layer`: - -```py -from cartoframes.data import enrichment -from cartoframes.viz.helpers import color_continuous_layer -arlington_no_car_df = enrichment.enrich_polygons(arlington_tracts, acs_no_car, {'no_car': 'SUM'}, data_geom_column='geometry_wkt') -Map(color_continuous_layer(arlington_no_car_df, value='no_car', title='No cars households')) -``` - -![Bikeshare data](../img/guides/quickstart/enrich_helper.png) - -Nice! Thanks to our layer helper, we can already see which are the areas with the highest percentage of households with no cars. - -### Analyse if the current bike stations are placed in optimal locations - -We can already suggest which are the areas where can make more sense to have a station looking at the ones that have more households with no cars. In this step, let's try to go a bit further and try to calculate which areas have significantly high or low numbers of them. We will use the open source library [pySAL](https://pysal.org) for that. - -You decide to use [Moran's I](https://pysal.readthedocs.io/en/v1.11.0/users/tutorials/autocorrelation.html#moran-s-i) to measure the spatial autocorrelation and [Queen](https://libpysal.readthedocs.io/en/latest/generated/libpysal.weights.Queen.html) as the algorithm to decide which areas are considered neighbours. Once you are done with your analysis (here we are just showing a simplified version of it), you assign a label with the significance level to each station. - -```py -from libpysal.weights import Queen -from pysal.explore.esda.moran import Moran_Local -wq = Queen.from_dataframe(arlington_no_car_df) -wq.transform = 'r' -li = Moran_Local(arlington_no_car_df['no_cars_2011_2015_by_households'], wq) -significance = 1 * (li.p_sim < 0.05) -spot_qs = [1, 3, 2, 4] # HH(hotspot), LL(coldspot), LH(doughnut), HL(diamond) -spots = sum([i * (significance * li.q==i) for i in spot_qs]) -spot_labels = ['Not significant', 'Hot spot', 'Low outlier', 'Cold spot', 'Hot outlier'] -labels = [spot_labels[i] for i in spots] -arlington_no_car_df = arlington_no_car_df.assign(cl=labels) -``` - -You have finished your analysis and now you want to see the results in a map, -plotting the significance of each area. Let's do it! - -```py -from cartoframes.viz.helpers import color_category_layer -hmap = ['#E4E4E4','#1785FB', '#F24440', '#12A2B8'] -Map([color_category_layer(arlington_no_car_df, 'cl', title='Significance', palette=hmap, stroke_color='#B5B5B5'), - size_continuous_layer(bikeshare_df, 'total_events', 'Pickups + Dropoffs')]) -``` - -![Bikeshare data](../img/guides/quickstart/analyze_helper.png) - -Awesome! You have finished with your analysis and see that your company has done a good job placing the stations. - -### Publish and share your results - -To finish your work, you want to share the results with some teammates. Also, it would be great if you could allow them to play with the information. Let's do that! - -First, you have to upload the data used by your maps to CARTO using the `Dataset` class: - -```py -from cartoframes.data import Dataset -Dataset(arlington_no_car_df).upload(table_name='arlington_ct_no_cars', credentials=creds, if_exists='replace') -Dataset(bikeshare_df).upload(table_name='bikeshare_july_agg', credentials=creds, if_exists='replace') -``` - -Now, let's add widgets so people are able to see some graphs about the information displayed and allow them to filter it. To do this, we only have to add `widget=True` to the helpers. - -```py -final_map = Map([ - color_category_layer('arlington_ct_no_cars', 'cl', title='Significance', palette=hmap, stroke_color='#B5B5B5', widget=True), - size_continuous_layer('bikeshare_july_agg', 'total_events', 'Pickups + Dropoffs', widget=True) -]) -final_map -``` - -![Bikeshare data](../img/guides/quickstart/share_helper.png) - -Cool! Now that you have a small dashboard to play with, let's publish it to CARTO so you are able to share it with anyone. To do this, you just need to call the [publish](/developers/cartoframes/examples/#example-publish-public-visualization) method from the `Map` class: - -```py -final_map.publish('bikeshare_spots') -``` - -![Bikeshare data](../img/guides/quickstart/share_output.png) - -Congratulations! You have finished this guide and have a sense about how CARTOframes can speed up your workflow. To continue learning, you can check the specific guides, check the [reference](/developers/cartoframes/reference/) to know everything about a class or a method or check the notebook [examples](/developers/cartoframes/examples/). \ No newline at end of file diff --git a/docs/developer-center/guides/03-Quickstart-Part-2.md b/docs/developer-center/guides/03-Quickstart-Part-2.md new file mode 100644 index 000000000..02e5f2212 --- /dev/null +++ b/docs/developer-center/guides/03-Quickstart-Part-2.md @@ -0,0 +1,49 @@ +## Quickstart Part 2 + +This is the second part of the [Quickstart Guide](/developers/cartoframes/guides/#Quickstart-Part-1), where you've learned how to import data and visualize it with CARTOframes. Now, let's share and publish your data. + +To be able to do so, you have to log in to CARTO. You will need to create an API key and use the method `set_default_credentials` to create a session. If you haven't created an API key yet, check the [authentication reference](/developers/cartoframes/reference/#heading-Authentication) to learn how to get it. + +Note: If you don't have an account yet, you can get a [free account](https://carto.com/help/getting-started/student-accounts/) if you are a student or [get a trial](https://carto.com/signup/) if you aren't. + +```py +from cartoframes.auth import set_default_credentials + +set_default_credentials(username='your_username', api_key='your_api_key') +``` + +### Publish and share your results + +To finish your work, you want to share the results with some teammates. Also, it would be great if you could allow them to play with the information. Let's do that! + +First, you have to upload the data used by your maps to CARTO using the `Dataset` class. We have two dataframes: the bikes sharing data (`bikeshare_df`) and the census track polygons (`census_track_df`) + +```py +from cartoframes.data import Dataset + +Dataset(bikeshare_df).upload(table_name='arlington_bikeshare', credentials=creds, if_exists='replace') +Dataset(census_track_df).upload(table_name='arlington_census_track', credentials=creds, if_exists='replace') +``` + +Now, let's add widgets so people are able to see some graphs about the information displayed and allow them to filter it. To do this, we only have to add `widget=True` to the helpers. + +```py +final_map = Map([ + Layer('arlington_census_track'), + size_continuous_layer('arlington_bikeshare', 'total_events', widget=True) +]) + +final_map +``` + +![Combine Layers with Widget](../img/guides/quickstart/combine_layers_widget.png) + +Cool! Now that you have a small dashboard to play with, let's publish it to CARTO so you are able to share it with anyone. To do this, you just need to call the [publish](/developers/cartoframes/examples/#example-publish-public-visualization) method from the `Map` class: + +```py +final_map.publish('arlington_bikeshare_spots') +``` + +![Bikeshare data](../img/guides/quickstart/share_output.png) + +Congratulations! You have finished this guide and have a sense about how CARTOframes can speed up your workflow. To continue learning, you can check the specific guides, check the [reference](/developers/cartoframes/reference/) to know everything about a class or a method or check the notebook [examples](/developers/cartoframes/examples/). \ No newline at end of file diff --git a/docs/developer-center/guides/04-Install-CARTOframes-in-your-Notebooks.md b/docs/developer-center/guides/04-Install-CARTOframes-in-your-Notebooks.md new file mode 100644 index 000000000..260f33f66 --- /dev/null +++ b/docs/developer-center/guides/04-Install-CARTOframes-in-your-Notebooks.md @@ -0,0 +1,55 @@ +## Install CARTOframes in your Notebooks + +This guide is intended for those who are going to start using CARTOframes and gives some instructions to install CARTOframes **locally**, in a **Jupyter Notebook** and using a **Virtual Environment**. + +### Install CARTOframes using `pip` + +It is possible to install CARTOframes with [`pip`](https://pypi.org/project/pip/) by simply typing the following in the command line to do a system install: + +```bash +$ pip install cartoframes +``` + +To install a specific version, for example, let's say the 1.2.3 version: + +```bash +$ pip install cartoframes==1.2.3 +``` + +To install a pre release, use the `--pre` flag: + +```bash +$ pip install cartoframes --pre +``` + +### Install CARTOframes in a Jupyter Notebook + +In this documentation, all the examples are in a [Jupyter Notebook](https://jupyter.org/). It is recommended to read the [beginner documentation](https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html) to get familiar with Jupyter. To install through a Jupyter Notebook, run this command: + +```bash +! pip install cartoframes +``` + +### Use a Virtual Environment + +It is recommended to install CARTOframes in a [Virtual Environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/), since they are very useful when working with Python locally. This section provides the necessary information to create a simple Virtual Environment and install CARTOframes in there: + +```bash +$ virtualenv cartoframes_env +$ source cartoframes_env/bin/activate +(cartoframes_env) $ pip install cartoframes +``` + +To install a specific version: + +```bash +$ virtualenv cartoframes_env +$ source cartoframes_env/bin/activate +(cartoframes_env) $ pip install cartoframes==1.2.3 +``` + +When the virtual environment is activated, it is visible in the command line prompt, in this case: `(cartoframes_env)`. It can be deactivated by typing `deactivate` to exit the virtualenv: + +```bash +(cartoframes_env) $ deactivate +``` diff --git a/docs/developer-center/guides/05-Login-to-CARTO-Platform.md b/docs/developer-center/guides/05-Login-to-CARTO-Platform.md new file mode 100644 index 000000000..78562df88 --- /dev/null +++ b/docs/developer-center/guides/05-Login-to-CARTO-Platform.md @@ -0,0 +1,76 @@ +## Login to CARTO Platform + +In this guide, our purpose is to focus on the basics of authentication in CARTOframes. There's a full [Authorization Fundamentals](https://carto.com/developers/fundamentals/authorization/) at CARTO guide to understand how to configure and manage API Keys. + +> To use CARTOframes is not *always* needed to be authenticated. + +It is needed to set up the user credentials to use Data Services, Data Enrichment or the Data Observatory, between others. In these cases, it's required to have a [CARTO account](https://carto.com/signup/). Once the user has created an account, the credentials can be found at **http://johnsmith.carto.com/your_apps.** for user `johnsmith`, and it should be a **Master** API Key: + +![Master API Key - CARTO Dashboard](../../img/guides/credentials/api-keys.png) + +All user accounts have a `default_public` API Key to access **public** data. + +### Credential parameters + +- `username`: your CARTO account username +- `base_url`: Base URL used for API calls. This is usually of the form `https://johnsmith.carto.com/` for user `johnsmith`. On premises installation (and others) have a different URL pattern. +- `api_key`: API Key of user's CARTO account. If the data is to be accessed is **public**, it can be set to `default_public`. + +### Default Credentials + +With [set_default_credentials](/developers/cartoframes/reference/#cartoframes-auth-set_default_credentials), the same user's authentication will be used by _all_ layers and sources by default. + +```py +from cartoframes.auth import set_default_credentials + +set_default_credentials( + username='johnsmith', + api_key='1a2b3c4d5e6f7g8h' +) +``` + +Credentials can be also set by using the `base_url` parameter, which is useful when having an **On premise** or a custom installation: + +```py +from cartoframes.auth import set_default_credentials + +set_default_credentials( + base_url='https://johnsmith.carto.com/', + api_key='1a2b3c4d5e6f7g8h' +) +``` + +When the data is public, the `api_key` parameter isn't required: it's automatically set to `default_public`: + +```py +from cartoframes.auth import set_default_credentials + +set_default_credentials('johnsmith') +``` + +### Specific Credentials + +Instead of setting credentials generally, it is possible to assign specific and different credentials for a Map, Dataset, Layer or Source, between others. + +```py +from cartoframes.auth import Credentials +from cartoframes.data import Dataset + +dataset = Dataset('dataset', credentials=Credentials('johnsmith', '1a2b3c4d5e6f7g8h')) +``` + +### The config file + +Credentials can be stored in a **configuration file** with the following format: + +Example `config.json` file: + +```json +{ + "APIKEY": "", + "USERNAME": "", + "USERURL": "https://{username}.carto.com/" +} +``` + +The filename is `cartocreds.json` by default, but it can be overwriten. There are [different methods](/developers/cartoframes/reference/#cartoframes-auth-Credentials) to read, update and delete your credentials. diff --git a/docs/developer-center/guides/_quickstart_part_2_next.md b/docs/developer-center/guides/_quickstart_part_2_next.md new file mode 100644 index 000000000..827055c85 --- /dev/null +++ b/docs/developer-center/guides/_quickstart_part_2_next.md @@ -0,0 +1,181 @@ +## Quickstart Part 2 + +This is the second part of the [Quickstart Guide](/developers/cartoframes/guides/#Quickstart-Part-1), where you've learned how to import data and visualize it with CARTOframes. Now, let's share and publish your data. + +To be able to do so, you have to log in to CARTO. You will need to create an API key and use the method `set_default_credentials` to create a session. If you haven't created an API key yet, check the [authentication reference](/developers/cartoframes/reference/#heading-Authentication) to learn how to get it. + +Note: If you don't have an account yet, you can get a [free account](https://carto.com/help/getting-started/student-accounts/) if you are a student or [get a trial](https://carto.com/signup/) if you aren't. + +```py +from cartoframes.auth import set_default_credentials + +set_default_credentials(username='your_username', api_key='your_api_key') +``` + +### Discover and enrich data thanks to the CARTO catalog + +You already know where your company stations are and their activity, now you want to know if they are in optimal locations. You start thinking about which data could be valuable to validate that and decide to check if there can be any correlation with households with no car data. Let's see how CARTOframes can help you finding that data and enrich yours. + +First, we will use the CARTO [data observatory](/developers/cartoframes/reference/#heading-Data-Observatory) to discover the data we want, data about **households** with **no cars.** in the **USA**. In this case, we are going to use data from Open Data **provider**. + +For this, we'll get the USA datasets: + +```py +from cartoframes.data.observatory.catalog import Catalog +from cartoframes.data import enrichment + +catalog = Catalog().country('usa').provider('open_data') + +catalog.datasets +``` + +You'll get something similar to this Catalog Dataset list: + +``` +[, + , + , + , + ... + , + , + , + ] +``` + +In order to get the **households** with **no cars** data, you've look for the datasets that contain this particular information, and depending on the data you're looking for you'd have to use one method or another. In this case, we're going to look for the first dataset from **Open Data** that has a variable which contains `no_cars` substring in its **id.** + +```py +no_cars_variables = None + +for dataset in catalog.datasets: + df = dataset.variables.to_dataframe() + variables = df[df['id'].str.contains('no_cars')] + + if variables.size: + no_cars_variables = variables + break + +no_cars_variables +``` + +Now that we have found the data we were looking for, let's filter out our area of intereset, Arlington. To do that, first we need to load Arlington's boundaries (they can be found [here](https://gisdata-arlgis.opendata.arcgis.com/datasets/census-tract-2010-polygons?geometry=-77.761%2C38.787%2C-76.772%2C38.974)): + +> **Note:** you can also get the census information from the [Data Observatory boundary functions](https://carto.com/developers/data-observatory/reference/#boundary-functions) + +```py +census_track = 'census_track.geojson' +arlington_census_track_df = gpd.read_file(census_track) +arlington_census_track_df.head(3) +``` + +![Arlington tracts](../img/guides/quickstart/arlington_tracts.png) + +Let's enrich the Arlington tracts with the households with no car data and visualize them with another layer helper, the `color_continuous_layer`: + +```py +from cartoframes.data import enrichment + +arlington_no_car_df = enrichment.enrich_polygons( + arlington_census_track_df, + variables=household_no_cars_variables, + agg_operators={no_car: 'sum' } +) + +arlington_no_car_df.head() +``` + +```py +from cartoframes.viz import Map +from cartoframes.viz.helpers import color_continuous_layer + +Map(color_continuous_layer(arlington_no_car_df, value='no_car', title='No cars households')) +``` + +![Bikeshare data](../img/guides/quickstart/enrich_helper.png) + +Nice! Thanks to our layer helper, we can already see which are the areas with the highest percentage of households with no cars. + +### Bonus: Analyse if the current bike stations are placed in optimal locations + +We can already suggest which are the areas where can make more sense to have a station looking at the ones that have more households with no cars. In this step, let's try to go a bit further and try to calculate which areas have significantly high or low numbers of them. We will use the open source library [pySAL](https://pysal.org) for that. + +You decide to use [Moran's I](https://pysal.readthedocs.io/en/v1.11.0/users/tutorials/autocorrelation.html#moran-s-i) to measure the spatial autocorrelation and [Queen](https://libpysal.readthedocs.io/en/latest/generated/libpysal.weights.Queen.html) as the algorithm to decide which areas are considered neighbours. Once you are done with your analysis (here we are just showing a simplified version of it), you assign a label with the significance level to each station. + +```py +from libpysal.weights import Queen +from pysal.explore.esda.moran import Moran_Local + +wq = Queen.from_dataframe(arlington_no_car_df) +wq.transform = 'r' +li = Moran_Local(arlington_no_car_df['no_cars_2011_2015_by_households'], wq) +significance = 1 * (li.p_sim < 0.05) +spot_qs = [1, 3, 2, 4] # HH(hotspot), LL(coldspot), LH(doughnut), HL(diamond) +spots = sum([i * (significance * li.q==i) for i in spot_qs]) + +spot_labels = ['Not significant', 'Hot spot', 'Low outlier', 'Cold spot', 'Hot outlier'] +labels = [spot_labels[i] for i in spots] +arlington_no_car_df = arlington_no_car_df.assign(labels=labels) +``` + +You have finished your analysis and now you want to see the results in a map, +plotting the significance of each area. Let's do it! + +```py +from cartoframes.viz.helpers import color_category_layer + +arlington_no_car_layer = color_category_layer( + arlington_no_car_df, + 'labels', + title='Significance', + palette=['#E4E4E4','#1785FB', '#F24440', '#12A2B8'], + stroke_color='#B5B5B5' +) + +arlington_bikeshare_layer = size_continuous_layer( + bikeshare_df, + 'total_events', + title='Pickups + Dropoffs' +) + +Map([arlington_no_car_layer, arlington_bikeshare_layer]) +``` + +![Bikeshare data](../img/guides/quickstart/analyze_helper.png) + +Awesome! You have finished with your analysis and see that your company has done a good job placing the stations. + +### Publish and share your results + +To finish your work, you want to share the results with some teammates. Also, it would be great if you could allow them to play with the information. Let's do that! + +First, you have to upload the data used by your maps to CARTO using the `Dataset` class: + +```py +from cartoframes.data import Dataset + +Dataset(arlington_no_car_df).upload(table_name='arlington_ct_no_cars', credentials=creds, if_exists='replace') +Dataset(bikeshare_df).upload(table_name='bikeshare_july_agg', credentials=creds, if_exists='replace') +``` + +Now, let's add widgets so people are able to see some graphs about the information displayed and allow them to filter it. To do this, we only have to add `widget=True` to the helpers. + +```py +final_map = Map([ + color_category_layer('arlington_ct_no_cars', 'cl', title='Significance', palette=hmap, stroke_color='#B5B5B5', widget=True), + size_continuous_layer('bikeshare_july_agg', 'total_events', 'Pickups + Dropoffs', widget=True) +]) +final_map +``` + +![Bikeshare data](../img/guides/quickstart/share_helper.png) + +Cool! Now that you have a small dashboard to play with, let's publish it to CARTO so you are able to share it with anyone. To do this, you just need to call the [publish](/developers/cartoframes/examples/#example-publish-public-visualization) method from the `Map` class: + +```py +final_map.publish('bikeshare_spots') +``` + +![Bikeshare data](../img/guides/quickstart/share_output.png) + +Congratulations! You have finished this guide and have a sense about how CARTOframes can speed up your workflow. To continue learning, you can check the specific guides, check the [reference](/developers/cartoframes/reference/) to know everything about a class or a method or check the notebook [examples](/developers/cartoframes/examples/). \ No newline at end of file diff --git a/docs/developer-center/img/guides/quickstart/combine_layers.png b/docs/developer-center/img/guides/quickstart/combine_layers.png new file mode 100644 index 000000000..d5132c521 Binary files /dev/null and b/docs/developer-center/img/guides/quickstart/combine_layers.png differ diff --git a/docs/developer-center/img/guides/quickstart/combine_layers_widget.png b/docs/developer-center/img/guides/quickstart/combine_layers_widget.png new file mode 100644 index 000000000..153369d76 Binary files /dev/null and b/docs/developer-center/img/guides/quickstart/combine_layers_widget.png differ diff --git a/docs/developer-center/img/guides/quickstart/explore_helper.png b/docs/developer-center/img/guides/quickstart/explore_helper.png new file mode 100644 index 000000000..0c6609198 Binary files /dev/null and b/docs/developer-center/img/guides/quickstart/explore_helper.png differ diff --git a/docs/developer-center/img/guides/quickstart/explore_points_layer.png b/docs/developer-center/img/guides/quickstart/explore_points_layer.png new file mode 100644 index 000000000..7e0887024 Binary files /dev/null and b/docs/developer-center/img/guides/quickstart/explore_points_layer.png differ diff --git a/docs/developer-center/img/guides/quickstart/explore_polygon_layer.png b/docs/developer-center/img/guides/quickstart/explore_polygon_layer.png new file mode 100644 index 000000000..095d07398 Binary files /dev/null and b/docs/developer-center/img/guides/quickstart/explore_polygon_layer.png differ diff --git a/docs/developer-center/img/guides/quickstart/share_output.png b/docs/developer-center/img/guides/quickstart/share_output.png new file mode 100644 index 000000000..409e2c948 Binary files /dev/null and b/docs/developer-center/img/guides/quickstart/share_output.png differ diff --git a/docs/developer-center/img/guides/basemap/guide-basemaps-1.png b/docs/developer-center/img/old-guides/basemap/guide-basemaps-1.png similarity index 100% rename from docs/developer-center/img/guides/basemap/guide-basemaps-1.png rename to docs/developer-center/img/old-guides/basemap/guide-basemaps-1.png diff --git a/docs/developer-center/img/guides/basemap/guide-basemaps-2.png b/docs/developer-center/img/old-guides/basemap/guide-basemaps-2.png similarity index 100% rename from docs/developer-center/img/guides/basemap/guide-basemaps-2.png rename to docs/developer-center/img/old-guides/basemap/guide-basemaps-2.png diff --git a/docs/developer-center/img/guides/basemap/guide-basemaps-3.png b/docs/developer-center/img/old-guides/basemap/guide-basemaps-3.png similarity index 100% rename from docs/developer-center/img/guides/basemap/guide-basemaps-3.png rename to docs/developer-center/img/old-guides/basemap/guide-basemaps-3.png diff --git a/docs/developer-center/img/guides/basemap/guide-basemaps-4.png b/docs/developer-center/img/old-guides/basemap/guide-basemaps-4.png similarity index 100% rename from docs/developer-center/img/guides/basemap/guide-basemaps-4.png rename to docs/developer-center/img/old-guides/basemap/guide-basemaps-4.png diff --git a/docs/developer-center/img/guides/basemap/guide-basemaps-5.png b/docs/developer-center/img/old-guides/basemap/guide-basemaps-5.png similarity index 100% rename from docs/developer-center/img/guides/basemap/guide-basemaps-5.png rename to docs/developer-center/img/old-guides/basemap/guide-basemaps-5.png diff --git a/docs/developer-center/img/guides/basemap/guide-basemaps-6.png b/docs/developer-center/img/old-guides/basemap/guide-basemaps-6.png similarity index 100% rename from docs/developer-center/img/guides/basemap/guide-basemaps-6.png rename to docs/developer-center/img/old-guides/basemap/guide-basemaps-6.png diff --git a/docs/developer-center/img/guides/credentials/api-keys.png b/docs/developer-center/img/old-guides/credentials/api-keys.png similarity index 100% rename from docs/developer-center/img/guides/credentials/api-keys.png rename to docs/developer-center/img/old-guides/credentials/api-keys.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-bins-line.png b/docs/developer-center/img/old-guides/helper-methods-1/color-bins-line.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-bins-line.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-bins-line.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-bins-point.png b/docs/developer-center/img/old-guides/helper-methods-1/color-bins-point.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-bins-point.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-bins-point.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-bins-polygon.png b/docs/developer-center/img/old-guides/helper-methods-1/color-bins-polygon.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-bins-polygon.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-bins-polygon.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-category-line.png b/docs/developer-center/img/old-guides/helper-methods-1/color-category-line.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-category-line.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-category-line.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-category-point.png b/docs/developer-center/img/old-guides/helper-methods-1/color-category-point.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-category-point.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-category-point.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-category-polygon.png b/docs/developer-center/img/old-guides/helper-methods-1/color-category-polygon.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-category-polygon.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-category-polygon.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-continuous-line.png b/docs/developer-center/img/old-guides/helper-methods-1/color-continuous-line.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-continuous-line.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-continuous-line.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-continuous-point.png b/docs/developer-center/img/old-guides/helper-methods-1/color-continuous-point.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-continuous-point.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-continuous-point.png diff --git a/docs/developer-center/img/guides/helper-methods-1/color-continuous-polygon.png b/docs/developer-center/img/old-guides/helper-methods-1/color-continuous-polygon.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/color-continuous-polygon.png rename to docs/developer-center/img/old-guides/helper-methods-1/color-continuous-polygon.png diff --git a/docs/developer-center/img/guides/helper-methods-1/size-bins-line.png b/docs/developer-center/img/old-guides/helper-methods-1/size-bins-line.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/size-bins-line.png rename to docs/developer-center/img/old-guides/helper-methods-1/size-bins-line.png diff --git a/docs/developer-center/img/guides/helper-methods-1/size-bins-point.png b/docs/developer-center/img/old-guides/helper-methods-1/size-bins-point.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/size-bins-point.png rename to docs/developer-center/img/old-guides/helper-methods-1/size-bins-point.png diff --git a/docs/developer-center/img/guides/helper-methods-1/size-category-line.png b/docs/developer-center/img/old-guides/helper-methods-1/size-category-line.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/size-category-line.png rename to docs/developer-center/img/old-guides/helper-methods-1/size-category-line.png diff --git a/docs/developer-center/img/guides/helper-methods-1/size-category-point.png b/docs/developer-center/img/old-guides/helper-methods-1/size-category-point.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/size-category-point.png rename to docs/developer-center/img/old-guides/helper-methods-1/size-category-point.png diff --git a/docs/developer-center/img/guides/helper-methods-1/size-continuous-line.png b/docs/developer-center/img/old-guides/helper-methods-1/size-continuous-line.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/size-continuous-line.png rename to docs/developer-center/img/old-guides/helper-methods-1/size-continuous-line.png diff --git a/docs/developer-center/img/guides/helper-methods-1/size-continuous-point.png b/docs/developer-center/img/old-guides/helper-methods-1/size-continuous-point.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-1/size-continuous-point.png rename to docs/developer-center/img/old-guides/helper-methods-1/size-continuous-point.png diff --git a/docs/developer-center/img/guides/helper-methods-2/example-1.png b/docs/developer-center/img/old-guides/helper-methods-2/example-1.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-2/example-1.png rename to docs/developer-center/img/old-guides/helper-methods-2/example-1.png diff --git a/docs/developer-center/img/guides/helper-methods-2/example-2.png b/docs/developer-center/img/old-guides/helper-methods-2/example-2.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-2/example-2.png rename to docs/developer-center/img/old-guides/helper-methods-2/example-2.png diff --git a/docs/developer-center/img/guides/helper-methods-2/example-3.png b/docs/developer-center/img/old-guides/helper-methods-2/example-3.png similarity index 100% rename from docs/developer-center/img/guides/helper-methods-2/example-3.png rename to docs/developer-center/img/old-guides/helper-methods-2/example-3.png diff --git a/docs/developer-center/img/guides/layout/layout-1.png b/docs/developer-center/img/old-guides/layout/layout-1.png similarity index 100% rename from docs/developer-center/img/guides/layout/layout-1.png rename to docs/developer-center/img/old-guides/layout/layout-1.png diff --git a/docs/developer-center/img/guides/layout/layout-2.png b/docs/developer-center/img/old-guides/layout/layout-2.png similarity index 100% rename from docs/developer-center/img/guides/layout/layout-2.png rename to docs/developer-center/img/old-guides/layout/layout-2.png diff --git a/docs/developer-center/img/guides/layout/layout-3.png b/docs/developer-center/img/old-guides/layout/layout-3.png similarity index 100% rename from docs/developer-center/img/guides/layout/layout-3.png rename to docs/developer-center/img/old-guides/layout/layout-3.png diff --git a/docs/developer-center/img/guides/layout/layout-4.png b/docs/developer-center/img/old-guides/layout/layout-4.png similarity index 100% rename from docs/developer-center/img/guides/layout/layout-4.png rename to docs/developer-center/img/old-guides/layout/layout-4.png diff --git a/docs/developer-center/img/guides/legends/legends-1.png b/docs/developer-center/img/old-guides/legends/legends-1.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-1.png rename to docs/developer-center/img/old-guides/legends/legends-1.png diff --git a/docs/developer-center/img/guides/legends/legends-2.png b/docs/developer-center/img/old-guides/legends/legends-2.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-2.png rename to docs/developer-center/img/old-guides/legends/legends-2.png diff --git a/docs/developer-center/img/guides/legends/legends-3.png b/docs/developer-center/img/old-guides/legends/legends-3.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-3.png rename to docs/developer-center/img/old-guides/legends/legends-3.png diff --git a/docs/developer-center/img/guides/legends/legends-4.png b/docs/developer-center/img/old-guides/legends/legends-4.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-4.png rename to docs/developer-center/img/old-guides/legends/legends-4.png diff --git a/docs/developer-center/img/guides/legends/legends-5.png b/docs/developer-center/img/old-guides/legends/legends-5.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-5.png rename to docs/developer-center/img/old-guides/legends/legends-5.png diff --git a/docs/developer-center/img/guides/legends/legends-6.png b/docs/developer-center/img/old-guides/legends/legends-6.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-6.png rename to docs/developer-center/img/old-guides/legends/legends-6.png diff --git a/docs/developer-center/img/guides/legends/legends-7.png b/docs/developer-center/img/old-guides/legends/legends-7.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-7.png rename to docs/developer-center/img/old-guides/legends/legends-7.png diff --git a/docs/developer-center/img/guides/legends/legends-8.png b/docs/developer-center/img/old-guides/legends/legends-8.png similarity index 100% rename from docs/developer-center/img/guides/legends/legends-8.png rename to docs/developer-center/img/old-guides/legends/legends-8.png diff --git a/docs/developer-center/img/guides/popups/popups-1.png b/docs/developer-center/img/old-guides/popups/popups-1.png similarity index 100% rename from docs/developer-center/img/guides/popups/popups-1.png rename to docs/developer-center/img/old-guides/popups/popups-1.png diff --git a/docs/developer-center/img/guides/popups/popups-2.png b/docs/developer-center/img/old-guides/popups/popups-2.png similarity index 100% rename from docs/developer-center/img/guides/popups/popups-2.png rename to docs/developer-center/img/old-guides/popups/popups-2.png diff --git a/docs/developer-center/img/guides/popups/popups-3.png b/docs/developer-center/img/old-guides/popups/popups-3.png similarity index 100% rename from docs/developer-center/img/guides/popups/popups-3.png rename to docs/developer-center/img/old-guides/popups/popups-3.png diff --git a/docs/developer-center/img/guides/publishing/publishing-1.png b/docs/developer-center/img/old-guides/publishing/publishing-1.png similarity index 100% rename from docs/developer-center/img/guides/publishing/publishing-1.png rename to docs/developer-center/img/old-guides/publishing/publishing-1.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-1.png b/docs/developer-center/img/old-guides/quickstart/quickstart-1.png similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-1.png rename to docs/developer-center/img/old-guides/quickstart/quickstart-1.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-2.png b/docs/developer-center/img/old-guides/quickstart/quickstart-2.png similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-2.png rename to docs/developer-center/img/old-guides/quickstart/quickstart-2.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-3.png b/docs/developer-center/img/old-guides/quickstart/quickstart-3.png similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-3.png rename to docs/developer-center/img/old-guides/quickstart/quickstart-3.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-4.png b/docs/developer-center/img/old-guides/quickstart/quickstart-4.png similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-4.png rename to docs/developer-center/img/old-guides/quickstart/quickstart-4.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-5.png b/docs/developer-center/img/old-guides/quickstart/quickstart-5.png similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-5.png rename to docs/developer-center/img/old-guides/quickstart/quickstart-5.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-6.png b/docs/developer-center/img/old-guides/quickstart/quickstart-6.png similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-6.png rename to docs/developer-center/img/old-guides/quickstart/quickstart-6.png diff --git a/docs/developer-center/img/guides/quickstart/quickstart-final.gif b/docs/developer-center/img/old-guides/quickstart/quickstart-final.gif similarity index 100% rename from docs/developer-center/img/guides/quickstart/quickstart-final.gif rename to docs/developer-center/img/old-guides/quickstart/quickstart-final.gif diff --git a/docs/developer-center/img/guides/spatial-analysis/example-2.png b/docs/developer-center/img/old-guides/spatial-analysis/example-2.png similarity index 100% rename from docs/developer-center/img/guides/spatial-analysis/example-2.png rename to docs/developer-center/img/old-guides/spatial-analysis/example-2.png diff --git a/docs/developer-center/img/guides/spatial-analysis/example-3.png b/docs/developer-center/img/old-guides/spatial-analysis/example-3.png similarity index 100% rename from docs/developer-center/img/guides/spatial-analysis/example-3.png rename to docs/developer-center/img/old-guides/spatial-analysis/example-3.png diff --git a/docs/developer-center/img/guides/widgets/animation-property-widget.gif b/docs/developer-center/img/old-guides/widgets/animation-property-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/animation-property-widget.gif rename to docs/developer-center/img/old-guides/widgets/animation-property-widget.gif diff --git a/docs/developer-center/img/guides/widgets/animation-widget.gif b/docs/developer-center/img/old-guides/widgets/animation-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/animation-widget.gif rename to docs/developer-center/img/old-guides/widgets/animation-widget.gif diff --git a/docs/developer-center/img/guides/widgets/category-widget.gif b/docs/developer-center/img/old-guides/widgets/category-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/category-widget.gif rename to docs/developer-center/img/old-guides/widgets/category-widget.gif diff --git a/docs/developer-center/img/guides/widgets/combine-widgets.gif b/docs/developer-center/img/old-guides/widgets/combine-widgets.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/combine-widgets.gif rename to docs/developer-center/img/old-guides/widgets/combine-widgets.gif diff --git a/docs/developer-center/img/guides/widgets/default-widget.png b/docs/developer-center/img/old-guides/widgets/default-widget.png similarity index 100% rename from docs/developer-center/img/guides/widgets/default-widget.png rename to docs/developer-center/img/old-guides/widgets/default-widget.png diff --git a/docs/developer-center/img/guides/widgets/formula-global-widget.gif b/docs/developer-center/img/old-guides/widgets/formula-global-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/formula-global-widget.gif rename to docs/developer-center/img/old-guides/widgets/formula-global-widget.gif diff --git a/docs/developer-center/img/guides/widgets/formula-viewport-widget.gif b/docs/developer-center/img/old-guides/widgets/formula-viewport-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/formula-viewport-widget.gif rename to docs/developer-center/img/old-guides/widgets/formula-viewport-widget.gif diff --git a/docs/developer-center/img/guides/widgets/histogram-widget.gif b/docs/developer-center/img/old-guides/widgets/histogram-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/histogram-widget.gif rename to docs/developer-center/img/old-guides/widgets/histogram-widget.gif diff --git a/docs/developer-center/img/guides/widgets/time-series-widget.gif b/docs/developer-center/img/old-guides/widgets/time-series-widget.gif similarity index 100% rename from docs/developer-center/img/guides/widgets/time-series-widget.gif rename to docs/developer-center/img/old-guides/widgets/time-series-widget.gif