Skip to content

Instantly share code, notes, and snippets.

@nathanmrtns
nathanmrtns / master-javascript-interview.md
Created December 2, 2019 06:03 — forked from Geoff-Ford/master-javascript-interview.md
Eric Elliott's Master the JavaScript Interview Series
@nathanmrtns
nathanmrtns / MiPicker.swift
Last active August 9, 2018 20:45
A DatePicker of Month and Year (only). The user has 2 options: 1 - Show month and year or 2 - show only year
// This picker is based on MIDatePicker - https://github.com/MarioIannotta/MIDatePicker
import UIKit
protocol MIPickerDelegate: AnyObject {
func miPicker(_ amDatePicker: MIPicker, didSelect date: Date)
//optional func miPickerDidCancelSelection(_ amDatePicker: MIPicker)
}
@nathanmrtns
nathanmrtns / MiPicker.swift
Created August 9, 2018 20:44
A DatePicker of Month and Year (only). The user has 2 options: 1 - Show month and year or 2 - show only year
import UIKit
protocol MIPickerDelegate: AnyObject {
func miPicker(_ amDatePicker: MIPicker, didSelect date: Date)
//optional func miPickerDidCancelSelection(_ amDatePicker: MIPicker)
}
class MIPicker: UIView, UIPickerViewDelegate, UIPickerViewDataSource {
---
title: "Introdução à D3 - Ainda sobre Boqueirão"
date: 2017-11-27T09:15:51-03:00
draft: false
---
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
{
"width":700,
"height":500,
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url":"https://api.insa.gov.br/reservatorios/12172/monitoramento",
"format": {
"type": "json",
"property": "volumes",
"parse": {
{
"width":700,
"height":500,
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url":"https://api.insa.gov.br/reservatorios/12172/monitoramento",
"format": {
"type": "json",
"property": "volumes",
"parse": {
@nathanmrtns
nathanmrtns / percentualXano.json
Last active November 15, 2017 01:58
Volume percentual por ano
{
"width":700,
"height":500,
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url":"https://api.insa.gov.br/reservatorios/12172/monitoramento",
"format": {
"type": "json",
"property": "volumes",
"parse": {
@nathanmrtns
nathanmrtns / MediaxAno.json
Created November 9, 2017 14:39
Volume medio por ano
{
"width":700,
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"url":"https://api.insa.gov.br/reservatorios/12172/monitoramento",
"format": {
"type": "json",
"property": "volumes",
"parse": {
"DataInformacao": "utc:'%d/%m/%Y'"
@nathanmrtns
nathanmrtns / README.md
Last active November 9, 2017 02:04
Lab1 - Visualização de Dados

Visualização na qual podemos ver o percentual de volume do açude de boqueirão ao longo dos anos.

É possível perceber que a seca é algo que a seca atual é um fenomeno que está se repetindo, pois em 98 houve uma seca na qual o volume chegou aos 20% do seu volume total.

Levando em consideração os dados do gráfico, pode-se considerar que: 1 - Esta seca que começou em 2016, poderá durar cerca de 5 anos. 2 - Ao recuperar seu volume, pode ser que o açude mantenha um volume estável num período de mais ou menos 10 anos. 3 - Podemos observar que no ano 1990, 2004 e 2011 o açude estava com seu volume próximo a 100% do seu volume total.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<p id="notice"><%%= notice %></p>
<dl class="dl-horizontal">
<% attributes.reject(&:password_digest?).each do |attribute| -%>
<dt <% if attribute.name == 'name' -%> style="color: blue" <% end -%>><strong><%= attribute.human_name %>:</strong></dt>
<dd <% if attribute.name == 'name' -%> style="color: blue" <% end -%>><%%= @<%= singular_table_name %>.<%= attribute.name %> %></dd>