block by maptastik 682d8aba9d539aca165e

Constructing the URL for files on Google Drive

First things first, you’ll need to make sure your data are in a folder within your Google Drive rather than the root directory. Once you’ve added your data file to that folder, make sure that folder and the file are shareable.

These steps assume you’re working through Google Drive in your browser:

  1. Navigate to the folder in your Google Drive.
  2. Examine the URL of the folder. It should look something like https://drive.google.com/drive/u/0/folders/<folder ID>. The folder ID should be a string of numbers and letter rather than the name you gave the folder.
  3. Generate the URL of your file. The URL consists of three (3) parts that you’ll put together:
    1. https://googledrive.com/host/
    2. folder ID
    3. /your file

For example, if you have data.geojson in a folder with an of ID a1B2c3defg456, the your URL to access that data would be https://googledrive.com/host/a1B2c3defg456/data.geojson.