Schema
CityIO Data Structure Standard version 2.1 [2018]
cityIO example data format
Example of 20 x 20 grid
An example of this version could be found here (online) and here (offline) Note that this format is a minimal protocol. It's ok to have additional information in different tables. fields with * are optional.
Fields
Note: * before a field reflects optional/suggested data
header
(dictionary)
Contains global data that explains the rest of the data. The header data should be defined for each table, and it is unlikely to change through different states.
name
(string)
the name of the table. It is the unique key and should match the regex /\w+/g ([0-9a-zA-Z_]).
spatial
(dictionary)
Contains spatial data that indicates the size, location and the physical resolution of the table data.
row
(unsigned short): the number of rows for the tablecolumn
(unsigned short): the number of columns for the tablelatitude
(double): latitude value in decimals. The table's origin is the north west corner.longitude
(double): longitude value in decimals. The table's origin is the north west corner.physical_latitude
(double): longitude of the physical location where the table is situated.physical_longitude
(double): latitude of the physical location where the table is situated.rotation
(double): the clockwise rotation of table in degrees. It is x axis relative to thelatitude
andlongitude
.cellSize
(float): the physical size in meters of one cell's edge.
owner*
(array) new
field indicating the owner of the table. An object that has, "name, title, institution" (all strings).
block
(array)
An array of strings to indicate the representation of elements in grid
. Note it is an array, which is takes account on the order of the information. A Typical block
element will start with "type", "height", "rotation"
, but may different across tables.
mapping*
(dictionary)
A breakdown containing the necessary mapping of data inside each block. This can be taken as the enumerator field, that you can have a verbose explanation of data types. Often, the "type" field has a mapping of what each block indicates.
Note that you can have multiple mappings, for things like mask
.
meta [auto-generated by server]
users should avoid sending this
meta data reserved for the backend. The server will insert these values.
id
(GUID): hash(sha256, overkill) of the grid_datatimestamp
(int): UNIX epoch timestamp indicating when the table was received in the server. Milliseconds.apiv
(string): api's version (which is 2)
grid
(Array or arrays)
The meat part of the data. A grid field could be:
"grid":[[1,0,0],[0,7,3]]
where:
- i[0][0] is the type of the gridcell
- i[0][1] is the height of the gridcell
- i[0][2] is the rotation of the gridcell
Note: the specifics of each grid
object are specified in the block
field
The direction of the data is illustrated below. The order of each single block is defined according to the header/block
section.
objects
Flexible area that you can put whatever field you want. This is a place you want for global variables could potentially change.
Previous API version [should not be used]
version 1.0
This is the 1.0 format the cityIO table (only used in CityScope Volpe for now)
The following is an example of the mapping of ids and block representations.
starting from [API v2.0](Data Format) different tables may have different mappings.
Data typeId is a signed int.
the mapping is also provided as a JSON format
Id | Type |
---|---|
-2 | MASK_TABLE_BOUNDS |
-1 | MASK_INTERACTIVE |
0 | RL |
1 | RM |
2 | RS |
3 | OL |
4 | OM |
5 | OS |
6 | ROAD |
7 | AMENITIES |
8 | PARK |
9 | PARKING |
Enum for types
type | description |
---|---|
MASK_TABLE_BOUNDS | |
MASK_INTERACTIVE | |
RL | Residence Large |
RM | Residence Medium |
RS | Residence Small |
OL | Office Large |
OM | Office Medium |
OS | Office Small |
ROAD | |
AMENITIES | |
PARK | |
PARKING |
Density Number
Right now we are using this value for the Volpe Project (it might change according to the city studied)
type | density |
---|---|
RL | 89 sqm/ppl |
RM | 55 sqm/ppl |
RS | 15 sqm/ppl |
OL | 30 sqm/ppl |
OM | 18 sqm/ppl |
OS | 5 sqm/ppl |
Originally taken from ChangingPlaces/Andorra/Grasshopper Repo
Energy Consumption (Buildings)
Right now we are using this value for the Volpe Project (it might change according to the city studied)
type | Energy |
---|---|
RL | 5930.34 kWh/ppl |
RM | 2617.20 kWh/ppl |
RS | 2141.59 kWh/ppl |
OL | 10542.83 kWh/ppl |
OM | 4652.80 kWh/ppl |
OS | 3807.27 kWh/ppl |
CO2 Production (Buildings)
Right now we are using this value for the Volpe Project (it might change according to the city studied)
type | CO2 |
---|---|
RL | 2283.18 CO2/ppl |
RM | 1007.26 CO2/ppl |
RS | 824.30 CO2/ppl |
OL | 4058.99 CO2/ppl |
OM | 1791.33 CO2/ppl |
OS | 1465.79 CO2/ppl |
Energy Consumption (Mobility)
Right now we are using this value for the Volpe Project (it might change according to the city studied)
type | Energy |
---|---|
Car | 25437.50 kWh/ppl |
PEV | 4500.00 kWh/ppl |
CO2 Production (Mobility)
Right now we are using this value for the Volpe Project (it might change according to the city studied)
type | CO2 |
---|---|
Car | 6684.97 CO2/vehicle |
PEV | 1732.50 CO2/vehicle |