The Constellate analytics environment is built on Binder and accepts most common data types.
Constellate Dataset Builder Data
We encourage teachers to use Constellate data because it is easy to create custom data using our dataset builder. Our python client makes pulling in data very easy: simply insert a dataset ID and the relevant dataset can be pulled in automatically.
Using the dataset dashboard
There are several Python notebook lessons available through the dataset dashboard that will automatically populate your dataset ID.
For the relevant dataset, select "Analyze."
You will be presented with a list of notebook options for analyzing your dataset. When the notebook loads, the relevant line will be highlighted in yellow with your dataset ID pre-populated.
The Constellate Client has methods for retrieving a variety of data. See the Constellate Client reference documentation for more information on syntax.
All other kinds of data
There are a variety of options when Constellate Builder data is not appropriate such as uploading local data, pulling in remote data, or using an API.
Upload from a local machine
If the data is stored on a local machine, it may be uploaded into the notebook environment using the file explorer.
- Go to
File > Open
- Navigate to the
/datafolder, then choose "Upload," choose the file, then click "Upload" again.
Pull from another source
If your data is stored in web-accessible location, some code could bring in your dataset files automatically. Here's an example using Python:
import urllib.request data = [ 'http://file1.csv', 'http://file2.csv', 'http://file3.csv' ] for url in data: urllib.request.urlretrieve(url, 'data/' + url.rsplit('/', 1)[-1])
Specify the URL for each file in the data list and it will automatically be downloaded and properly named in the data folder.
Using an API
Depending on your data source, you may be able to upload using an available API. See the documentation for your data source for more information. If needed, unix commands can be inserted into a Jupyter Notebook by starting with an exclamation point, such as:
!pip install datasourceapi
It is also possible to open a terminal window: