You can find this page at:
Today we’ll be making maps and interacting with a dataset of DC Tax lots. The original dataset is available here, DC tax lots. No need to download that though!
Today we will use a slightly cleaned up version of the dataset.
Let’s save the WIFI a bit though, instead of downloading the dataset, copy this URL (ctrl+c):
html
http://andrew.cartodb.com/api/v2/sql?q=SELECT%20*%20FROM%20tax_lots_m&format=geojson
After the file is imported, let’s change the name to,
dc_tax_lots
Let’s take a second to tour the interface in case some of you haven’t picked up the tool in a while.
Transforming data types
Some SQL we hide for you, for example, no need to use SQL to change datatypes. But you can use SQL if you want!
CartoDB is built on PostgreSQL and gives you access to the full relational database model, plus geospatial functions based on PostGIS.
Example, calculating tax lot elevation based on DC contour lines. In this example, I’m using a second dataset from opendata.dc.gov for elevation data.
sql
SELECT * FROM dc_tax_lots WHERE
elevation > 50 AND elevation < 150
First I’ll add a new column, called elevation_b
. Next, I’ll run a relational SQL statement, that measures the elevation by finding the closest contour line in my second table (no interpolation here!).
sql
UPDATE
dc_tax_lots
SET
elevation_b = (
SELECT
elevation
FROM
dc_20_foot_contours
ORDER BY
the_geom <-> tax_lots_m.the_geom
LIMIT 1
)
Let’s create a choropleth from the elevation column.
In CartoDB, you can move between points, lines and polygons fairly easily using the PostGIS geospatial functionality. For example, you can join a group of points into a linestring. In this case, let me show you how to extract the centroid of each building so that we can use Torque to animated it.
sql
SELECT
ST_Centroid(the_geom) the_geom, elevation, creation_d
FROM dc_tax_lots
We can capture a snapshot of this by using the options->table from query
functionality.
Point torque
Categorical torque
Temporal bubbles
Cumulative bubbles
Method for creating the last two
Let’s all start with the same template, you can download an index.html file here,
A map in one line of javascript
js
cartodb.createVis('map','http://team.cartodb.com/api/v2/viz/59428614-9c1f-11e4-be16-0e0c41326911/viz.json')
First, make sure you delete the line we added above and create a leaflet map object,
js
var map = new L.Map('map', {
zoomControl: false,
center: [38.893, -77.03],
zoom: 13
});
Next, add a basemap. You can use one of the freely available CartoDB Basemaps
js
var layer = L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png',{
attribution: '© OpenStreetMap contributors, © CartoDB'
}).addTo(map);
The createLayer method is a really powerful way to use CartoDB in your frontend applications. It allows you to add your own map object (leaflet, gmaps) and add your layers from CartoDB.
js
cartodb.createLayer(map, '{your-vis-json-url-here}')
.done(function(layer) {
// Do further things here
})
.addTo(map);
You can add interactivity in the Editor very easily, but for maps you are creating on the fly in CartoDB.js, you can also add custom interactivity.
js
var lots = layer.getSubLayer(0);
lots.setInteractivity('cartodb_id, elevation');
lots.setInteraction(true);
You can use cursor events on your polygons (e.g. featureClick, featureOver, featureOut) to create your own actions on your webpage. Let’s log the Elevation value for any lot we hover over
js
lots.on('featureOver', function(e, pos, pixel, data) {
console.log("Elevation: " + data.elevation);
});
Let’s build a simple app that let’s you click a lot and see all lots within a 30 foot elevation envelope. We can do this by combining the click event and the ability to define a new SQL statment on our map tiles.
First, let’s construct our new SQL string from the click input,
js
lots.on('featureClick', function(e, pos, pixel, data) {
var newSql = "SELECT * FROM dc_tax_lots WHERE elevation >= "+(data.elevation - 30)+" AND elevation <= "+(data.elevation - 30);
console.log("SQL: " + newSql);
});
Using the layer
object returned by createLayer, we can actually update our SQL, CartoCSS and interactivity on the fly. Let’s use setSQL to run our new statement:
js
lots.setSQL(newSql);
Let’s add a simple button to reset the map. I’ve already added the HTML to the webpage, we just need to remove the class hidden
when we set the SQL filter and then wire up the button using jQuery.
js
$('button').removeClass('hidden');
js
$('button').click(function(){
$('button').addClass('hidden');
lots.setSQL("SELECT * FROM dc_tax_lots");
});


NGS protocols to wrangling Transcriptomics.
Once your assembly is complete, you’ll want to know how ‘good’ it is, and you might want to compare the quality of the assembly to similar assemblies generated by alternative assemblers, or having run an assembly with different parameters.
Transrate is software for de-novo transcriptome assembly quality analysis. It examines your assembly in detail and compares it to experimental evidence such as the sequencing reads, reporting quality scores for contigs and assemblies. This allows you to choose between assemblers and parameters, filter out the bad contigs from an assembly, and help decide when to stop trying to improve the assembly.
Transrate relise on different type errors reporter experimentally:
Error type:
Whinin your work directory lets make a new directory with name transrate and go in to start working in:
mkdir transrate && cd transrate
Lets to use the command shell ln -s
in order to make a symbolic link from the assembly with name Trinity.fasta:
ln -s ../trinity_out/Trinity.fasta .
Then, concatenate in a unique dataset the left and right libraries for input in transrate; both data sets are necessary for transrating:
zcat ../trinity_out/*R1*P.qtrim.gz > R1.P.qtrim.fq &
zcat ../trinity_out/*R2*P.qtrim.gz > R2.P.qtrim.fq
Now export the source from the transrate tool; and finally run transrate (considere to use the sbatch task manager in the cluster)
tool=/LUSTRE/bioinformatica_data/RNA/ricardo/bioinformatics/transrate-1.0.3-linux-x86_64/
export PATH=$tool:$PATH
transrate \
--assembly Trinity.fasta \
--left R1.P.qtrim.fq \
--right R2.P.qtrim.fq \
--threads 96 \
--output gcontigs 1> transrate.log &
The transrate.log
file include some statistics like:
[ INFO] 2018-03-02 00:41:37 : Calculating contig metrics...
[ INFO] 2018-03-02 00:41:56 : Contig metrics:
[ INFO] 2018-03-02 00:41:56 : -----------------------------------
[ INFO] 2018-03-02 00:41:56 : n seqs 147454
[ INFO] 2018-03-02 00:41:56 : smallest 201
[ INFO] 2018-03-02 00:41:56 : largest 10795
[ INFO] 2018-03-02 00:41:56 : n bases 108715008
[ INFO] 2018-03-02 00:41:56 : mean len 737.28
[ INFO] 2018-03-02 00:41:56 : n under 200 0
[ INFO] 2018-03-02 00:41:56 : n over 1k 33509
[ INFO] 2018-03-02 00:41:56 : n over 10k 1
[ INFO] 2018-03-02 00:41:56 : n with orf 40996
[ INFO] 2018-03-02 00:41:56 : mean orf percent 58.76
[ INFO] 2018-03-02 00:41:56 : n90 308
[ INFO] 2018-03-02 00:41:56 : n70 640
[ INFO] 2018-03-02 00:41:56 : n50 1121
[ INFO] 2018-03-02 00:41:56 : n30 1754
[ INFO] 2018-03-02 00:41:56 : n10 2818
[ INFO] 2018-03-02 00:41:56 : gc 0.39
[ INFO] 2018-03-02 00:41:56 : bases n 0
[ INFO] 2018-03-02 00:41:56 : proportion n 0.0
[ INFO] 2018-03-02 00:41:56 : Contig metrics done in 19 seconds
[ INFO] 2018-03-02 00:41:56 : Calculating read diagnostics...
[ INFO] 2018-03-02 01:00:20 : Read mapping metrics:
[ INFO] 2018-03-02 01:00:20 : -----------------------------------
[ INFO] 2018-03-02 01:00:20 : fragments 51394897
[ INFO] 2018-03-02 01:00:20 : fragments mapped 19860500
[ INFO] 2018-03-02 01:00:20 : p fragments mapped 0.39
[ INFO] 2018-03-02 01:00:20 : good mappings 17246823
[ INFO] 2018-03-02 01:00:20 : p good mapping 0.34
[ INFO] 2018-03-02 01:00:20 : bad mappings 2613677
[ INFO] 2018-03-02 01:00:20 : potential bridges 0
[ INFO] 2018-03-02 01:00:20 : bases uncovered 68043780
[ INFO] 2018-03-02 01:00:20 : p bases uncovered 0.63
[ INFO] 2018-03-02 01:00:20 : contigs uncovbase 124374
[ INFO] 2018-03-02 01:00:20 : p contigs uncovbase 0.84
[ INFO] 2018-03-02 01:00:20 : contigs uncovered 147454
[ INFO] 2018-03-02 01:00:20 : p contigs uncovered 1.0
[ INFO] 2018-03-02 01:00:20 : contigs lowcovered 147454
[ INFO] 2018-03-02 01:00:20 : p contigs lowcovered 1.0
[ INFO] 2018-03-02 01:00:20 : contigs segmented 15457
[ INFO] 2018-03-02 01:00:20 : p contigs segmented 0.1
[ INFO] 2018-03-02 01:00:20 : Read metrics done in 1103 seconds
[ INFO] 2018-03-02 01:00:20 : No reference provided, skipping comparative diagnostics
[ INFO] 2018-03-02 01:00:40 : TRANSRATE ASSEMBLY SCORE 0.0297
[ INFO] 2018-03-02 01:00:40 : -----------------------------------
[ INFO] 2018-03-02 01:00:40 : TRANSRATE OPTIMAL SCORE 0.123
[ INFO] 2018-03-02 01:00:40 : TRANSRATE OPTIMAL CUTOFF 0.2353
[ INFO] 2018-03-02 01:00:41 : good contigs 65516
[ INFO] 2018-03-02 01:00:41 : p good contigs 0.44
[ INFO] 2018-03-02 01:00:41 : Writing contig metrics for each contig to /LUSTRE/bioinformatica_data/genomica_funcional/rgomez/oyster-rawdata/gonada_all_sex_vs_hc/transrate/gcontigs/Trinity/contigs.csv
[ INFO] 2018-03-02 01:01:02 : Writing analysis results to assemblies.csv
The optimal cutoff from 0.2352 were calculated with transrate and used to keep good contigs assembled (from the total contigs 44% were considere as good). Try comparing results with the previous Assembly quality statistics which came from the same set of libraries. Are there some difference ?
lets start into R
contigs <- read.csv(".gcontigs/Trinity/contigs.csv", header=T)
contigs['group'] <- NA
contigs[which(contigs['score'] == 0.0297),'group'] <- 'Assembly Score'
contigs[which(contigs['score'] <= 0.123),'group'] <- 'Optimal Score'
contigs[which(contigs['score'] <=0.2353),'group'] <- 'Optimal Cutoff'
table(contigs$group)
| head1 | head two | three |
|---|---|---|
| ok | good swedish fish | nice |
| out of stock | good and plenty | nice |
| ok | good oreos |
hmm |
| ok | good zoute drop |
yumm |
Long, single-line code blocks should not wrap. They should horizontally scroll if they are too long. This line should be long enough to demonstrate this.
Text can be bold, italic, or strikethrough.


Whether you are at home or on the road, it s never been easier to keep your family and home safe and secure. Akamaya is ready to cooperate works with you to design a system that will meet your individual needs and budget. We provide everything you need-from a basic burglar and fire alarm to sophisticated all-in-one system.
We partner with our clients to deliver high-level security service every day. Our quality-based, results-oriented approach is what makes us one of the top private security companies. What lies at the core of our success? We guess it is a blend of quality employee engagement programs, an industry-leading learning and development philosophy.
We partner with our clients to deliver high-level security service every day. Our quality-based, results-oriented approach is what makes us one of the top private security companies. What lies at the core of our success? We guess it is a blend of quality employee engagement programs, an industry-leading learning and development philosophy.
Close ProjectYou don't want to imagine that everything you've worked for will be a target of crime or fire, but statistics show that it's happening almost everywhere - from the smallest stores to the largest retail chains. With commercial security, your business property will be safe from it.
Close ProjectThe security needs of a business differ greatly depending on several different factors, including location, the type of business, and its size. Where the business is located plays a big part in determining what features are the best for it. A business in a small town may require fewer security features than one on a busy city street.
Close ProjectA security guard or security officer is a person who is paid to protect property, assets, or people. They are usually privately and mostly comprised with civilian personnel. Security officers are generally uniformed and act to protect property by maintaining a high-visibility presence to deter illegal and inappropriate actions, observing for signs of crime, fire or disorder; then taking action.
Close ProjectFor some businesses, the most advanced security features they require are the door chimes and stickers warning of security monitoring. Some businesses and offices just do not keep enough merchandise or equipment on-site to make it beneficial to go to extreme levels of security.
Close ProjectUntil the 1980s, the term watchman was more commonly applied to this function, a usage dating back to at least the Middle Ages in Europe. This term was carried over to North America where it was interchangeable with night-watchman until both terms were replaced with the modern security-based titles. Security guards are sometimes regarded as fulfilling a private policing function.
Close Project


Start doing things for free, Sign up now
Your password should be at least 10 characters
By clicking 'Create Account' you agree to our Terms of Use


Final Project
My Final Project Idea! Tetris!
Draft submited by Chris Sprys, 11/5/2020 Application:Retro Tetris with Python
How am I gonna do it?
Using the Python guide
How to build your own Tetris game
Updates and progress!
- Date Propsal:11/5/2020
- Sprint 5
- Using Python
- Hit ditection and movement of blocks hope to ahcomplish with time allowed
- Adding of sounds, more color and complex if had more time allowed
- Usage of importaning code, and functions learn in class
- Expanding knowledge of Python programming with user input
Created by Chris Sprys


Shop
About
Contact
Store Front
Login
Name
Price
Name
Price
Name
Price
Name
Price
Name
Price
Name
Price
Name
Price
Name
Price
Name
Price