object Main
The Main object serves as the entry point of the application and provides functionality to parse and analyze a specified dataset of crime information.
This object:
- Loads a given CSV file containing crime data.
- Sets up a source for reading the data.
- Configures a RawTableParser instance to parse the table data with specified predicates.
- Analyzes the parsed data and prints relevant results to the console.
- Demonstrates how to handle the parsing process using Scala's Try-Success-Failure mechanism.
The application expects the file to be properly located in the resources directory.
Members:
- crimeFile: Specifies the file name of the dataset (located in the resources directory).
- sy: Sets up a data source using the provided file.
- fraction: Defines a fraction value for sampling the data when parsing.
- parser: Configures and prepares the table parser with a predicate for data sampling.
Main functionalities:
- Parses the source using the configured RawTableParser.
- On success: Performs analysis on the parsed data and logs the first 10 rows and summary information.
- On failure: Throws an exception indicating the failure reason.
Example Usage:
To analyze a specific dataset, update the crimeFile variable with the correct
resource file path before running the application.
- Annotations
- @deprecated
- Deprecated
(Since version 1.7.0) Example program: it moves out of the library, into the tests, in 2.0.0
- Alphabetic
- By Inheritance
- Main
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def doMain(triedUrl: Try[URL]): Unit
Executes the main logic of the program, which includes reading a crime data file, setting up a table parser with a specific sampling fraction, and performing data analysis on the parsed table.
Executes the main logic of the program, which includes reading a crime data file, setting up a table parser with a specific sampling fraction, and performing data analysis on the parsed table. The results of the analysis and a subset of the data rows are printed to the console.
- returns
Unit - This method performs side effects (e.g., file IO, data analysis, and printing) and does not return a value.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def main(args: Array[String]): Unit
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)