Urban-Analytics-Technology-Platform / popgetter-cli

A rust library and CLI for accessing popgetter data
0 stars 0 forks source link

Metric specification proposal #29

Open stuartlynn opened 1 month ago

stuartlynn commented 1 month ago

We need some way to refer to metrics in the data request / recipe command in the CLI . We would like users to be able to specify metrics in a few different ways. Some examples might be

this would be used like this in the CLI etc

popgetter data --metrics hlx:population*,8a4a71e75b02cea0aaa2ab0191504ea8f0cc8e81278e19 

or

popgetter data --hxl sdfsdf -id sdfsdfds -human_readable "Something"

Some suggested ways we might want to specify metrics:

hxl:#population+children+age0_17 // Single HXL command 
hxl:#population+children* // Range of metrics that match an HXL regex 
id:8a4a71e75b02cea0aaa2ab0191504ea8f0cc8e81278e19 // Id in the metrics table 
name:"Infants aged 0 to 4"  // Human readable name
enum MetricIdSpec{
   hxl(String),
   id(String),
  ...
}

other ways?

stuartlynn commented 1 month ago

Proposals for command structure.

popgetter data --metrics hlx:population*,8a4a71e75b02cea0aaa2ab0191504ea8f0cc8e81278e19 --geometry municipality --with-geometry --year 2022

popgetter metrics hxl:#population+children+age0_17 --geometry municipality --with-geometry --year 2022 popgetter geometry municipality --year 2022

stuartlynn commented 1 month ago

popgetter get vs popgetter data

stuartlynn commented 3 weeks ago

This is implemented with #24