Skip to content

Confirm that the process of downloading a data set is clear (use a generic sample data set) #9

@broneks

Description

@broneks

From Monica (https://github.com/thinkdata-works/namara-app/issues/3187):

I send this email (with screenshots) for each client almost every time we deliver a new data set. It would be great to be able to point to a page on Namara instead. PLEASE USE A GENERIC DATA SET AS EXAMPLE. This is a private data set for Altus.

The API to access meta information would be
https://api.namara.io/v0/data_sets/<data_set_uuid>?organization_id=59283ae7385129000a00003f&project_id=592847c0eb1e730009000003&api_key=<api_key>

For example, to access the enhanced scrape for Altus UK, you would first make the meta information call (please replace <api_key> with your api_key)-
https://api.namara.io/v0/data_sets/8430a946-3ce0-4e1a-881c-4d32b339af60?organization_id=59283ae7385129000a00003f&project_id=592847c0eb1e730009000003&api_key=<api_key>

The json response will contain information on versions, and the script should pick the latest version. In the below example, en-4 is the latest version for https://api.namara.io/v0/data_sets/8430a946-3ce0-4e1a-881c-4d32b339af60?organization_id=59283ae7385129000a00003f&project_id=592847c0eb1e730009000003

The meta information API also contains the length for string in the min/max fields. For integer, decimal and currency fields, the min and max values reflect the actual minimum and maximum values but for string and text fields, the min and max values represent the length of smallest and the longest strings.

In order to access the data, you could use
https://api.namara.io/v0/data_sets/<data_set_uuid>/data/<latest_version>?geometry_format=wkt&api_key=<api_key>&organization_id=59283ae7385129000a00003f&project_id=592847c0eb1e730009000003

To export all records in a CSV,
https://api.namara.io/v0/data_sets/<data_set_uuid>/data/<latest_version>/export?geometry_format=wkt&api_key=<api_key>&organization_id=59283ae7385129000a00003f&project_id=592847c0eb1e730009000003

For the enhanced scrape data set - https://api.namara.io/v0/data_sets/8430a946-3ce0-4e1a-881c-4d32b339af60/data/en-4/export?geometry_format=wkt&organization_id=59283ae7385129000a00003f&project_id=592847c0eb1e730009000003&api_key=<api_key>

The result will return a json with {message: "Pending"} until the file is ready. The response will then look like

The URL is the link to the CSV file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions