<jupyter_start><jupyter_text>1.2 Exploring Data Finding jobsIn [section one](signac_101_Getting_Started.ipynb) of this tutorial, we evaluated the ideal gas equation and stored the results in the *job document* and in a file called `V.txt`.Let's now have a look at how we can explore our data space for basic and advanced analysis.We already saw how to iterate over the *complete* data space using the "`for job in project`" expression.This is a short-hand notation for "`for job in project.find_jobs()`", meaning: "find **all** jobs".Instead of finding all jobs, we can also find a subset using *filters*.Let's get started by getting a handle on our project using the `get_project()` function.We don't need to initialize the project again, since we already did that in section 1.<jupyter_code>import signac
project = signac.get_project('projects/tutorial')<jupyter_output><empty_output><jupyter_text>Next, we assume that we would like to find all jobs, where *p=10.0*. For this, we can use the `find_jobs()` method, which takes a dictionary of parameters as filter argument.<jupyter_code>for job in project.find_jobs({'p': 10.0}):
    print(job.statepoint())<jupyter_output><empty_output><jupyter_text>In this case, that is of course only a single job.You can execute the same kind of find operation on the [command line](signac_105_Command_Line_Interface.ipynb) with `$ signac find`, as will be shown later. While the filtering method is optimized for a simple dissection of the data space, it is possible to construct more complex query routines for example using [list comprehensions](https://docs.python.org/3/tutorial/datastructures.htmllist-comprehensions).This is an example for how to select all jobs where the pressure *p* is greater than 0.1:<jupyter_code>jobs_p_gt_0_1 = [job for job in project if job.sp.p > 0.1]
for job in jobs_p_gt_0_1:
    print(job.statepoint(), job.document)<jupyter_output><empty_output><jupyter_text>Finding jobs by certain criteria requires an index of the data space.In all previous examples this index was created implicitly, however depending on the data space size, it may make sense to create the index explicitly for multiple uses. This is shown in the next section.  IndexingAn index is a complete record of the data and its associated metadata within our project’s data space. To generate an index for our project's data space, use the `index()` method:<jupyter_code>for doc in project.index():
    print(doc)<jupyter_output><empty_output><jupyter_text>Using and [index](http://signac.readthedocs.io/en/latest/indexing.html) to operate on data is particular useful in later stages of a computational investigation, where data may come from different projects and the actual storage location of files is less important.You can store the index wherever it may be useful, e.g., a file, a database, or even just in a variable for repeated find operations within one script.The **signac** framework provides the `Collection` class, which can be utilized to manage indeces in memory and on disk.<jupyter_code>index = signac.Collection(project.index())

for doc in index.find({'statepoint.p': 10.0}):
    print(doc)<jupyter_output><empty_output><jupyter_text>ViewsSometimes we want to examine our data on the file system directly. However the file paths within the workspace are obfuscated by the *job id*. The solution is to use *views*, which are human-readable, maximally compact hierarchical links to our data space.To create a linked view we simply execute the `create_linked_view()` method within python or the `$ signac view` command on the [command line](signac_105_Command_Line_Interface.ipynb).<jupyter_code>project.create_linked_view(prefix='projects/tutorial/view')
% ls projects/tutorial/view<jupyter_output><empty_output><jupyter_text>The view paths only contain parameters which actually vary across the different jobs.In this example, that is only the pressure *p*.This allows us to examine the data with highly-compact human-readable path names:<jupyter_code>% ls 'projects/tutorial/view/p_1.0/job/'
% cat 'projects/tutorial/view/p_1.0/job/V.txt'<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0784313725490196, 'fraction_numerical': 0.00823045267489712, 'mean_word_length': 5.632423756019262, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 30, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '68071', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1134, 'n_words': 507, 'path': 'notebooks/signac_102_Exploring_Data.ipynb', 'repo_name': 'phmalek/signac-examples', 'size': '4131'}