Hoogle Search

Within LTS Haskell 24.62 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. ixLookup :: (MonadIO m, Ix c) => c -> IxMap c -> m [Entity]

    apecs Apecs.Experimental.Reactive

    No documentation available.

  2. ordLookup :: (MonadIO m, Ord c) => c -> OrdMap c -> m [Entity]

    apecs Apecs.Experimental.Reactive

    No documentation available.

  3. splitLookupEQ :: Int -> PrimeIntSet -> (PrimeIntSet, Maybe (Prime Int), PrimeIntSet)

    arithmoi Math.NumberTheory.Primes.IntSet

    Simultaneous split and lookupEQ.

  4. elookup :: (Ord k, Show k, HasCallStack) => k -> Map k v -> v

    dejafu Test.DejaFu.Internal

    lookup but which errors if the key is not present. Use this only where it shouldn't fail!

  5. InvalidAXFRLookup :: DNSError

    dns Network.DNS.Types

    A zone tranfer, i.e., a request of type AXFR, was attempted with the "lookup" interface. Zone transfer is different enough from "normal" requests that it requires a different interface.

  6. confLookup :: SectionName -> Conf -> [Arg]

    hledger Hledger.Cli.Conf

    Fetch all the arguments/options defined in a section with this name, if it exists. This should be "general" for the unnamed first section, or a hledger command name.

  7. choroplethLookupFromGeo :: VegaLite

    hvega Graphics.Vega.Tutorials.VegaLite

    If we want to plot more than one map from the same table of data we need to do the lookup in the other order, using lookup to add the geographic data to the data table. Charting this way requires specifiying a few things differently than in the previous choropleth example (choroplethLookupToGeo):

    • We're using LuAs in lookup, rather than LuFields, which lets us use all the fields (columns) in the source rather than a specified subset.
    • We use a different set of geographic features (state rather than county outlines) from usGeoData.
    • The plot is defined as a specification, but does not directly refer to the value being displayed. This is set "externally" with the call to repeat. Since we have just had an example with RowFields, this time we use ColumnFields to stack the maps horizontally.
    • Since the different fields have vastly-different ranges (a maximum of roughly 0.01 for "engineers" whereas the "population" field is a billion times larger), the color scaling is set to vary per field with resolve.
    Open this visualization in the Vega Editor
    let popEngHurrData = dataFromUrl "https://raw.githubusercontent.com/vega/vega/master/docs/data/population_engineers_hurricanes.csv" []
    
    plotWidth = 300
    
    viz = [ popEngHurrData
    , width plotWidth
    , transform
    . lookup "id" (usGeoData "states") "id" (LuAs "geo")
    $ []
    , projection [PrType AlbersUsa]
    , encoding
    . shape [MName "geo", MmType GeoFeature]
    . color [MRepeat Column, MmType Quantitative, MLegend [LOrient LOTop, LGradientLength plotWidth]]
    $ []
    , mark Geoshape [MStroke "black", MStrokeOpacity 0.2]
    ]
    
    in toVegaLite
    [ specification $ asSpec viz
    , resolve
    . resolution (RScale [(ChColor, Independent)])
    $ []
    , repeat [ColumnFields ["population", "engineers", "hurricanes"]]
    ]
    
    By moving the legend to the top of each visualization, I have taken advantage of the fixed with (here 300 pixels) to ensure the color bar uses the full width (with LGradientLength).

  8. choroplethLookupToGeo :: VegaLite

    hvega Graphics.Vega.Tutorials.VegaLite

    Our first choropleth is based on the Choropleth example from the Vega-Lite Example Gallery. The key elements are:

    • Using the TopojsonFeature feature for the data source (thanks to usGeoData).
    • Choosing the correct "feature" name in the geographic data, here "counties" in the argument to our usGeoData helper function.
    • Performing a Vega-Lite lookup to join the data to be plotted (the unemployment rate) to the geographic data. In this case, the column name in the unemployment data - "id" given as the first argument to lookup - is the same as the column name in the geographic data, the third argument to lookup. Those can be different.
    • Specifying a projection, that is a mapping from (longitude, latitude) to (x,y) coordinates. Since we are looking at data for the main-land United States of America we use AlbersUsa (rather than looking at the whole globe, as we did in earlier visualizations), which lets us view the continental USA as well as Alaska and Hawaii.
    • Using the Geoshape mark.
    Open this visualization in the Vega Editor
    let unemploymentData = dataFromUrl "https://raw.githubusercontent.com/vega/vega/master/docs/data/unemployment.tsv" []
    
    in toVegaLite
    [ usGeoData "counties"
    , transform
    . lookup "id" unemploymentData "id" (LuFields ["rate"])
    $ []
    , projection [PrType AlbersUsa]
    , encoding
    . color [ MName "rate", MmType Quantitative, MScale [ SScheme "purpleorange" [] ] ]
    $ []
    , mark Geoshape []
    , width 500
    , height 300
    , background "azure"
    ]
    
    So, we have seen how to join data between two datasets - thanks to lookup - and display the unemployment rate (from one data source) on a map (defined from another data source). I have chosen a diverging color scheme for the rate, mainly just because I can, but also because I wanted to see how the areas with high rates were clustered. I've also shown how the background function can be used (it is simpler than the configuration approach used earlier in stripPlotWithBackground). Our next choropleth - choroplethLookupFromGeo - will show how we can join multiple fields across data sources, but this requires understanding how Vega-Lite handles multiple views, which is fortunately next in our tutorial.

  9. sstLookupRich :: SharedStringTable -> [RichTextRun] -> Int

    xlsx Codec.Xlsx.Types.Internal.SharedStringTable

    No documentation available.

  10. sstLookupText :: SharedStringTable -> Text -> Int

    xlsx Codec.Xlsx.Types.Internal.SharedStringTable

    No documentation available.

Page 209 of many | Previous | Next