Install the CARTO plugin
Click on the Plugins Menu > manage and install plugins. Search for CartoDB and install. (note CARTO has recently rebranded and was originally called CartoDB).
Connect QGIS to your CARTO account
-
Once the plugin is installed, you will see a new option in the toolbar at the top of QGIS
-
Click Add Connection and select New in the dialog box which appears.
- In the CartoDB User box enter your CARTO username
- To find your Carto DB API Key head over to your account on the CARTO website. Click on the account button at the top right of the page and select Your API Keys. Copy and paste this API key in to your QGIS dialog box.
- Click Connect in the Connection Manager dialog box
Download a layer from your CARTO account
-
Now you have connected the CartoDB plugin with your CARTO account, you should see that some of the options which were previously greyed out are now selectable. On the left hand menu of QGIS, there should be two buttons which allow you to download a layer, or create an SQL query and download some information from your CARTO account.
-
For now, select Add CartoDB layer and find the listings layer we uploaded to CARTO in exercise 5.
- It would be useful to add some geographical context to this cloud of points. In the Exercise 6 folder I have placed a file called
London_Ward_CityMerged.shp
(which I downloaded from the London Datastore). This is a shapefile of all Wards in London. Make this layer transparent, so that the AirBNB listings can be seen at the same time.
Upload a layer to your CARTO account
The interface between QGIS and CARTO works in both ways, so shapefiles can also be uploaded to the CARTO server. This can be particularly useful if you want to create or edit your shapefiles offline. We are going to upload the London_Ward_CityMerged.shp
so that we can use it directly in the CARTO account.
-
In the top menu of QGIS, click the upload layers to CartoDB button
-
Select the
London_Ward_CityMerged.shp
and click Upload -
Head over to your CARTO account. You should now see the London Ward file ready to be visualised.
-
Have a go at plotting this
London_Ward_CityMerged.shp
file in CARTO along with thelayers.csv
file of AirBNB listings.