I am working with micro tasking web app, where task force is tagging data points for me. The questionnaire they have is flexible, meaning they can tag a data point with unlimited number of attributes. There are some defaults and required fields in the json schema, however not all of them are one of these. At the end there are 2 examples of outputs for 2 different data points.
I need to have a script in python which would allow me to unpack this results into digestable format for non-data analytics, like csv. Would JSON Schema use apply here? Any advices or leads?
Thanks
1)
{
"source_relevance_section": {
"source_relevance": [
"Source report refers to the subject"
]
},
"micro_event_section": {
"micro_event_list": [
{
"subject_section": {
"subject_list": [
{
"subject_type": "people (unspecified/other)",
"subject_number_txt": "at least one",
"subject_info": "Mad man drove into a shop"
}
]
},
"location_object_info_section": {
"location_object_info": "Warsaw,"
},
"actions_section": {
"action_section": {
"action_list": [
{
"action_type": "vehicle-impact [attack]"
}
]
},
"building_object_section": {
"building_object_list": []
},
"people_object_section": {
"people_object_list": [
{
"people_object_impact_list": [
{
"people_object_impact": "incident object [person]"
}
],
"people_object_type": "people in shop",
"people_object_number_txt": "at least one",
"people_object_info": "one or more people got injured"
}
]
},
"vehicles_section": {
"vehicles_list": []
},
"property_object_section": {
"property_object_list": []
},
"temporary_object_section": {
"temporary_object_list": []
}
}
}
]
}
}
2)
{
"source_relevance_section": {
"source_relevance": [
"Source report refers to the subject"
]
},
"micro_event_section": {
"micro_event_list": [
{
"subject_section": {
"subject_list": [
{
"subject_type": "gunmen",
"subject_number_txt": "at least one",
"subject_info": "Unspecified individuals"
}
]
},
"location_object_info_section": {
"location_object_info": "Paris"
},
"actions_section": {
"action_section": {
"action_list": [
{
"action_type": "firearm [attack, gunbattle]"
}
]
},
"building_object_section": {},
"people_object_section": {
"people_object_list": [
{
"people_object_impact_list": [
{
"people_object_impact": "injury [person]"
}
],
"people_object_type": "people (unspecified/other)",
"people_object_number_int": 1,
"people_object_number_txt": "at least one",
"people_object_info": "A man injured"
}
]
},
"vehicles_section": {
"vehicles_list": [
{
"vehicle_object_section": {
"vehicle_object_list": [
{
"vehicle_object_impact_list": [
{
"vehicle_object_impact": "set on fire [vehicle]"
}
],
"vehicle_object_type": "car",
"vehicle_object_number_int": 1,
"vehicle_object_number_txt": "at least one",
"vehicle_object_info": "A second vehicle probably involved in the shooting was set on fire"
}
]
},
"aircraft_object_section": {},
"vessel_object_section": {}
}
]
},
"property_object_section": {
"property_object_list": []
},
"temporary_object_section": {}
}
}
]
}
}